Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public Action:DealWeapons()
- {
- for(new entity = 0; entity < 4096; entity++)
- {
- if(IsValidEntity(entity) || IsValidEdict(entity))
- {
- decl String:sClassname[128];
- GetEntityClassname(entity, sClassname, sizeof(sClassname));
- if(StrContains(sClassname, "weapon_", false) != -1)
- {
- AcceptEntityInput(entity, "Kill");
- }
- }
- }
- for(new iClient = 1; iClient <= MaxClients; iClient++)
- {
- if(IsClientInGame(iClient) && IsPlayerAlive(iClient))
- {
- new weaponid;
- for (new repeat = 0; repeat < 4; repeat++)
- {
- for (new wepID = 0; wepID <= 11; wepID++)
- {
- weaponid = GetPlayerWeaponSlot(iClient, wepID);
- if (weaponid != -1)
- {
- RemovePlayerItem(iClient, weaponid);
- }
- }
- }
- GivePlayerItem(iClient, "weapon_knife");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement