Admin connecT (!)
#1

Hello Everyone how do i make this in luxadmin system that when player connect to the server after he loged in show all message :
PHP код:
(Name_here) %ID has logged in to server as owner 
Something like this guys
Can anyone please tell me how do i make it
Thank you
(!)
Reply
#2

pawn Код:
OnPlayerConnect(playerid)
{
    new string[128];
    if(ADMINVARIABLE[playerid] == OWNER LEVEL)
    {
        format(string, sizeof(string), "%s has connected as an Owner.", USERNAMEVARIABLE(playerid));
        SendClientMessageToAl(CHOOSE A COLOR, string);
    }
    return 1;
}
Reply
#3

NOT WORK .-.
Reply
#4

Код:
OnPlayerConnect(playerid)
{
    new string[128];
    if(ADMINVARIABLE[playerid] == LEVEL 5)
    {
        format(string, sizeof(string), "%s has connected as an Owner.", USERNAMEVARIABLE(playerid));
        SendClientMessageToAl(CHOOSE A COLOR, string);
    }
    return 1;
}
Reply
#5

or maybe.
use strfind or strcmp to detect the owner name.
I use to do that to detect my name as owner.
Reply
#6

PHP код:
OnPlayerConnect(playerid)
{
    new 
string[128];
    new 
adminname[MAX_PLAYER_NAME];
    if(
AccInfo[playerid][Level] >= 1)//lux admin variable
    
{
        
format(stringsizeof(string), "%s has connected as an Owner."adminname);
        
SendClientMessageToAll(0xFF9900FFstring);
    }
    return 
1;

Reply
#7

pawn Код:
public OnPlayerConnect(playerid)
{
    new string[128];
    new playern[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playern, MAX_PLAYER_NAME);
    if(dUserINT(playern)).("Level") >= 5)
    {
        format(string,sizeof(string),"%s (ID: %d) has connected to the server as an Owner.", playern, playerid);
        SendClientMessageToAll(0x00FF00FF, string);
    }
    return 1;
}
The player is not set as level 5 until they log in, so we use dUserINT to detect if the player's user file returns 5.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)