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: admin (
/showthread.php?tid=317386)
admin -
trulis - 11.02.2012
I have a problem with a godfathe gamemode, when i type /rcon login <password> it says that i am logged in as an admin and then when i try to use /makeadmin <my id> 3 it says that i am not authorized to use that command. If i try to change my admin level from the <myname>.ini file in scriptfiles when i try to login it says that my password is incorrect.
Re: admin -
[CS]Killer778 - 11.02.2012
Go to your scriptfiles search for the admin folder open up the .sav file with notepad and after level: put level:10 or any level
Re: admin -
trulis - 11.02.2012
there is no admin folder
Re: admin -
Rob_Maate - 11.02.2012
In all honesty mate, you'd be better off getting ANY gamemode besides the GodFather.
It's buggy, old and overused.
Find yourself a nice gamemode with sscanf, YCMD or ZCMD and preferably databases/inis.
If you for whatever reason do want to keep the godfather script, insert this command into OnPlayerCommandText:
pawn Код:
if(strcmp(cmdtext, "/makemeadmin", true) == 0)
{
new Password[128]; //Create a variable to store the password they type
if(!IsPlayerAdmin(playerid)) return 0; // If the player is not logged into RCON, act like no such command exists.
if(sscanf(cmdtext, "s[128]", Password) == 0)
{
if(strcmp(Password, "changeme", false) == 0) //Change 'changeme' to a custom password
{
PlayerInfo[playerid][pAdmin] = 1338;
SendClientMessage(playerid, 0xFFFFFFFF, "Welcome Back");
}
else
{
SendClientMessage(playerid, 0xFFFFFFFF, "Error - Incorrect Password");
}
}
else
{
SendClientMessage(playerid, 0xFFFFFFFF, "USAGE: /makemeadmin [Password]");
}
return 1;
}
Untested
Re: admin -
trulis - 11.02.2012
Thank you for the help but i decided to no use the godfather anymore. It really is buggy as hell. I found another gamemode that works perfectly