strock GetIP(playerid)
#1

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")
Reply
#2

strcmp
Reply
#3

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!"
Reply
#4

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.
Reply
#5

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? ^^

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


Forum Jump:


Users browsing this thread: 1 Guest(s)