10.04.2013, 23:30
I have a code for '/slap [id] [height]' but it will not slap the player into the air at all... I am not good at trying to explain this but if you could look at the code and help me fix this.
Код:
CMD:slap(playerid,params[]) { new string[128], playerb, height; if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command."); if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); if(PlayerInfo[playerid][pAdmin] < PlayerInfo[playerb][pAdmin]) return SendClientMessage(playerid, COLOR_GREY, "Player has a higher admin level than you."); if(!IsPlayerLoggedIn(playerb)) return SendClientMessage(playerid, COLOR_GREY, "Invalid player id."); if(sscanf(params, "u", playerb)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /slap [playerid] [height]"); new Float:pos[3]; GetPlayerPos(playerb,pos[0],pos[1],pos[2]); SetPlayerPos(playerb,pos[0],pos[1],pos[2]+height); format(string,sizeof(string),"AdmWarn: %s has slapped %s(%d)", RPN(playerid), RPN(playerid), height); SendAdminMessage(COLOR_LIGHTRED, 1, string); return 1; }