Error 017 : Undefined symbol ''params''
#1

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{

if(!strcmp(cmdtext, "/makeadmin", true))
{
    new player[MAX_PLAYER_NAME], giveplayer[MAX_PLAYER_NAME], level, giveplayerid, string[128];
    if(IsPlayerAdmin(playerid))
    {
        if(!sscanf(params,"ud",giveplayer,level))
        {
            if(giveplayerid != INVALID_PLAYER_ID)
            {
                GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                GetPlayerName(playerid, player, sizeof(player));
                PlayerInfo[giveplayerid][AdminLvl] = level;
                printf("Admin %s made %s a level %d admin.", player, giveplayer, level);
                format(string, sizeof(string), "You are now an administrator level %d thanks to %s.", level,  player);
                SendClientMessage(giveplayerid, 0x00C2ECFF, string);
                format(string, sizeof(string), "You have given %s level %d admin.",  giveplayer,PlayerInfo[giveplayerid][AdminLvl]);
                SendClientMessage(playerid, 0x00C2ECFF, string);
            }
            else
            {
                format(string, sizeof(string), "%i is not an active player.", giveplayerid);
                SendClientMessage(playerid, 0xE60000FF, string);
                return 1;
            }
        }
        else
        {
            SendClientMessage(playerid, Crvena, "USAGE: /makeadmin [playerid] [level]");
            SendClientMessage(playerid, Crvena, "FUNCTION: Player will be an admin.");
            return 1;
        }
    }
    else SendClientMessage(playerid, 0xE60000FF, "You are not a lead admin!");
    return 1;
}

return SendClientMesage(playerid, 0xFF9900AA, "Command does not exist use /help");
}
Thats my command.

Код:
error 017: undefined symbol "params"
Help.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 5 Guest(s)