11.02.2012, 11:16
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:
Untested
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;
}