little help with isplayerinarea and gangzone
#1

Hello,

I want to easy combine IsPlayerInArea with GangZoneCreate

GangzoneCreate has (Float:minx, Float:miny, Float:maxx, Float:maxy)

so i made my IsPlayerInArea like this;

pawn Код:
stock IsPlayerInArea(playerid, Float:minx, Float:miny, Float:maxx, Float:maxy)
{
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    if (y > minx && y < miny && x > maxx && x < maxy) return 1;
    return 0;
}
Now if i create the gangzone it should be simular to the area but its not..so i failed somewherein the stock

please help me with my math
Reply
#2

Код:
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;
}
this is the right code so you can see its inverted ..

minx maxx miny maxy

all x then all y



Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)