Help with version checking
#1

Hello again, I have script which should kick me when I connect with wrong version but when I connect it doesn't kick me or something like that. My code:
pawn Code:
if(strcmp(version, "0.3.7-R3"))
    {
    SendClientMessage(playerid, -1, "{FF0000}* Your version is wrong!");
    Kick(playerid);
    }
I'm trying to connect with R2
Reply
#2

Code:
if(!strcmp(version, "0.3.7-R3"))
add ! in front of the function to change the statement meaning.
strcmp return value is 0 if the string matches another string.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)