daily pastebin goal
38%
SHARE
TWEET

Untitled

a guest Jul 17th, 2017 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.             else if ( ( cmd == "wep" ) || ( cmd == "we" ) )
  2.     {
  3.         if ( i < 2 ) PrivMessage( "Error - Missing Information - /c wep <Ammo> <Weapon>", player );
  4.                 else if ( drown[ player.ID ] ) PrivMessage( "Error - You have been sended to drown please wait 15 seconds", player );
  5.         else if ( !player.IsSpawned ) PrivMessage( "Error - You need to spawn.", player );
  6.         else
  7.         {
  8.                         local Ammo = GetTok( text, " ", 1 ), Weapon = GetTok( text, " ", 2, i ), wep;
  9.             if ( IsNum( Weapon ) ) wep = Weapon.tointeger();
  10.             else wep = GetWeaponID( Weapon );
  11.            
  12.                         if ( !IsNum( Ammo ) ) PrivMessage( "Error - Invalid ammo, please type a number!", player );
  13.                         else
  14.                         {
  15.                                 Ammo = Ammo.tointeger();
  16.                     if ( !ValidWep( wep ) ) PrivMessage( "Error - Invalid Weapon ID/Name.", player );
  17.                     else
  18.                     {
  19.                         local wepname = GetWeaponName( wep );
  20.                
  21.                             PrivMessage( "Getting " + wepname + " to: " + player.Name + " Ammo: " + Ammo, player );
  22.                         player.SetWeapon( wep, Ammo );
  23.                     }
  24.                 }
  25.                 }
  26.     }
RAW Paste Data
Top