SA-MP Forums Archive
Object not appearing - 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: Object not appearing (/showthread.php?tid=598124)



Object not appearing - Squirrel - 09.01.2016

Okay so the problem is simple, for some reason the object im trying to attach to the player wont appear at all...

PHP код:
new mytestobj CreateObject(19515,0,0,0,0,0,0,200);
    
SetPlayerAttachedObject(playerid,0,mytestobj,1,0,0,0,0,0,0,0,0,0,0,0);
    
EditAttachedObject(playerid,0); 



Respuesta: Object not appearing - Cepillado - 09.01.2016

Maybe try using floats instead of integers for the coordinates?


Re: Object not appearing - Squirrel - 09.01.2016

Same shit, doesnt help


Re: Object not appearing - RoboN1X - 09.01.2016

CreateObject and SetPlayerAttachedObject is separated, you are likely going to use it like this:
Код:
SetPlayerAttachedObject(playerid,0,19515,1);
EditAttachedObject(playerid,0);
People often get confused in this case, CreateObject are the objects created on the map for the server, while SetPlayerAttachedObject just simply sets up a "holding" object on player skin (this is like clothes).
To create:CreateObjectNONE
To attach:AttachObjectToPlayerSetPlayerAttachedObject
To Edit:EditObjectEditAttachedObject



Re: Object not appearing - Squirrel - 09.01.2016

Thanks Robo! I get it now! +rep!