Help me please in ip
#1

PHP код:
if(strcmp(IPdatatrue) != "127.0.0.1"SendRconCommand("exit"); 
Error:
PHP код:
error 033: array must be indexed (variable "-unknown-"
Reply
#2

you can't compare a string to a function that returns an integer.

You can use something like this:

pawn Код:
if(strcmp(IP, "127.0.0.1", true) != 0) // if IP wasn't 127.0.0.1
    SendRconCommand("exit"); // Runs "exit"
where strcmp returns 0 if comparison succeeded.

More Info: https://sampwiki.blast.hk/wiki/Strcmp
Reply
#3

Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)