How it's made ?!
#2

pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{
    if(success) //If the password was correct
    {
        new originalname[MAX_PLAYER_NAME], string[MAX_PLAYER_NAME]; //Creates the new variables
        GetPlayerName(playerid, originalname, sizeof(originalname)); //Gets current name
        format(string, sizeof(string), "(Admin)%s", originalname); //Adds (Admin) to the front of the name
        SetPlayerName(playerid, string); //Sets the name to the new name
    }
    return 1;
}
Untested, just an example.

Simply states that if the player attempts to log into rcon, and succeeds, it gets his current name and set's his name to (Admin), along with his originalname following it afterwards.

EDIT: Sorry, forgot there was no playerid parameter in here (they should have one)
Reply


Messages In This Thread
How it's made ?! - by x96664 - 16.06.2012, 20:12
Re: How it's made ?! - by Kindred - 16.06.2012, 20:20
Re: How it's made ?! - by x96664 - 16.06.2012, 20:30
Re: How it's made ?! - by ViniBorn - 16.06.2012, 20:35
Re: How it's made ?! - by x96664 - 16.06.2012, 21:01
Re: How it's made ?! - by x96664 - 21.06.2012, 20:42
Re: How it's made ?! - by tyler12 - 21.06.2012, 20:52

Forum Jump:


Users browsing this thread: 1 Guest(s)