Need help guyz
#1

Hey guyz i've A Huge problem and to be short
this is the code
pawn Код:
if(strcmp(cmdtext, "/setadmin", true) == 0 || strcmp(cmdtext, "/makeadmin", true) == 0)
    {
        new player[MAX_PLAYER_NAME];
        if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xff0000ff, "Need to be \"RCON\" to do this cmd");
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setadmin or /makeadmin [playerid] [AdminLevel]");
        giveplayerid = ReturnUser(tmp);
        tmp = strtok(cmdtext, idx);
        new level = strval(tmp);
        if(giveplayerid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_WHITE, "Invalid Player ID.");
        GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
        GetPlayerName(playerid, player, sizeof(player));
        PlayerInfo[giveplayerid][pAdminLevel] = level;
        printf("Admin %s made %s a level %d admin.", player, giveplayer, level);
        format(string, sizeof(string), "Admin \"%s\" has set your Admin Level to %d.",player, level);
        SendClientMessage(giveplayerid, COLOR_GREEN, string);
        format(string, sizeof(string), "You have given \"%s\" level %d admin.", giveplayer, PlayerInfo[giveplayerid][pAdminLevel]);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
        return 1;
    }
and this is the stupid Error:
pawn Код:
AdminSystem.pwn(223) : error 017: undefined symbol "ReturnUser"
Please fix it cuz i can't
Reply
#2

you need stock ReturnUser(playerid) i guess, also i would suggest you swiching to sscanf, its faster and easyer!
Reply
#3

I am not sure but try to put this on the top of the script

pawn Код:
#define ReturnUser
Sorry for this noobish thinking, but try :S
Reply
#4

well thanks for helping but where is the stock to put ?
anyway STILL NEED HELP
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)