SA-MP Forums Archive
Cage on players position? - 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: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Cage on players position? (/showthread.php?tid=67397)



Cage on players position? - Robbin237 - 01.03.2009

Hi guys, i have made a huge cage. Now what i want to do, is put the cage on the players position. But cant seem to get it done for some reason.
Can somebody help me ? This is the orignal code Converted from the .map file

pawn Код:
CreateObject(971, 2492.393, -1660.697, 16.906, 0.0, 0.0, 0.0);
CreateObject(971, 2496.785, -1665.073, 16.914, 0.0, 0.0, 90.241);
CreateObject(971, 2493.234, -1665.118, 20.464, 90.241, 0.0, 90.241);
CreateObject(971, 2492.382, -1669.523, 16.914, 0.0, 0.0, 0.0);
CreateObject(971, 2491.511, -1665.094, 20.497, 90.241, 0.0, 90.241);
CreateObject(971, 2488.023, -1665.124, 16.914, 0.0, 0.0, 90.241);
CreateObject(971, 2493.192, -1665.129, 13.383, 90.241, 0.0, 90.241);
CreateObject(971, 2491.615, -1665.160, 13.358, 90.241, 0.0, 90.241);
Ive tried to get the player X coordinate and put everything there, but that wouldnt work either.
Please help!

Thanks!


Re: Cage on players position? - Rks25 - 01.03.2009

Get players position, put it in a CreateObject, and change the positions like +2,etc.


Re: Cage on players position? - Robbin237 - 01.03.2009

But why this wont work.. please can you correct it for me?


Re: Cage on players position? - Rks25 - 01.03.2009

if you just post that code it wont work.
Example: if i am in Los Santos, and those locations are for Las Venturas, i won't see them.


Re: Cage on players position? - Robbin237 - 01.03.2009

I know, i use getplayerpos and then put the X, and Y, but then still i cant see it. So how would i correct it?

Ive tried this:

pawn Код:
new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
   
    CreateObject(971, x, -1660.697, 16.906, 0.0, 0.0, 0.0);
    CreateObject(971, x, -1665.073, 16.914, 0.0, 0.0, 90.241);
    CreateObject(971, x, -1665.118, 20.464, 90.241, 0.0, 90.241);
    CreateObject(971, x, -1669.523, 16.914, 0.0, 0.0, 0.0);
    CreateObject(971, x, -1665.094, 20.497, 90.241, 0.0, 90.241);
    CreateObject(971, x, -1665.124, 16.914, 0.0, 0.0, 90.241);
    CreateObject(971, x, -1665.129, 13.383, 90.241, 0.0, 90.241);
    CreateObject(971, x, -1665.160, 13.358, 90.241, 0.0, 90.241);
But that wouldnt work either


Re: Cage on players position? - Rks25 - 01.03.2009

You also need to get y.

+ to make it smooth: change like y + 2 , than y + 3


Re: Cage on players position? - Robbin237 - 01.03.2009

Cant seem to get it appear, please help me?


Re: Cage on players position? - Popz - 01.03.2009

Do not triple post. Just wait.


Re: Cage on players position? - member - 01.03.2009

You have given 8 gate objects, so your gate has 8 sides? if it does, then it's gonna be a bit difficult.
If it's four sides then maybe i can try to help.


Re: Cage on players position? - Robbin237 - 15.03.2009

*BUMP* 8 Sides, but i'd still like to have it work, anybody help?


2 sides to fill the top
2 sides to fill the bottom
Right side
Left Side
Back side
Front side
--------
8 Sides

I know its an old thread, but i'd really like this to work XD