Object id's are bugged. - 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 id's are bugged. (
/showthread.php?tid=406762)
Object id's are bugged. -
Tamer - 11.01.2013
Hey,I made a cmd that attaches a player a bush,but when you go ingame and try to attach it to the player it gives you a stair instead of a bush.
I have tried with other object ID's aswell,it always gives another object instead of the wanted id.
Thanks for advance! (If ya don't believe check it out yourself)
pawn Код:
CMD:attachbush(playerid,params[])
{
AttachObjectToPlayer(702,playerid,0,0,0,0,0,0);
return 1;
}
Re: Object id's are bugged. -
Vince - 11.01.2013
Go read the wiki page first. Thank you.
Re: Object id's are bugged. -
Tamer - 11.01.2013
So the point is because it doesn't return a specific value?
Re: Object id's are bugged. -
Threshold - 11.01.2013
Read:
https://sampwiki.blast.hk/wiki/AttachObjectToPlayer
pawn Код:
new myobject[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
myobject[playerid] = CreateObject(702, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
return 1;
}
CMD:attachbush(playerid, params[])
{
AttachObjectToPlayer(myobject[playerid], playerid, 0, 0, 0.0, 0.0, 0, );
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
DestroyObject(myobject[playerid]);
return 1;
}