SA-MP Forums Archive
Coordinates of the character? - 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: Coordinates of the character? (/showthread.php?tid=463709)



Coordinates of the character? - Beckett - 13.09.2013

Well I've been wondering for long time how to get the coordinates of a character, example now I want to create some kind of drug smuggling, so when he take the drugs, he'd get an object to his back, my question now is how to get the location/coordinates of it is there any kind of a filterscript or anything? thank you.


Re: Coordinates of the character? - knackworst - 13.09.2013

Use this function:

pawn Код:
GetPlayerPos
Should be used like this:
pawn Код:
new Float:PosX, Float:PosY, Float:PosZ; //Variables to store the position
GetPlayerPos(playerid, PosX, PosY, PosZ);//Pos gets stored in the variables



Re: Coordinates of the character? - DanishHaq - 13.09.2013

I think this is what you could be looking for: https://sampforum.blast.hk/showthread.php?tid=182317

I thought this because:

Quote:

... so when he take the drugs, he'd get an object to his back ...

If you want to get the coordinates of where to put the object on the player, use that program.


Re: Coordinates of the character? - Beckett - 14.09.2013

I don't want his POSITION on the ground, thanks DanishHaq I'll check it out.