help me with command
#1

I make my command givelp in strcmp but it didn't work.Every time when i use it i get message "USAGE: /givelp [LP]".This is the code:
pawn Код:
if(strcmp(cmd, "/givelp", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_WHITE, "USAGE: /givelp [LP]");
                return 1;
            }
            new exp;
            exp = strval(tmp);
            if (PlayerInfo[playerid][pAdmin] >= 4 || IsPlayerAdmin(playerid))
            {
                    for(new i = 0; i < MAX_PLAYERS; i++)
                    {
                        GetPlayerName(playerid, giveplayer, sizeof(giveplayer));
                        PlayerInfo[i][Exp] += exp;
                        format(string, sizeof(string), "%s give to all players %d LP", PlayerName(playerid), exp);
                        SendClientMessageToAll(COLOR_LIGHTBLUE, string);
                    }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "You didn't have admin rights!");
            }
        }
        return 1;
    }
Reply


Messages In This Thread
help me with command - by Hugoca - 30.11.2012, 10:44
Re: help me with command - by XtremeR - 30.11.2012, 10:51
Re: help me with command - by Hugoca - 30.11.2012, 10:56
Re: help me with command - by Hugoca - 30.11.2012, 12:44
Re: help me with command - by Hugoca - 30.11.2012, 14:57
Re: help me with command - by Mmartin - 30.11.2012, 15:34
Re: help me with command - by Hugoca - 30.11.2012, 15:39
Re: help me with command - by Mmartin - 30.11.2012, 15:50
Re: help me with command - by Hugoca - 30.11.2012, 16:01

Forum Jump:


Users browsing this thread: 2 Guest(s)