30.09.2010, 16:15
pawn Код:
CMD:slap(playerid, params[])
{
if (!IsPlayerAdmin(playerid))
{
SendClientMessage(playerid, 0xFF4646FF, "You are not authorized to use that command !");
}
else
{
new otherId;
if(sscanf(params, "u", otherId)) return SendClientMessage(playerid, 0xFF4646FF, "USAGE: /slap [ID/PartOfname]");
if(otherId != INVALID_PLAYER_ID)
{
new message[40];
new Float:slx, Float:sly, Float:slz;
GetPlayerPos(otherId, slx, sly, slz);
SetPlayerPos(otherId, slx, sly, slz+5);
PlayerPlaySound(otherId, 1130, slx, sly, slz+5);
format(message, sizeof(message), "(( You have been slapped by admin ! ))");
SendClientMessage(playerid, 0xFFFFFFAA, message);
}
}
return 1;
}