Simple Error - 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: Simple Error (
/showthread.php?tid=376503)
Simple Error -
UnknownGamer - 10.09.2012
pawn Код:
AttachObjectCorrectly(playerid, 1582);
Why does this say invalid object id?
I'm trying to attach a pizza box to player?
AW: Simple Error -
BiosMarcel - 10.09.2012
1:What means COrrectly 2: 1582 is a Model ID of a Object not the object id!
Example:
new Object;
Object = CreateObject(1234,.........);
1234: is the model id
Object is the object id
Re: Simple Error -
UnknownGamer - 10.09.2012
How would I get that to attach a pizza box to the playerid?
AW: Simple Error -
BiosMarcel - 10.09.2012
AttachObjectToPlayer(Nameofthepizzaobject,playerid ,X,Y,Z,XROT,YROT,ZROT);
Re: Simple Error -
UnknownGamer - 10.09.2012
"Nameofthepizzabox" Would I put the object-id? Because there isnt a name rite?
It's just the 1582 ocording to sa-mp's wiki page?
AW: Simple Error -
BiosMarcel - 10.09.2012
create the object so:
new pizzaobj = CreateObject(1582,0,0,0,0,0,0,300);
and then
AttachObjectToPlayer(pizzaobj,playerid,x,y,z,xrot, yrot,zrot);
Re: Simple Error -
UnknownGamer - 10.09.2012
error 017: undefined symbol "X"
On the attachobject line
AW: Simple Error -
BiosMarcel - 10.09.2012
OMG you must put your own numbers in it not X,Y and Z!!
Re: Simple Error -
UnknownGamer - 10.09.2012
Fixed.
Just now, how do you get it so the olayerid, is holdimng the pizza box, not attached to his feet?
Re: Simple Error -
mamorunl - 10.09.2012
Quote:
Originally Posted by UnknownGamer
Fixed.
Just now, how do you get it so the olayerid, is holdimng the pizza box, not attached to his feet?
|
Even when it would look cool that he is surfing the pizza box, you can edit the x, y, z coordinates to change the location of the box on the player.