connect messages
#1

Ok i have been working on this but i cant find a solution,it either works one way or not at all,so i decided to ask for help on this.
Code:
    //=====================this works =======================================================================
       if(ServerInfo[ConnectMessages] == 1){
        new Country[128];
        new pAKA[256];
        pAKA = dini_Get("ladmin/Config/aka.txt",tmp3);
        GetPlayerCountry(playerid,Country);
        new mess[128],IP[128];
        GetPlayerIp(playerid,IP,sizeof(IP));
        format(mess,sizeof(mess),"%s has joined the server.  [ Country: %s | IP Address: %s | Ping: %i ]",PlayerName,Country,IP,GetPlayerPing(playerid));
        printf(mess);
        format(mess,sizeof(mess),"%s Also Known As: %s ", PlayerName, pAKA);
        printf(mess);
        
        format(string, sizeof(string), "^^^ %s [Id:%d] has joined the server.(%s) ^^^", PlayerName, playerid, Country);
        SendClientMessageToAll(COLOR_GREY, string);}
So this works ok and shows on the server log,but i wanted it to show to admins in game,so i have sort of come up with this

Code:
    if(ServerInfo[ConnectMessages] == 1){
        new Country[128];
        new pAKA[256];
        new str[128];
        pAKA = dini_Get("ladmin/Config/aka.txt",tmp3);
        GetPlayerCountry(playerid,Country);
        new mess[128],IP[128];
        GetPlayerIp(playerid,IP,sizeof(IP));
        format(mess,sizeof(mess),"%s [Id:%d] has joined the server.  [ Country: %s | IP Address: %s | Ping: %i ]", PlayerName, playerid, Country, IP, GetPlayerPing(playerid));
        printf(mess);
        format(mess,sizeof(mess),"%s Also Known As: %s ", PlayerName, pAKA);
        printf(mess);

         for(new i = 0; i < MAX_PLAYERS; i++)
        if(IsPlayerConnected(i) && playerid != i){
        if(PlayerInfo[playerid][Level] >2)
        format(string,sizeof(string),"%s [Id:%d] has joined the server.  [ Country: %s | IP Address: %s | Ping: %i ]", PlayerName, playerid, Country, IP, GetPlayerPing(playerid));
        SendClientMessage(i,grey,string);
        format(string,sizeof(string),"%s Also Known As: %s ", PlayerName, pAKA);
        SendClientMessage(i,grey,string);
        else {
        format(string, sizeof(string), "^^^ %s [Id:%d] has joined the server.(%s) ^^^", PlayerName, playerid, Country);
        SendClientMessageToAll(COLOR_GREY, string);}}}
But it doesnt show anything at all in game to anyone,so does anyone have any idea's

fubar
Reply


Messages In This Thread
connect messages - by fubar - 19.10.2010, 09:20
Re: connect messages - by Mike_Peterson - 19.10.2010, 09:52
Re: connect messages - by fubar - 19.10.2010, 10:27
Re: connect messages - by Mike_Peterson - 19.10.2010, 10:35
Re: connect messages - by fubar - 19.10.2010, 12:03
Re: connect messages - by fubar - 19.10.2010, 16:52
Re: connect messages - by Mike_Peterson - 19.10.2010, 17:16
Re: connect messages - by fubar - 22.10.2010, 15:35

Forum Jump:


Users browsing this thread: 1 Guest(s)