zcmd setadmin command brokeee. D:
#1

pawn Code:
CMD:setadmin(playerid, params[])
{
new victimname[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], admlvl, id;
if(GetPVarInt(playerid, "Level") == 1)
{
if (sscanf(params, "ui", id, admlvl)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /setadmin [id] [adminlevel]");
if (id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "This player is not connected");
if (admlvl > 3 || admlvl < 0) return SendClientMessage(playerid, COLOR_RED,"Invalid level");
SetPVarInt(id, "Level") = admlvl;// this line here is the fuckup
GetPlayerName(id, victimname, sizeof(victimname));
GetPlayerName(playerid, adminname, sizeof(adminname));
new stri[128];
format(stri,128,"AdmWarn: %s [ID %d] has set %s [ID %d] admin level to %i",adminname, playerid, victimname, id, admlvl);
SendClientMessageToAll(COLOR_GREEN,str);
return 1;
}else return SendClientMessage(playerid,COLOR_RED,"  You arent the level!");}
Ok so, trying to set the level to a PVar but its confusing, any idea how?
Reply


Messages In This Thread
zcmd setadmin command brokeee. D: - by -Rebel Son- - 18.03.2011, 03:51
Re: zcmd setadmin command brokeee. D: - by Haydz - 18.03.2011, 03:54
Re: zcmd setadmin command brokeee. D: - by [L3th4l] - 18.03.2011, 03:55
Re: zcmd setadmin command brokeee. D: - by Tee - 18.03.2011, 03:56
Re: zcmd setadmin command brokeee. D: - by -Rebel Son- - 18.03.2011, 03:57

Forum Jump:


Users browsing this thread: 1 Guest(s)