SA-MP Forums Archive
[Ayuda] Con IsPlayerInArea... - 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: [Ayuda] Con IsPlayerInArea... (/showthread.php?tid=335901)



[Ayuda] Con IsPlayerInArea... - OTACON - 20.04.2012

Buenas a Todos, Estoy utilizando la funcion IsPlayerInArea, me funciona , todo bien, pero a veces me pone en el cliente el error Unknown, solamente en el cliente cierro el server y lo abro otra vez y no tira nada, vuelvo a cerrar el server otra vez y pasa lo mismo, algo debe esta mal en el scripts.

Que puede Ser? y Aclaro solo sucede cuando utilizo la funcion de IsPlayerInArea.

Aca dejo el el codigo ke utilizo:

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/comando", cmdtext, true, 10) == 0)
	{
	        if(!IsPlayerInArea(playerid, x, y,  x, y))
	        {
	     
	        }
                else
	        {
	     
	        }
		return 1;
	}
	return 0;
}
Код:
IsPlayerInArea(playerid, Float:minx, Float:maxx, Float:miny, Float:maxy)
{
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    if (x > minx && x < maxx && y > miny && y < maxy) return 1;
    return 0;
}
Desde Ya Muchas Gracias.


Respuesta: [Ayuda] Con IsPlayerInArea... - OTACON - 20.04.2012

Ya solucione.

Lo Puse en stock al IsPlayerInArea:

Код:
stock IsPlayerInArea(playerid, Float:minx, Float:maxx, Float:miny, Float:maxy)
{
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    if (x > minx && x < maxx && y > miny && y < maxy) return 1;
    return 0;
}
Gracias igual :P xD