Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function ammo_matic()
- {
- cost = 5000;
- trigs = GetEntArray( "ammo_matic", "targetname" );
- foreach( trig in trigs )
- {
- trig thread ammo_matic_think( cost );
- trig SetCursorHint( "HINT_NOICON" );
- trig SetHintString( "Press and Hold ^3&&1^7 to Buy Ammo [Cost: "+cost+"]" );
- }
- }
- function ammo_matic_think( cost )
- {
- while(1)
- {
- self waittill( "trigger", player );
- if( player.score >= cost )
- {
- weapon = player GetCurrentWeapon();
- player zm_weapons::weapon_give( weapon );
- PlaySoundAtPosition( "zmb_cha_ching", self.origin );
- player zm_score::minus_to_player_score( cost );
- self SetHintString("");
- wait(3);
- }
- else
- {
- self SetHintString( "You Do Not Have Enough Money" );
- wait(3);
- }
- self SetHintString( "Press and Hold ^3&&1^7 to Buy Ammo [Cost: "+cost+"]" );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment