29.11.2010, 16:27
pawn Код:
CMD:slap(playerid, params[])
{
new Float:X, Float:Y, Float:Z, str[128], id, name[MAX_PLAYER_NAME], name2[MAX_PLAYER_NAME];
if(sscanf(params, "u", id)) return SendClientMessage(playerid, 0xFF0000AA, "Usage: /slap <player name/id>");
else
{
GetPlayerPos(id, X, Y, Z);
PlayerPlaySound(id, 1190, X, Y, Z);
SetPlayerPos(id, X, Y, Z+7);
TogglePlayerControllable(id, true);
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
GetPlayerName(id, name2, MAX_PLAYER_NAME);
format(str, sizeof(str), "%s was slapped by %s", name2, name);
SendClientMessageToAll(COLOR_DARKRED, str);
}
return 1;
}