28.09.2010, 14:47
Tenta esse:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
new idx;
new cmd[256];
cmd = strtok(cmdtext, idx);
if(strcmp(cmd, "/comandos", true) == 0 || strcmp(cmd, "/cmds", true) == 0)
{
if(IsPlayerConnected(playerid))
{
SendClientMessage(playerid, COR_BRANCO,"_______________________________________");
SendClientMessage(playerid, COR_AZULCLARO, "/morrer ---------------------------");
SendClientMessage(playerid, COR_AZULCLARO, "-----------------------------------");
SendClientMessage(playerid, COR_BRANCO,"_______________________________________");
return 1;
}
}
if(strcmp(cmd, "/morrer", true) == 0)
{
SetPlayerHealth(playerid, 0);
return 1;
}
return 0;
}