[Duda] Diferencia
#6

No, lo que yo te di es la definicion de una funcion.

Su forma de uso es la siguiente:

pawn Код:
//Donde lo necesites:
if(IsPlayerInArea(playerid, 1740.234375, 2859.375, 1792.96875, 2783.203125))
{
    //Aqui realizas la accion, ya que el jugador estara dentro del area indicada.
}

//Fuera de cualquier callback y/o funcion
stock IsPlayerInArea(playerid, Float:minX, Float:minY, Float:maxX, Float:maxY)
{
    if(!IsPlayerConnected(playerid))
        return 0;
    new Float:P[3];
    GetPlayerPos(playerid, P[0], P[1], P[2]);
    if((maxX-P[0]) >= 0 && (P[0]-minX) >= 0 && (maxY-P[1]) >= 0 && (P[1]-minY) >= 0)
        return 1;
    return 0;
}
Reply


Messages In This Thread
[Duda] Diferencia - by VodKa' - 10.09.2012, 15:18
Respuesta: [Duda] Diferencia - by TheChaoz - 10.09.2012, 15:24
Respuesta: [Duda] Diferencia - by spell - 10.09.2012, 15:25
Respuesta: [Duda] Diferencia - by TheChaoz - 10.09.2012, 15:30
Re: [Duda] Diferencia - by VodKa' - 10.09.2012, 15:38
Respuesta: [Duda] Diferencia - by TheChaoz - 10.09.2012, 15:45
Re: [Duda] Diferencia - by VodKa' - 10.09.2012, 16:32
Respuesta: [Duda] Diferencia - by TheChaoz - 10.09.2012, 16:35
Re: [Duda] Diferencia - by VodKa' - 10.09.2012, 16:44
Respuesta: Re: [Duda] Diferencia - by TheChaoz - 10.09.2012, 16:51

Forum Jump:


Users browsing this thread: 1 Guest(s)