Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate
Collapse

Plutonium

itsmeeenglundefined

itsmeeengl

@itsmeeengl
About
Posts
1
Topics
1
Shares
0
Groups
0
Followers
2
Following
3

Posts

Recent Best Controversial

  • Add points at round start
    itsmeeenglundefined itsmeeengl

    Hi there!
    I am creating a script to add 2000 points to the player at the start of each round, but it is not working for me.
    Could you help me please.

    This is my code

    #include common_scripts\utility;
    #include maps\mp\_utility;
    #include maps\mp\zombies\_zm;
    #include maps\mp\zombies\_zm_utility;
    #include maps\mp\gametypes_zm\_hud_util;
    #include maps\mp\gametypes_zm\_hud_message;
    
    init () {
    	level.perk_purchase_limit = 9;
    	level.start_weapon = "fiveseven_zm";
    
    	level thread onPlayerConnect();
    }
    
    onPlayerConnect() {
    	for (;;) {
    		level waittill("connecting", player);
    
    		player thread onPlayerSpawned();
    	}
    }
    
    onPlayerSpawned() {
    	level endon("game_ended");
    	self endon("disconnect");
    	
    	self.initial_spawn = true;
    
    	for (;;) {
    		self waittill("spawned_player");
    
    		if (self.initial_spawn) {
    			self.initial_spawn = false;
    
    			self.score = 5000;
    
    			self.maxhealth = 150;
    			self.health = self.maxhealth;
    
    			self IPrintLn("^5" + self.name + " ^3has been connected!");
    		}
    	}
    
    	if (level.round_number > 1) {
    		for (;;) {
    			self.score += 2000;
    			level waittill("start_of_round");
    			self.score += 2000;
    		}
    	}
    }
    
    BO2 Modding Support & Discussion
  • 1 / 1
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate