SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Thread Tools Display Modes
Old 11/06/2019, 11:25 PM   #1
Big Clucker
Ejected's Avatar
Join Date: Jul 2012
Location: United States Discord: ABC#6701
Posts: 155
Reputation: 16
Default How do I lookup an IP using this? +REP PLS

The functions in there only work for playerid, how can I make a new function in this .inc to make it take an ip rather then an ID? (I want to make an cmd that works for offline players, but I can't do this with the playerid functions)

Last edited by Ejected; 12/06/2019 at 12:51 AM.
Ejected is offline   Reply With Quote
Old 12/06/2019, 04:34 AM   #2
Big Clucker
Join Date: Mar 2019
Location: Czech Republic, Prdelákov.
Posts: 123
Reputation: 6
Default Re: How do I lookup an IP using this? +REP

Get the URL where it's sending the req and use it elsewhere.

pawn Code:
CMD:geoip(playerid, params[]){
    new ip[25];
    if(sscanf(params, "s", ip)) return SendClientMessage(playerid, -1, "/geoip (ip)");
    strins(ip, "", 0);
    HTTP(playerid, HTTP_GET, ip, "", "HTTP_OnLookupResponse");
This is just an example!
Koreadars is offline   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Animation Lookup Juvanii General 2 20/08/2018 09:25 PM
[Include] Lookup IP MasterCodez Includes 1 06/11/2017 11:40 AM
[Include] IP Lookup Script Banana_Ghost Includes 19 29/08/2017 01:25 PM
LookUP iLearner Scripting Help 6 15/01/2017 02:21 PM
IP Lookup on irc suni General 5 09/07/2016 04:11 AM

All times are GMT. The time now is 06:13 AM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.