13.09.2009, 07:39
scratch what I said before lol the problem lies in my makeadmin command.
Now this is NOT my coding and am not use to dcmd, so there in lies my problem. I realize the " SendClientMessageToAll(COLOR_YELLOW, str); AdminLvl = PlayerInfo[giveplayerid][pAdmin]; }" is not correct. Any suggestions on fixing this command to make to make it work properly?
Код:
dcmd_makeadmin(playerid, params[])
{
new str[128], AdminLvl[128];
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] == 0) return SystemMsg (playerid, "You must be a admin to use this command!");
new giveplayerid = ReturnUser(params);
if(sscanf(params, "us", giveplayerid, AdminLvl)) return SystemMsg(playerid, " Usage : /makeadmin [playerid / name] [admin level]");
if(!IsPlayerConnected(giveplayerid)) return SystemMsg(playerid, "That player is not connected!");
else
{
format(str, sizeof(str), "ADMIN %s has made %s level %d admin", PlayerName(playerid), PlayerName(giveplayerid), AdminLvl);
SendClientMessageToAll(COLOR_YELLOW, str); AdminLvl = PlayerInfo[giveplayerid][pAdmin]; }
}
return 1;
}

