Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*Credits: Michael & SAMP Forum*/
- #include <a_samp>
- #include <a_http>
- public OnPlayerConnect(playerid)
- {
- new string[128],IP[16];
- GetPlayerIp(playerid,IP,sizeof(IP));
- if(strlen(IP)<1) return 1;
- format(string, sizeof(string),"geoip.cybernieve.com/?IP=%s",IP);
- HTTP(playerid, HTTP_GET, string,"","IPPROVJERA");
- return 1;
- }
- forward IPPROVJERA(playerid, rsc, loc[]);
- public IPPROVJERA(playerid, rsc, loc[])
- {
- new string[128];
- if(rsc== 200)
- {
- new pNick[64];
- GetPlayerName(playerid,pNick,sizeof(pNick));
- format(string, sizeof(string), " %s se spojio na server iz: %s",pNick,loc);
- SendClientMessageToAll(-1,string);
- return 1;
- }
- else
- {
- return 0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement