Help with IsPlayerInArea
#7

It is GangZoneCreate(Float:minx, Float:miny, Float:maxx, Float:maxy) so it should be
pawn Код:
SafeZone = GangZoneCreate(581.7188, 676.0, 2972.0, 2930.0);
For easier usage you should always use the same syntax
pawn Код:
IsPlayerInArea(playerid, Float: minx, Float: miny, Float: maxx, Float: maxy) {
    new
        Float: X,
        Float: Y
    ; // a little optimisation
    return GetPlayerPos(playerid, X, Y, Float: playerid) && (minx <= X <= maxx) && (miny <= Y <= maxy);
}
And now OnPlayerUpdate
pawn Код:
//OnPlayerUpdate
    if(IsPlayerInArea(playerid, 581.7188, 676.0, 2972.0, 2930.0)) {
        ResetPlayerWeapons(playerid);
    }
Reply


Messages In This Thread
Help with IsPlayerInArea - by LeXuZ - 19.11.2014, 17:54
Re : Help with IsPlayerInArea - by Dutheil - 19.11.2014, 17:56
Re: Help with IsPlayerInArea - by Fel486 - 19.11.2014, 17:56
Re: Help with IsPlayerInArea - by LeXuZ - 19.11.2014, 17:58
Re : Help with IsPlayerInArea - by Dutheil - 19.11.2014, 18:01
Re: Help with IsPlayerInArea - by LeXuZ - 19.11.2014, 18:17
AW: Help with IsPlayerInArea - by Nero_3D - 19.11.2014, 18:30

Forum Jump:


Users browsing this thread: 5 Guest(s)