31.03.2015, 08:20
Quote:
help me with this. if i typed /kill i want the message appear to all player's left screen Example: Player 1 suicide ! so..what we need to put?
public OnPlayerCommandText(playerid, cmdtext[]) { if(!strcmp("/kill", cmdtext, true)) { SetPlayerHealth(playerid, 0); return 1; } return 0; } |
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp("/kill", cmdtext, true))
{
new name[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid, name, sizeof(name))
SetPlayerHealth(playerid, 0);
format(string, sizeof(string), "%s (%s) has committed {FF0000}suicide{FFFFFF}!", name, playerid);
SendClientMessageToAll(0xC4C4C4FF, string);
return 1;
}
return 0;
}