19.10.2010, 09:20
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.
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
But it doesnt show anything at all in game to anyone,so does anyone have any idea's 
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);}
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);}}}

fubar