jlalt

IRCCMDIW

Aug 21st, 2015
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.98 KB | None | 0 0
  1. IRCCMD:iw(botid, channel[], user[], host[], params[])
  2. {
  3.   if (IRC_IsHalfop(botid, channel, user))
  4.     {
  5.         new bool:First2 = false;
  6.         new Count, string[128];
  7.         new i, slot, weap, ammo;
  8.         for(i = 0; i < MAX_PLAYERS; i++)
  9.         {
  10.             if(IsPlayerConnected(i))
  11.             {
  12.             for(slot = 0; slot < 14; slot++)
  13.             {
  14.             GetPlayerWeaponData(i, slot, weap, ammo);
  15.             if(ammo != 0 && weap == 38 || ammo != 0 && weap == 37 || ammo != 0 && weap == 36 || ammo != 0 && weap == 35)
  16.             {
  17.             Count++;
  18.             if(!First2)
  19.             {
  20.             format(string, sizeof(string), "Illegal Weapon: (%d)%s(ammo%d)", i, PlayerName2(i), ammo);
  21.             First2 = true;
  22.             }
  23.             else format(string,sizeof(string),"%s, (%d)%s(ammo%d) ",string, i, PlayerName2(i), ammo);
  24.             }
  25.             }
  26.             }
  27.         }
  28.         if(Count == 0)
  29.         return IRC_GroupSay(gGroupID, channel, "No player has Illegal Weapon!");
  30.         else return IRC_GroupSay(gGroupID, channel,string);
  31.     }
  32.     else return IRC_GroupSay(gGroupID, channel,"You beed to be HalfOp to use this command.");
  33. }
Advertisement
Add Comment
Please, Sign In to add comment