SA-MP Forums Archive
[DUDA] Por quй no sirve, verificar IP.. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: [DUDA] Por quй no sirve, verificar IP.. (/showthread.php?tid=444216)



[DUDA] Por quй no sirve, verificar IP.. - xDarkuzSx - 15.06.2013

Ayuda por que no me sirve este
es un sistema de baneo mediante MySQL que hize yo... bueno les dejo el cуdigo:

pawn Код:
new uIP[50];
GetPlayerIp(playerid,uIP,sizeof(uIP));
if(!strcmp( uIP, bIP[playerid], true,strlen(uIP)))//verifica si las IP's son iguales, no funciona xd.
{
//funcion q hara si las ips fueron exactamente iguales.. pero no funciona D':
}
asi defino bIP:
pawn Код:
new bIP[MAX_PLAYERS][30];
asi seteo la variable bIP[playerid]
pawn Код:
mysql_fetch_field_row(SQL_STR, "bIP");
//---
strmid(bIP[playerid], SQL_STR, 0, strlen(SQL_STR)); // <-- guarda IP, si la guarda bien ya la pobre.
їSaben por quй no sirve al verificar? :C
si alguien sabe como hacerlo me podria decir como?


Respuesta: [DUDA] Por quй no sirve, verificar IP.. - Dreyfuz - 15.06.2013

if(strcmp( uIP, bIP[playerid], true) = 0)


Respuesta: [DUDA] Por quй no sirve, verificar IP.. - Zume - 16.06.2013

Si haces ese if para que luego cree una funciуn si son iguales las ip debes quitar el ! porque estбs declarando con el "!" un no.