attachobjecttoplayer - 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: attachobjecttoplayer (
/showthread.php?tid=142479)
attachobjecttoplayer -
0ne - 18.04.2010
Ok i have this::
pawn Код:
if((newkeys==KEY_ACTION))
{
new marker;
new Float:x,Float:y,Float:z;
new Float:rx,Float:ry,Float:rz;
GetPlayerPos(playerid,x,y,z);
marker = CreateObject(1559, x, y, z, 0, 0, 0);
AttachObjectToPlayer(marker,playerid,x,y,z+1,rx,ry,rz);
}
and it just doesn't work when i press control button or m1, anyone knows whats wrong?
Re: attachobjecttoplayer -
Correlli - 18.04.2010
X, Y and Z at AttachObjectToPlayer function are offsets (distance between the player and the object).
Re: attachobjecttoplayer -
0ne - 18.04.2010
Could u explain a little bit more? I didn't quite catch that..
Re: attachobjecttoplayer -
Correlli - 18.04.2010
Here:
https://sampwiki.blast.hk/wiki/AttachObjectToPlayer
Re: attachobjecttoplayer -
0ne - 18.04.2010
Ok i managed to get it right
Does anyone know what object id that is? because 1559 the diamond doesn't move or do anything like that.
Re: attachobjecttoplayer -
0ne - 19.04.2010
So does anyone know? I tried searching through MTA Object editor didn't find anything like it except DIAMOND which is not the same object..
Re: attachobjecttoplayer -
Correlli - 19.04.2010
You can't have those markers. You can only use that "diamond" object.
Re: attachobjecttoplayer -
0ne - 19.04.2010
I saw few servers which had those markers, some of them was even pink or yellow...
Re: attachobjecttoplayer -
Correlli - 19.04.2010
Yellow marker.. you mean this? -
https://sampwiki.blast.hk/wiki/SetVehicleParamsForPlayer (objective)
Re: attachobjecttoplayer -
Jay_ - 19.04.2010
Quote:
Originally Posted by 0ne
I saw few servers which had those markers, some of them was even pink or yellow...
|
Those player markers where deprecated in 0.1b. The only way to add one is using SetVehicleParamsForPlayer which adds it above the vehicle in question.