05.04.2014, 13:43
Try this:
PHP код:
COMMAND:slap(playerid,params[])
{
new OtherPlayer, Msg[150], Name[24], Message[150], OtherPlayerName[24];
SendAdminText(playerid,"/slap", params);
if (APlayerData[playerid][PlayerLevel] >= 2)
{
GetPlayerName(playerid, Name, sizeof(Name));
GetPlayerName(OtherPlayer, OtherPlayerName, sizeof(OtherPlayerName));
format(Msg, sizeof(MSg), "%s Slaps %s because %s", Name, OtherPlayerName, Message);
SendClientMessageToAll(0xFFFFFFFF, Msg);
SetPlayerHealth(OtherPlayer, 75);
}
else
{
return 0;
}
return 1;
}