20.07.2015, 14:23
Код:
CMD:slap(playerid,params[]) { if(pInfo[playerid][pAdminLevel] >= 2 || IsPlayerAdmin(playerid)) { new targetid,string[128]; if(sscanf(params, "u", targetid)) return SendClientMessage(playerid,-1,""chat" /slap [playerid]"); if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat" Player is not online"); new Float:posxx[3]; GetPlayerPos(targetid, posxx[0], posxx[1], posxx[2]); SetPlayerPos(targetid, posxx[0], posxx[1], posxx[2]+40); if(IsPlayerAdmin(playerid)) { format(string, sizeof(string), "*"COL_RED" RCON Admin has slapped %s",PlayerName(targetid)); SendMessageToAllAdmins(string,-1); } else { format(string, sizeof(string), "*"COL_RED" %s %s has slapped %s",GetAdminName(playerid),PlayerName(playerid),PlayerName(targetid)); SendMessageToAllAdmins(string,-1); } } else { SendClientMessage(playerid,-1,"*"COL_RED" You do not have the right admin permissions for this command!"); } return 1; }