Quote:
Originally Posted by Neuro Toxin
Players may have not spawned / be alive at round start.
Remove the alive check and see if that fixes your issue.
|
Code:
public Action:RounStart(Handle:event, const String:Name[], bool:Broadcast)
{
for(new i = 1; i <= MaxClients; i++)
{
chooseclass(i);
weapontype[i] = 0;
damageplus[i] = 0.0;
classtype[i] = 0;
boomuse[i] = false;
PrethinkBuffer[i] = false;
}
}
No. boomuse[i] = false; PrethinkBuffer[i] = false;
I don't think these two variables are really something. Debugging.
Code:
new bool:AccessEKey[MAXPLAYERS+1] = false;
public Action:OnPlayerRunCmd(Client, &buttons, &impulse, Float:vel[3], Float:angles[3], &weapon)
{
if(buttons & IN_USE)
{
if(IsClientInGame(Client) && IsPlayerAlive(Client))
{
if(AccessEKey[Client] == false)
{
if(classtype[Client] == 1)
{
if(!PrethinkBuffer[Client])
{
CommandUse(Client);
PrethinkBuffer[Client] = true;
AccessEKey[Client] = true;
}
}
if(classtype[Client] == 3)
{
if(!boomuse[Client])
{
grenadeattack(Client);
boomuse[Client] = true;
AccessEKey[Client] = true;
}
}
}
}
}
else
{
AccessEKey[Client] = false;
}
}
It seems that you are not exceeding the parameter check statement. It works. I put it back in, it doesn't work.