View Single Post
farawayf
Senior Member
Join Date: Jan 2019
Old 03-31-2019 , 18:20   Re: Check if player has grenade/equip on spawn
Reply With Quote #4

Quote:
Originally Posted by MatoBoost View Post
Alright, I will try this, thanks! Also about removing grenades, how do I do that ? To be honest I started with SourcePawn just today, I just have some experience from C, so far I only edited easy lines of code.

Just for example, without isclientingame check

PHP Code:

public void OnPluginStart()
{
    
HookEvent("round_end"RoundEndEventHookMode_Pre);
}


public 
Action:RoundEnd(Handle:event, const String:name[], bool:dontBroadcast

    for( new 
client=1client<=MaxClientsclient++)
    {
        new 
3;
        {  
            new 
ent
             
            while((
ent GetPlayerWeaponSlot(clienti)) != -1
            { 
                
RemovePlayerItem(clientent); 
                
AcceptEntityInput(ent"Kill");
            } 
        } 
    }    

farawayf is offline