How to make AKA show up on Connect Message?
#1

Hello there!

I've been trying to make the Connect Message give administrators level 3 AKA Information
when a player connects to the server but failed.
I've seen that LuxAdmin got this so I would like to try make it on Lethal Admin but it didnt work very well.............

This is the LuxAdmin Code:

pawn Код:
//==============================================================================
// Connect Messages
//==============================================================================
    if(ServerInfo[ConnectMessages] == 1)
    {
        if (strlen(dini_Get("LuxAdmin/Config/aka.txt",tmp3)) < 3)
        format(str,sizeof(str),"* Player %s (Id:%d[%s]) has joined the server", PlayerName,playerid,GetPlayerCountryName(playerid));
        else if (!strcmp(dini_Get("LuxAdmin/Config/aka.txt",tmp3),PlayerName,true))
        format(str,sizeof(str),"* Player %s (Id:%d[%s]) has joined the server", PlayerName,playerid,GetPlayerCountryName(playerid));
        else format(str,sizeof(str),"Player %s (Id:%d[%s]) has joined the server (Aka: %s)",PlayerName,playerid,GetPlayerCountryName(playerid),dini_Get("LuxAdmin/Config/aka.txt",tmp3));
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i) && playerid != i)
            {
                if(AccInfo[i][Level] > 3)
                    Inter_SendClientMessage(i,grey,str);
                else
                {
                    format(string,sizeof(string),"* Player %s (Id:%d) has joined the server", PlayerName, playerid);
                    Inter_SendClientMessage(i,grey,string);
                }
            }
        }
    }
I tried to simply edit the directories to what ladmin have like this:

pawn Код:
//==============================================================================
// Connect Messages
//==============================================================================
    if(ServerInfo[ConnectMessages] == 1)
    {
        if (strlen(dini_Get("ladmin/config/aka.txt",tmp3)) < 3)
        format(string,sizeof(string),"* Player %s (Id:%d[%s]) has joined the server", PlayerName,playerid,GetPlayerCountryName(playerid));
        else if (!strcmp(dini_Get("ladmin/config/aka.txt",tmp3),PlayerName,true))
        format(string,sizeof(string),"* Player %s (Id:%d[%s]) has joined the server", PlayerName,playerid,GetPlayerCountryName(playerid));
        else format(string,sizeof(string),"Player %s (Id:%d[%s]) has joined the server (Aka: %s)",PlayerName,playerid,GetPlayerCountryName(playerid),dini_Get("ladmin/config/aka.txt",tmp3));
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i) && playerid != i)
            {
                if(PlayerInfo[playerid][Level] >= 3)
                    SendClientMessage(i,grey,string);
                else
                {
                    format(string,sizeof(string),"* Player %s (Id:%d) has joined the server", PlayerName, playerid);
                    SendClientMessage(i,grey,string);
                }
            }
        }
    }
But the only message I get when someone joins the server is the normal one (The one who level 0 admins should see)
"format(string,sizeof(string),"* Player %s (Id:%d) has joined the server", PlayerName, playerid);"

This is the one level 3 admins should see if the player has any other names:
"else format(string,sizeof(string),"Player %s (Id:%d[%s]) has joined the server (Aka: %s)",PlayerName,playerid,GetPlayerCountryName(play erid),dini_Get("ladmin/config/aka.txt",tmp3));"

Please help me to find out how to fix this!
Reply
#2

EDIT:


I Diden't Have much to Read Sorry, but I Read a Little - Because i have to Go.

But Maybe try Doing Somthing like

if(PlayerConnected == 1)
{
if(Adminlevel >= 3)
Send a Client Message of Some Sort to this Certain Player
}
else
{
Send a Client Message of Some Sort to this Certain Player
}

Somthing like That Anyways - I'll Help Properly when i Get Back

Cheers iiKyle

Somthing
Reply
#3

Uh Hi.

Have you tried
pawn Код:
if(PlayerInfo[i][Level] >= 3)
instead of
pawn Код:
if(PlayerInfo[playerid][Level] >= 3)
Reply
#4

Quote:
Originally Posted by Swat123
Посмотреть сообщение
Uh Hi.

Have you tried
pawn Код:
if(PlayerInfo[i][Level] >= 3)
instead of
pawn Код:
if(PlayerInfo[playerid][Level] >= 3)
Nope I just tried it, didn't work :/
Reply
#5

Problem almost solved!
This is my code now:

pawn Код:
//==============================================================================
// Connect Messages
//==============================================================================
    if(ServerInfo[ConnectMessages] == 1)
    {
        format(string,sizeof(string),"Player %s [ID:%d][Country:%s] has joined the server (Aka: %s)",PlayerName,playerid,GetPlayerCountryName(playerid),dini_Get("ladmin/config/aka.txt",tmp3));
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i) && playerid != i)
            {
                if(PlayerInfo[i][Level] >= 2)
                    SendClientMessage(i,grey,string);
                else
                {
                    format(string,sizeof(string),"* Player %s [ID:%d] has joined the server", PlayerName, playerid);
                    SendClientMessage(i,grey,string);
                }
            }
        }
    }
What I want now is to make admins NOT see the (Aka: ) if the players doesnt have any Aka.
If anyone can help that would be perfect, but its good as it is

Edit: Worked good on test server, on main server not. -.-
Reply
#6

Quote:
Originally Posted by OleKristian95
Посмотреть сообщение
Problem almost solved!

What I want now is to make admins NOT see the (Aka: ) if the players doesnt have any Aka.
If anyone can help that would be perfect, but its good as it is

