19.06.2011, 19:03
Hey guyz i've A Huge problem and to be short
this is the code
and this is the stupid Error:
Please fix it cuz i can't
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;
}
pawn Код:
AdminSystem.pwn(223) : error 017: undefined symbol "ReturnUser"