Help please - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help please (
/showthread.php?tid=374832)
Help please -
Tass007 - 04.09.2012
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?
Re: Help please -
Deal-or-die - 04.09.2012
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.
Re: Help please -
Tass007 - 04.09.2012
Nope i get errors and warnings
Re: Help please -
MarkoN - 04.09.2012
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);
Re: Help please -
Tass007 - 04.09.2012
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);
}