Edit: Worked good on test server, on main server not. -.-
This is my code now:

pawn Код:
//==============================================================================
// Connect Messages
//==============================================================================
    if(ServerInfo[ConnectMessages] == 1)
    {
        format(string,sizeof(string),"Player %s [ID:%d][Country:%s] has joined the server (Aka: %s)",PlayerName,playerid,GetPlayerCountryName(playerid),dini_Get("ladmin/config/aka.txt",tmp3));
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i) && playerid != i)
            {
                if(PlayerInfo[i][Level] >= 2 && PlayerInfo[i][Level] > 0)
                    SendClientMessage(i,grey,string);
                else
                {
                    format(string,sizeof(string),"* Player %s [ID:%d] has joined the server", PlayerName, playerid);
                    SendClientMessage(i,grey,string);
                }
            }
        }
    }
that should work
Reply
#7

I just found out that it works for some of the admins for some not (Most not)
Some info:
He was level 2
Got level 3 but could still see it
We others that was level 3, 8 and 10 couldn't see it

The code:

pawn Код:
//==============================================================================
// Connect Messages
//==============================================================================
    if(ServerInfo[ConnectMessages] == 1)
    {
        format(string,sizeof(string),"Player %s [ID:%d][Country:%s] has joined the server (Aka: %s)",PlayerName,playerid,GetPlayerCountryName(playerid),dini_Get("ladmin/config/aka.txt",tmp3));
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i) && playerid != i)
            {
                if(PlayerInfo[i][Level] >= 2 && PlayerInfo[i][Level] > 0)
                    SendClientMessage(i,grey,string);
                else
                {
                    format(string,sizeof(string),"* Player %s [ID:%d] has joined the server", PlayerName, playerid);
                    SendClientMessage(i,grey,string);
                }
            }
        }
    }
Reply
#8

So only admin level 2 can see it? Then use

pawn Код:
//==============================================================================
// Connect Messages
//==============================================================================
    if(ServerInfo[ConnectMessages] == 1)
    {
        format(string,sizeof(string),"Player %s [ID:%d][Country:%s] has joined the server (Aka: %s)",PlayerName,playerid,GetPlayerCountryName(playerid),dini_Get("ladmin/config/aka.txt",tmp3));
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i) && playerid != i)
            {
                if(PlayerInfo[i][Level] > 2 && PlayerInfo[i][Level] > 0)
                    SendClientMessage(i,grey,string);
                else
                {
                    format(string,sizeof(string),"* Player %s [ID:%d] has joined the server", PlayerName, playerid);
                    SendClientMessage(i,grey,string);
                }
            }
        }
    }
Reply
#9

Quote:
Originally Posted by Kingunit
Посмотреть сообщение
So only admin level 2 can see it? Then use

pawn Код:
//==============================================================================
// Connect Messages
//==============================================================================
    if(ServerInfo[ConnectMessages] == 1)
    {
        format(string,sizeof(string),"Player %s [ID:%d][Country:%s] has joined the server (Aka: %s)",PlayerName,playerid,GetPlayerCountryName(playerid),dini_Get("ladmin/config/aka.txt",tmp3));
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i) && playerid != i)
            {
                if(PlayerInfo[i][Level] > 2 && PlayerInfo[i][Level] > 0)
                    SendClientMessage(i,grey,string);
                else
                {
                    format(string,sizeof(string),"* Player %s [ID:%d] has joined the server", PlayerName, playerid);
                    SendClientMessage(i,grey,string);
                }
            }
        }
    }
Nope didn't work.

It seems to work some times and then it just stops working, now he cant see the connect messages anymore again.
I dont think it has something to do with the level..
Reply
#10

You are testing it alone? Then you don't see it.
Reply
#11

Nou LuxAdmin Comes with a Aka File and it gets all the AKA info from it u need that file then copy the exact LuxAdmin Aka Code and walla it will work (i hope)
Reply
#12

Problem is solved, I found out how to do it myself.
Hope it will work forever now and not only a day or two again.. -.-

Thanks to all of you that tried to help
Reply
#13

How about dropping your solution here so other people can use to to?
Reply
#14

Quote:
Originally Posted by Kingunit
Посмотреть сообщение
How about dropping your solution here so other people can use to to?
It stopped work again, I give up.

It was working the 1st day and then it stopped working again just like the first time.
Reply
#15

Ole this is for satdm
if(strlen(dini_Get("LuxAdmin/Config/aka.txt", tmp3)) == 0) dini_Set("LuxAdmin/Config/aka.txt", tmp3, PlayerName);
else
{
if( strfind( dini_Get("LuxAdmin/Config/aka.txt", tmp3), PlayerName, true) == -1 )
{
new akastring[256];
format(akastring,sizeof(akastring),"%s,%s", dini_Get("LuxAdmin/Config/aka.txt",tmp3), PlayerName);
dini_Set("LuxAdmin/Config/aka.txt", tmp3, akastring);
}
}
//-----------------------------------------
format(string,128, "[Player]: %s has joined the server.(Aka: %s)",PlayerName, dini_Get("LuxAdmin/Config/aka.txt",tmp3));
for(new i = 0; i < GetMaxPlayers(); i++) if(IsPlayerConnected(i) && playerid != i) SendClientMessage(i,grey,string);

change it under ctrl+f if(ServerInfo[Locked] == 1) { that is under this u ll find, just paste and if ur satdm is ladmin make LuxAdmin TO ladmin its works.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)