<geolocation> format does not appear in the chat - 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: <geolocation> format does not appear in the chat (
/showthread.php?tid=601924)
<geolocation> format does not appear in the chat -
FinStar - 28.02.2016
Hello, I have a little problem, I use include application, when connected to a server that lists the information, but does not appear in the chat. as printf shows up in the server log. knows someone advice?
without errors / warnings
Код:
#include <a_samp>
#include <geolocation>
public OnPlayerConnect(playerid)
{
new Country[80], ISP[80], City[80], IP[80];
GetPlayerCountry(playerid, Country);
GetPlayerISP(playerid, ISP);
GetPlayerCity(playerid, City);
new mess[250];
GetPlayerIp(playerid,IP,sizeof(IP));
format(mess,sizeof(mess),"%s has joined the server. [ Country: %s | IP Adresa: %s | ISP: %s | City: %s | GMT: %i ]", GetPlayerName(playerid), Country, IP, ISP, City, GetPlayerGMT(playerid));
printf(mess);
SendClientMessageToAll(-1,mess);
return 1;
}
Re: <geolocation> format does not appear in the chat -
Vince - 28.02.2016
A single chat message can only display 144 characters total. The string itself without any of the parameters is 78 characters. A player's name can be 24 characters. A country name can be 44 characters (South Georgia and the South Sandwich Islands).
78 + 24 + 44= 146. And then I didn't even account for IP, ISP, city and GMT.