How to detect which city is player in? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to detect which city is player in? (
/showthread.php?tid=597541)
How to detect which city is player in? -
Ritzy2K - 01.01.2016
Hey, idk how this came to my mind, and i couldnt think of a solution so i'm not at peace. Is it possible to detect which city is player in?
Something like, IsPlayerInLasVenturas /San Fierro/ Los Santos. something like that :P
Re: How to detect which city is player in? -
AndySedeyn - 01.01.2016
I found this:
https://sampforum.blast.hk/showthread.php?tid=174407
And:
https://sampwiki.blast.hk/wiki/Areacheck
Re: How to detect which city is player in? -
Donboo - 01.01.2016
You can verify if the player is in the area.
if(IsPlayerInArea(playerid, -2997.40, -1115.50, -1213.90, 1659.60)) // SF
if(IsPlayerInArea(playerid, 44.60, -2892.90, 2997.00, -768.00)) // LS
if(IsPlayerInArea(playerid, 869.40, 596.30, 2997.00, 2993.80)) // LV
Re: How to detect which city is player in? -
Godey - 02.01.2016
Use this topic as AndySedeyn said,
https://sampforum.blast.hk/showthread.php?tid=174407
it's the right way...