View Single Post
Halt
Senior Member
Join Date: Jan 2015
Location: Black Mesa
Old 08-22-2019 , 15:00   Re: [Question] Entity Index
Reply With Quote #6

*facepalm* I know better than to try and store a string in an int variable. Silly me. Thank you for the explination, here is what I got, with some help from the Discord. (Domino)

PHP Code:
public void OnEntityCreated(int entity, const char[] classname)
{
    if (
StrContains(classname"grenade_projectile"false) > -1)
    {
        
SDKHook(entitySDKHook_SpawnPostOnSpawnPost);
    }
}

public 
void OnSpawnPost(int entity)
{
    
int iThrower GetEntPropEnt(entityProp_Send"m_hThrower");
    
bRestrictCommand[iThrower] == true;
    
CreateTimer(30.0CommandRestrictiThrower);
}

public 
Action CommandRestrict(Handle timerdata any)
{
  
bRestrictCommand[iThrower] == false;

Halt is offline