message on rcon login
#1

Hey,

It's me again.

Now i want to make a command for the rcon login.
so if the player loggs in with /rcon login <password> and the password is right, he should get full armour and a message should be sent to all the other players.

but anyway it wont work.

Here my code:

pawn Код:
CMD:rcon(playerid, params[])
{
    if (!strcmp(params[0], "login", true))
    {
        if (!strcmp(params[1], "login", true))
        {
            if (IsPlayerAdmin(playerid) == 0)
            {
                new string[256],pname[56];
           
                SetPlayerHealth(playerid, 100);
                SetPlayerArmour(playerid, 100);
           
                GetPlayerName(playerid, pname, sizeof(pname));
                format(string, sizeof(string), "*** %s hat sich als Admin angemeldet.", pname);
                SendClientMessageToAll(ORANGE, string);
            }
            else
            {
                SendClientMessage(playerid, RED, "SERVER: Du bist bereits als Admin eingeloggt");
            }
        }
        else
        {
            SendClientMessage(playerid, RED, "SERVER: Falsches Passwort");
        }
    }
    else
    {
   
    }
    return 1;
}
maybe you can help me
Reply
#2

You need to use this callback:

https://sampwiki.blast.hk/wiki/OnRconLoginAttempt
Reply
#3

okay thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)