05.08.2016, 20:36
Hey, finally got my server to run but can't set myself an admin, even if I log into rcon. There are no userfiles getting saved and I can't find them in my mysql database aswell, it's all poorly set up with the mysql database and I'm just looking forward to furnish a little on that RP server.
Could someone make this command public for me? Like, anyone can type it and make someone/himself an admin.
Could someone make this command public for me? Like, anyone can type it and make someone/himself an admin.
Код:
COMMAND:makeadmin(playerid, params[])
{
if(GetPVarInt(playerid, "Admin") < 9) return nal(playerid);
new id, lvl, str[128];
if(sscanf(params, "ud", id, lvl)) return usage(playerid, "/makeadmin [Player] [Level]");
if(GetPVarInt(playerid, "Admin") < GetPVarInt(id, "Admin")) return nal(playerid);
if(GetPVarInt(playerid, "Admin") < lvl) return nal(playerid);
if(lvl < 0 || lvl > 10) return error(playerid, "Invalid admin lvl.");
SetPVarInt(id, "Admin", lvl);
format(str, sizeof(str), "You have set (%s) to admin level (%d).", PlayerName(id), lvl);
SCM(playerid, -1, str);
return 1;
}



: error 076: syntax error in the expression, or invalid function call