SA-MP Forums Archive
Need help guyz - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Need help guyz (/showthread.php?tid=262889)



Need help guyz - MBX97 - 19.06.2011

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


Re: Need help guyz - Markx - 19.06.2011

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


Re: Need help guyz - Ehab1911 - 19.06.2011

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


Re: Need help guyz - MBX97 - 20.06.2011

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