13.02.2011, 20:47
Hi, i wan't to make entrances. I have function which check's if player is in entrance.
And i have a lot's of coordinates:
Feel free to suggest a nice and best way to make entrances. Is it possible to use case in this situation?
pawn Код:
stock IsEntrance(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, HOTEL))
{
// bla bla bla
return 1;
}
else if(IsPlayerInRangeOfPoint(playerid, 7.0, BANK))
{
// bla bla bla
return 1;
}
// here is more checks
return 1;
}
pawn Код:
#define BANK -2173.61,679.821,55.1645
#define HOTEL -1605.5,711.163,13.8672
...
...
...