12.03.2012, 20:21
You could try this out
Also, PVars are basically the same as new IsInEvent[MAX_PLAYERS] = 0;
That's an example
pawn Code:
public OnPlayerCommandReceived(playerid, cmdtext[])
{
if(IsInEvent[playerid] && strfind(cmdtext, "LeaveEvent", true) == -1)
{
SendClientMessage(playerid, 0xCC0000AA, "You can't use commands in an event!")
return 0;
}
return 1;
}
Also, PVars are basically the same as new IsInEvent[MAX_PLAYERS] = 0;
pawn Code:
CMD:vartest(playerid)
{
SetPVarInt(playerid, "SomeVar", 0);
printf("Somevar: %i", GetPVarInt(playerid, "SomeVar"));
return 1;
}