Offline Make Admin - 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: Offline Make Admin (
/showthread.php?tid=468191)
Offline Make Admin -
D3vin - 07.10.2013
How would I make the following code into a offline make admin system?
Код:
if(!strcmp(cmdtext[1],"makeadmin",true,9)){
if(!IsPlayerAdmin(playerid)||PlayerInfo[playerid][AdminLevel]<5)return SendClientMessage(playerid,0xFF00FF),"You're not authorized to use that command");
new tmpspace = strfind(cmdtext," ",true,11);
if(!cmdtext[11])return SendClientMessage(playerid,0xFF0000FF,"USAGE: /MakeAdmin <playerid> <admin level>");
if(!cmdtext[tmpspace+1])return SendClientMessage(playerid,0xFF0000FF,"USAGE: /MakeAdmin <playerid> <admin level>");
PlayerInfo[strval(cmdtext[11])][AdminLevel]=strval(cmdtext[tmpspace+1]);
new tmpstring[128]; GetPlayerName(strval(cmdtext[11]),tmpstring,MAX_PLAYER_NAME);
format(tmpstring,128,"You made %s AdminLevel %d",tmpstring,strval(cmdtext[tmpspace+1]));
SendClientMessage(playerid,0xFFFFFFFF,tmpstring);
GetPlayerName(playerid,tmpstring,MAX_PLAYER_NAME);
format(tmpstring,128,"%s made you AdminLevel %d",tmpstring,strval(cmdtext[tmpspace+1]));
return SendClientMessage(strval(cmdtext[11]),0xFFFFFFFF,tmpstring);}
Re: Offline Make Admin -
[ABK]Antonio - 07.10.2013
Save their name in a file or create a file with their name & the level inside. Then all you need to do is, on login set their level to the level in their file and bam you're done. It's not really that difficult. I shouldn't really need to post the code.
Re: Offline Make Admin -
D3vin - 07.10.2013
I mean, how can do this while they are offline and im online? from in game
Re: Offline Make Admin -
[ABK]Antonio - 07.10.2013
Like I just described lol
You could also skip the middle man and directly edit their player file.
Re: Offline Make Admin -
DouglasRamirez - 07.10.2013
He said "While IG" not in the userfiles.
Re: Offline Make Admin -
MAFIAWARS - 07.10.2013
Just Edit their Levels in Users => <TheirFile>. Doesn't need to create a Command for it.
Re: Offline Make Admin -
[ABK]Antonio - 07.10.2013
Quote:
Originally Posted by DouglasRamirez
He said "While IG" not in the userfiles.
|
That's what I said multiple times.