attachobjecttoplayer
#1

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?
Reply
#2

X, Y and Z at AttachObjectToPlayer function are offsets (distance between the player and the object).
Reply
#3

Could u explain a little bit more? I didn't quite catch that..
Reply
#4

Here:
https://sampwiki.blast.hk/wiki/AttachObjectToPlayer
Reply
#5

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.
Reply
#6

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..
Reply
#7

You can't have those markers. You can only use that "diamond" object.
Reply
#8

I saw few servers which had those markers, some of them was even pink or yellow...
Reply
#9

Yellow marker.. you mean this? - https://sampwiki.blast.hk/wiki/SetVehicleParamsForPlayer (objective)
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)