26.01.2015, 14:36
Asн:
si usas strcmp sуlo ponlo en la callback, al principio.
pawn Код:
new
UsarComandos[MAX_PLAYERS]
;
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
{
if(playerid != INVALID_PLAYER_ID)
{
if(issuerid != INVALID_PLAYER_ID)
{
UsarComandos[playerid] = gettime()+3;
}
}
return 1;
}
public OnPlayerCommandReceived(playerid, cmdtext[])
{
if(UsarComandos[playerid] < gettime()){
SendClientMessage(playerid, -1, "Te han disparado, no puedes usar comandos! espera un momento!");
return 0;
}
return 1;
}