30.11.2013, 14:10
My Version
pawn Код:
CMD:slap(playerid, params[])
{
if(PlayerInfo[playerid][AdminLevel] >= 2)
{
new targetid;
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_YELLOW, "Correct Usage: /slap [playerid]");
if(targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "ERROR: invalid playerid");
new Float:x, Float:y, Float:z;
GetPlayerPos(targetid, x, y, z);
SetPlayerPos(targetid, x, y, z+10);
PlaySound(targetid, 1190);
new name[MAX_PLAYER_NAME], string[128];
GetPlayerName(targetid, name, sizeof(name));
format(string, sizeof(string), "you have slapped %s", name);
SendClientMessage(playerid, PLAYERCOLOR_AQUA, string);
SendCommandToAdmins(playerid,"/slap");
}
else return SendClientMessage(playerid, COLOR_RED, "ERROR: you need to be atleast Admin Level 3 to start a HnS Event");
return 1;
}