making include to normal code
#1

So..I wanna this include to make it code that i can use directly in my GM.

Код:
#include <a_samp>
#include <a_http>
 
new _P_SERVERIP[20];
stock GetServerIP() return _P_SERVERIP;
        public OnGameModeInit()
        {
                HTTP(0,HTTP_GET,"www.ipchicken.com/","","OnServerGetIP");
                return (funcidx("GSIP_OnGameModeInit") != -1)?CallLocalFunction("GSIP_OnGameModeInit",""):1;
        }
        #if defined _ALS_OnGameModeInit
                #undef OnGameModeInit
        #else
                #define _ALS_OnGameModeInit
        #endif
        #define OnGameModeInit GSIP_OnGameModeInit
        forward GSIP_OnGameModeInit();
		
forward OnServerGetIP(index, response_code, data[]);
public OnServerGetIP(index, response_code, data[])
{      
        if(response_code == 200)
        {
                strmid(_P_SERVERIP,data,1550,1570,1570);
				printf("Server IP is %s",_P_SERVERIP);
        }
        return 1;
}
Reply


Messages In This Thread
making include to normal code - by MrTinder - 06.02.2014, 14:43
Re: making include to normal code - by ACI - 06.02.2014, 15:03
Re: making include to normal code - by MrTinder - 06.02.2014, 15:07
Re: making include to normal code - by ACI - 06.02.2014, 15:09
Re: making include to normal code - by MrTinder - 06.02.2014, 15:12
Re: making include to normal code - by MrTinder - 06.02.2014, 15:54
Re: making include to normal code - by PowerPC603 - 06.02.2014, 16:09
Re: making include to normal code - by MrTinder - 06.02.2014, 16:11
Re: making include to normal code - by ACI - 06.02.2014, 17:09
Re: making include to normal code - by MrTinder - 06.02.2014, 17:18

Forum Jump:


Users browsing this thread: 1 Guest(s)