Advertisement
nomy

Untitled

Aug 28th, 2013
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.80 KB | None | 0 0
  1. public Action:DealWeapons()
  2. {
  3.     for(new entity = 0; entity < 4096; entity++)
  4.     {
  5.         if(IsValidEntity(entity) || IsValidEdict(entity))
  6.         {
  7.             decl String:sClassname[128];
  8.             GetEntityClassname(entity, sClassname, sizeof(sClassname));
  9.            
  10.             if(StrContains(sClassname, "weapon_", false) != -1)
  11.             {
  12.                 AcceptEntityInput(entity, "Kill");
  13.             }
  14.         }
  15.     }
  16.    
  17.     for(new iClient = 1; iClient <= MaxClients; iClient++)
  18.     {
  19.         if(IsClientInGame(iClient) && IsPlayerAlive(iClient))
  20.         {
  21.             new weaponid;
  22.             for (new repeat = 0; repeat < 4; repeat++)
  23.             {
  24.                 for (new wepID = 0; wepID <= 11; wepID++)
  25.                 {
  26.                     weaponid = GetPlayerWeaponSlot(iClient, wepID);
  27.                     if (weaponid != -1)
  28.                     {
  29.                         RemovePlayerItem(iClient, weaponid);
  30.                     }
  31.                 }
  32.             }
  33.             GivePlayerItem(iClient, "weapon_knife");
  34.         }
  35.     }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement