Advertisement
Guest User

Untitled

a guest
May 31st, 2010
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.72 KB | None | 0 0
  1. //----------------------------------[GiveGun]------------------------------------------------
  2.     if(strcmp(cmd, "/givegun", true) == 0)
  3.     {
  4.         if(IsPlayerConnected(playerid))
  5.         {
  6.             tmp = strtok(cmdtext, idx);
  7.             if(!strlen(tmp))
  8.             {
  9.                 SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /givegun [playerid] [weaponid(eg. 46 = Parachute)] [ammo]");
  10.                 return 1;
  11.             }
  12.             new playa;
  13.             new gun;
  14.             new ammo;
  15.             playa = ReturnUser(tmp);
  16.             tmp = strtok(cmdtext, idx);
  17.             gun = strval(tmp);
  18.             if(!strlen(tmp))
  19.             {
  20.                 SendClientMessage(playerid, COLOR_GRAD1, "Benutze: /givegun [playerid] [weaponid] [ammo]");
  21.                 SendClientMessage(playerid, COLOR_GRAD4, "3(Club) 4(knife) 5(bat) 6(Shovel) 7(Cue) 8(Katana) 10-13(Dildo) 14(Flowers) 16(Grenades) 18(Molotovs) 22(Pistol) 23(SPistol)");
  22.                 SendClientMessage(playerid, COLOR_GRAD3, "24(Eagle) 25(shotgun) 29(MP5) 30(AK47) 31(M4) 33(Rifle) 34(Sniper) 37(Flamethrower) 41(spray) 42(exting) 43(Camera) 46(Parachute)");
  23.                 return 1;
  24.             }
  25.             if(gun < 1||gun > 46||gun==27||gun==1||gun==2||gun==9||gun==17||gun==19||gun==20||gun==21||gun==36||gun==38||gun==39||gun==40||gun==44||gun==45)
  26.             { SendClientMessage(playerid, COLOR_GRAD1, "   wrong WeaponID!"); return 1; }
  27.             tmp = strtok(cmdtext, idx);
  28.             ammo = strval(tmp);
  29.             if(ammo <1||ammo > 999)
  30.             { SendClientMessage(playerid, COLOR_GRAD1, "   dont go below 1 or above 999 bullets!"); return 1; }
  31.             if (PlayerInfo[playerid][pAdmin] >= 1338)
  32.             {
  33.                 if(IsPlayerConnected(playa))
  34.                 {
  35.                     if(playa != INVALID_PLAYER_ID)
  36.                     {
  37.                         GivePlayerWeapon(playa, gun, ammo);
  38.                     }
  39.                 }
  40.             }
  41.             else
  42.             {
  43.                 SendClientMessage(playerid, COLOR_GRAD1, "   Du bist kein Admin!");
  44.             }
  45.         }
  46.         return 1;
  47.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement