admin
#4

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
Reply


Messages In This Thread
admin - by trulis - 11.02.2012, 08:58
Re: admin - by [CS]Killer778 - 11.02.2012, 10:38
Re: admin - by trulis - 11.02.2012, 10:53
Re: admin - by Rob_Maate - 11.02.2012, 11:16
Re: admin - by trulis - 11.02.2012, 12:04

Forum Jump:


Users browsing this thread: 1 Guest(s)