4 errors in one line ,need help
#4

Your whole command wouldn't work, there was mistake that you were using your variable to get player name, missing one colon at line, and you were setting the army thing for yourself. Re-made the command.

pawn Код:
cmd(army, playerid, params[])
{
    if(pInfo[playerid][Adminlevel] >= 5)
        return SendClientMessage(playerid, -1, "Not Authorized.");
       
    new string[128], giveplayerid, giveplayer[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
   
    if(sscanf(params, "u", giveplayerid))
        return SendClientMessage(playerid, COLOR_RED, "Usage: /army (player <id>)");
       
        if(giveplayerid == INVALID_PLAYER_ID)
        return SendClientMessage(playerid, COLOR_RED, "Usage: /army (player <id>)");
       
    if(GetPVarInt(playerid, "ArmyPermission") == 1337)
        return SendClientMessage(playerid, COLOR_RED, "That player already have army stats!! .");
       
    GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));   
   
    format(string, sizeof(str), "[ARMY NEWS] Server Admin %s has made %s a member of the Army!", PlayerName, giveplayer);
    SendClientMessageToAll(COLOR_PURPLE, string);
    SendAdminMessage(string);
    CNR_PrintString(string);
   
    SendClientMessage(giveplayerid, COLOR_PURPLE, "You are now able to play as Los Santos Army. Be sure to stick with rules or your army stats will be taken.");
    SetPVarInt(giveplayerid, "ArmyPermission", 1337);
    return true;
}
Reply


Messages In This Thread
4 errors in one line ,need help - by iThePunisher - 22.12.2013, 06:20
Re: 4 errors in one line ,need help - by TahaAsif12 - 22.12.2013, 06:28
Re: 4 errors in one line ,need help - by Sublime - 22.12.2013, 06:29
Re: 4 errors in one line ,need help - by iZN - 22.12.2013, 06:31
Re: 4 errors in one line ,need help - by iThePunisher - 22.12.2013, 06:43
Re: 4 errors in one line ,need help - by iThePunisher - 22.12.2013, 07:09
Re: 4 errors in one line ,need help - by erminpr0 - 22.12.2013, 13:21

Forum Jump:


Users browsing this thread: 1 Guest(s)