Help please
#1

If i want to turn
pawn Код:
format(string,128, "[Player]: %s has joined the server.(Aka: %s)",PlayerName, dini_Get("ladmin/Config/aka.txt",tmp3));
    for(new i = 0; i < GetMaxPlayers(); i++) if(IsPlayerConnected(i) && playerid != i) SendClientMessage(i,grey,string);
this into
pawn Код:
new mess[128],IP[128];
        GetPlayerIp(playerid,IP,sizeof(IP));
        format(mess,sizeof(mess),"%s has joined the server.  [ Country: %s | IP Address: %s ]",PlayerName,Country,IP);
        printf(mess);
        format(string, sizeof(string), "^^^ %s [Id:%d] has joined the server.(%s) ^^^", PlayerName, playerid, Country);
        SendClientMessageToAll(COLOR_GREY, string);}
How would i do it?
Reply
#2

pawn Код:
new mess[128],IP[128];
        GetPlayerIp(playerid,IP,sizeof(IP));
        format(mess,sizeof(mess),"%s has joined the server(Aka: %s).  [ Country: %s | IP Address: %s ]",PlayerName, dini_Get("ladmin/Config/aka.txt"Country,IP);
        printf(mess);
        format(string, sizeof(string), "^^^ %s [Id:%d] has joined the server.(%s) ^^^", PlayerName, playerid, Country);
        SendClientMessageToAll(COLOR_GREY, string);}
I am pretty sure.
Reply
#3

Nope i get errors and warnings
Reply
#4

try like this
pawn Код:
new msgs[256],IP[16], string[256];
GetPlayerIp(playerid,IP,sizeof(IP));
format(msgs,sizeof(msgs),"%s(AKA : %s)  has joined the server.  [ Country: %s | IP Address: %s ]",dini_Get("ladmin/Config/aka.txt",tmp3),PlayerName,Country,IP);
printf(msgs);
format(string, sizeof(string), "^^^ %s [Id:%d] has joined the server.(%s) ^^^", PlayerName, playerid, Country);
SendClientMessageToAll(COLOR_GREY, string);
Reply
#5

Awesome it worked i just need to test it +1 Rep.. Thanks


EDIT: i tested it and it didn't work but here is my new code that 100% works

pawn Код:
if(ServerInfo[ConnectMessages] == 1)
    {
        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,GetPlayerCountryName(playerid),IP,GetPlayerPing(playerid));
        printf(mess);
        format(string, sizeof(string), "%s [Id:%d] has joined Party Rock Paradise please welcome them.  [ Country: %s | IP Address: %s | Ping: %i ]",PlayerName, playerid, GetPlayerCountryName(playerid),IP,GetPlayerPing(playerid));
        SendClientMessageToAll(COLOR_GREY, string);
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)