Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- buyable_perk_slot()
- {
- level.perk_limit = 4; //Initial perk limit
- level.perk_limit_max = 8;
- level.buy_slot_cost = 1500; //Cost of perk slot
- buy_slot_trigger = getent( "buy_slot_trigger" , "targetname" ); //Calls the trigger into script
- perk_bottle = Spawn( "script_model", self.origin ); //Spawns a model and gives it the script name perk_bottle
- perk_bottle.angles = (-30,0,-30); //Sets the angles of the perk_bottle
- perk_bottle setmodel( "zombie_perk_bottle_jugg" ); //Sets the model to a juggernog bottle
- self thread perk_bottle_rotate( perk_bottle );
- playfxontag (level._effect["powerup_on"], perk_bottle, "tag_origin"); //Puts the powerup effect around the bottle
- buy_slot_trigger SetCursorHint("HINT_NOICON"); //Gets rid of hand symbol
- self UseTriggerRequireLookAt(); //Requires the player to look at the trigger to use it
- buy_slot_trigger SetHintString("Press &&1 To Buy Perk Slot [Cost: 1500]"); //Hint string players will see
- while(1) //Loops so players can use it more than once
- {
- self waittill( "trigger", player );
- if(player.score >= level.buy_slot_cost) //Checks to see if the player has enough points
- {
- player maps\_zombiemode_score::minus_to_player_score( level.buy_slot_cost ); //Subtracts the cost from the player's score
- level.perk_limit = level.perk_limit + 1; //Increases the player's perk limit by 1
- iprintlnbold( "Perk Slot Increased By 1" ); //Displays this message to the player
- if(level.perk_limit >= level.perk_limit_max) //Lets the player know if they have reached the max perk limit
- {
- iprintlnbold( "Max Perk Limit Reached" );
- }
- }
- }
- }
- perk_bottle_rotate( perk_bottle )
- {
- self endon( "took_gun" );
- self endon( "disconnect" );
- while(1)
- {
- perk_bottle rotateyaw( 360 ,1.5 );
- wait 1.5;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement