/Setlevel Command - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: /Setlevel Command (
/showthread.php?tid=376496)
/Setlevel Command -
California_ - 10.09.2012
Okay I been working on my admin system, due to alot of ABUSIVE head admins, I want to make /setlevel only for RCON admins.
This is my code
pawn Код:
dcmd_setlevel(playerid,params[]) {
if(PlayerInfo[playerid][LoggedIn] == 1) {
if(PlayerInfo[playerid][Level] >= 5 || IsPlayerAdmin(playerid)) {
new tmp[256], tmp2[256], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index);
if(!strlen(params)) return SendClientMessage(playerid, red, "USAGE: /setlevel [playerid] [level]");
new player1, level, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
player1 = strval(tmp);
if(!strlen(tmp2)) return SendClientMessage(playerid, red, "USAGE: /setlevel [playerid] [level]");
level = strval(tmp2);
I need to change the
pawn Код:
if(PlayerInfo[playerid][Level] >= 5 || IsPlayerAdmin(playerid)) {
But when i remove the if(PlayerInfo[playerid][Level] >= 5 then it has errors please Help me!
Re: /Setlevel Command | WILL +REP -
UnknownGamer - 10.09.2012
What are you trying to change it to?
Re: /Setlevel Command | WILL +REP -
Biess - 10.09.2012
Quote:
Originally Posted by UnknownGamer
What are you trying to change it to?
|
Read it... that only rcon admins can use it.
Re: /Setlevel Command | WILL +REP -
vIBIENNYx - 10.09.2012
if(IsPlayerAdmin(playerid))
Re: /Setlevel Command | WILL +REP -
California_ - 10.09.2012
THANKS vIBIENNY