SA-MP Forums Archive
strock GetIP(playerid) - 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: strock GetIP(playerid) (/showthread.php?tid=363877)



strock GetIP(playerid) - TheDeath - 28.07.2012

How ti fix this
pawn Код:
stock GetIp(playerid){
new Getip[16];
GetPlayerIp(playerid,Getip,sizeof(Getip));
return Getip;
}
pawn Код:
if(IP[playerid] == GetIp(playerid)){
        if(Logged[playerid] == 0){
        SendMessage(playerid,green,"The server remembered your information, so you don't need to login!" , "Сървъра запази вашата информация, затова няма нужда да се логвате.");
        Logged[playerid] = 1;
        }
Код:
error 033: array must be indexed (variable "GetIp")



Re: strock GetIP(playerid) - Vince - 28.07.2012

strcmp


Re: strock GetIP(playerid) - TheDeath - 28.07.2012

pawn Код:
if(strcmp(IP[playerid],GetIp(playerid))){
        printf("CurrentIP:%s", GetIp(playerid));
        printf("LastSavedIP:%s", IP[playerid]);
        if(Logged[playerid] == 0){
        SendMessage(playerid,green,"The server remembered your information, so you don't need to login!" , "Сървъра запази вашата информация, затова няма нужда да се логвате.");
        Logged[playerid] = 1;
        }
CurrentIP 192.168.1.2
Last Saved 192.158.1.5
And it automaticly logins with "The server remembered your information, so you don't need to login!"


Re: strock GetIP(playerid) - bigcomfycouch - 29.07.2012

pawn Код:
if(!strcmp(IP[playerid],GetIp(playerid))){
    printf("CurrentIP:%s", GetIp(playerid));
    printf("LastSavedIP:%s", IP[playerid]);
    if(Logged[playerid] == 0){
    SendMessage(playerid,green,"The server remembered your information, so you don't need to login!" , "Сървъра запази вашата информация, затова няма нужда да се логвате.");
    Logged[playerid] = 1;
}
Strcmp returns 0 if the strings are the same.


Re: strock GetIP(playerid) - Ranama - 29.07.2012

a little off topic, but what the hell is this language, I've seen it a lot of times but never understand what kind of language it is, using only characters like aoueiycs

Is it Russian? ^^

Сървъра запази вашата информация, затова няма нужда да се логвате.