if(AccountInfo[playerid][AdminLevel] >= 1337 || IsPlayerAdmin(playerid)//change AccountInfo[playerid][AdminLevel] to the vriable u got of the adminscript.
if(strcmp(cmd, "/makeadmin", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /makeadmin [playerid/PartOfName] [level(1-3)]");
return 1;
}
new para1;
new level;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
level = strval(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1338 || IsPlayerAdmin(playerid))
{
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pAdmin] = level;
printf("AdmCmd: %s has promoted %s to a level %d admin.", sendername, giveplayer, level);
format(string, sizeof(string), " You have been promoted to a level %d admin by %s", level, sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), " You have promoted %s to a level %d admin.", giveplayer,level);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
SetPlayerColor(giveplayerid,TEAM_HIT_COLOR);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
}
}
return 1;
}
C:\Users\Seva\Downloads\JimmA1.pwn(2708) : warning 204: symbol is assigned a value that is never used: "string3" C:\Users\Seva\Downloads\JimmA1.pwn(21448) : error 017: undefined symbol "AccountInfo" C:\Users\Seva\Downloads\JimmA1.pwn(21448) : warning 215: expression has no effect C:\Users\Seva\Downloads\JimmA1.pwn(21448) : error 001: expected token: ";", but found "]" C:\Users\Seva\Downloads\JimmA1.pwn(21448) : error 029: invalid expression, assumed zero C:\Users\Seva\Downloads\JimmA1.pwn(21448) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
Originally Posted by Seva
It's still not working to make my admin. I login with my rcon password, but if i wanna do /makeadmin, the server say that i not authorized are. And it's the correct password, because the server say it's correct. What now ?
|