/slap command help
#1

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;
}
Reply


Messages In This Thread
/slap command help - by MichaelWharton101 - 10.04.2013, 23:30
Re: /slap command help - by Scenario - 10.04.2013, 23:31
Re: /slap command help - by MichaelWharton101 - 10.04.2013, 23:33
Re: /slap command help - by iJumbo - 10.04.2013, 23:34
Re: /slap command help - by Pottus - 10.04.2013, 23:35
Re: /slap command help - by iJumbo - 10.04.2013, 23:46
Re: /slap command help - by Scenario - 10.04.2013, 23:59
Re: /slap command help - by iJumbo - 11.04.2013, 00:01
Re: /slap command help - by Pottus - 11.04.2013, 00:04
Re: /slap command help - by MichaelWharton101 - 11.04.2013, 00:04

Forum Jump:


Users browsing this thread: 2 Guest(s)