SA-MP Forums Archive
Doesn't load the ip properly - 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: Doesn't load the ip properly (/showthread.php?tid=610728)



Doesn't load the ip properly - justjamie - 27.06.2016

Hello.
with this code, the ip doesn't get loaded properly.
No idea what the heck is going on.
Someone mind taking a look into it?

Thanks already.

PHP код:
forward loadDataQuicklogin(playerid);
    public 
loadDataQuicklogin(playerid)
    {
    
myStrcpy(Player[playerid][ip1337], Ip(playerid));
    new 
pserial[150];
    
gpci(playeridpserialsizeof(pserial));
    
myStrcpy(Player[playerid][gpci1337], pserial);
    
printf("%s = user ip. %s = db id.",Ip(playerid),cache_get_field_content_int(0"regip"));
    if(
Player[playerid][ip1337] == cache_get_field_content_int(0"regip") && Player[playerid][gpci1337] == cache_get_field_content_int(0"reggpci"))
    {
         return 
1;
        }
stock Ip(playerid) {
    new 
ip[25]; GetPlayerIp(playeridip25);
    return 
ip;




Re: Doesn't load the ip properly - justjamie - 27.06.2016

fixed - i wanted to load it as an integer instead of a string.

stupid me. lol