SA-MP Forums Archive
Check if the player is standing on grass - 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)
+---- Forum: Discussion (https://sampforum.blast.hk/forumdisplay.php?fid=84)
+---- Thread: Check if the player is standing on grass (/showthread.php?tid=622706)



Check if the player is standing on grass - TwinkiDaBoss - 25.11.2016

So I've been a bit fucked around with this, trying to basically check if the player is near specified biome and such (for example if they are standing on grass, sand and so on)

Now I've came across 2 solutions, one is manual and one automatic (but not sure how to achieve the automatic method)

Solution 1:
-Create few areas that are marked as biomes and set the biome value to specified one (Grassy, Sandy etc)

Solution 2:
-Get the object ID player is standing on and then check if the object itself is grass, sand etc (by using object id). Problem is getting that object ID since we cant just access the GTA SA in built stuff.

So anyone got any suggestion?


Re: Check if the player is standing on grass - Dignity - 25.11.2016

Use easyBMP. Load a picture of your specific map with easyBMP and detect the color to do a action.

Here's an example by SouthclawJK:
https://sampforum.blast.hk/showthread.php?tid=516560

(You can find a code example at the bottom of the thread)


Re: Check if the player is standing on grass - TwinkiDaBoss - 25.11.2016

Hmm never seen that one yet, thanks mate