Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <geolocation>
- public OnFilterScriptInit() {
- /*new ip[90]; ip = "";
- new country[256], isp[256], city[256];
- new ticks = tickcount();
- GetIPCountry(ip, country);
- printf("Countrys took %d ms", tickcount()-ticks);
- ticks = tickcount();
- GetIPISP(ip, isp);
- printf("ISP took %d ms", tickcount()-ticks);
- ticks = tickcount();
- GetIPCity(ip, city);
- printf("City took %d ms", tickcount()-ticks);
- printf("Result: %s, %s, %s", country, isp, city);
- GetPlayerCountry(0, country, sizeof(country));
- printf(country);*/
- // ^ this stuff is for testing
- return 1;
- }
- public OnPlayerConnect(playerid) {
- new country[256], city[256], isp[256];
- new ticks = tickcount();
- GetPlayerCountry(playerid, country, sizeof(country));
- printf("Countrys took %d ms", tickcount()-ticks);
- ticks = tickcount();
- GetPlayerISP(playerid, isp, sizeof(isp));
- printf("ISP took %d ms", tickcount()-ticks);
- ticks = tickcount();
- GetPlayerCity(playerid, city, sizeof(city));
- printf("City took %d ms", tickcount()-ticks);
- new str[256];
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- format(str, sizeof(str), "%s: {FF3300}%s {FFFFFF}| {1975FF}%s {33CC00}| %s", name, country, isp, city);
- SendClientMessageToAll(-1, str);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement