30.09.2010, 16:18
You're checking if the player is an admin, and then telling him that he can't use that command. (?)
Hopelessness indeed, lol.
Also, why formatting a string without any contents? Only plain text? You don't need to format for that, useless variable.
Hopelessness indeed, lol.
pawn Код:
if(!IsPlayerAdmin(playerid)) return 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 Float:slx, Float:sly, Float:slz;
GetPlayerPos(otherId, slx, sly, slz);
SetPlayerPos(otherId, slx, sly, slz+5);
PlayerPlaySound(otherId, 1130, slx, sly, slz+5);
SendClientMessage(playerid, 0xFFFFFFAA, "(( You have been slapped by admin ! ))");
}