attachplayertopickup?? - 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: attachplayertopickup?? (
/showthread.php?tid=334306)
attachplayertopickup?? -
niels44 - 14.04.2012
hey guys,
i was wondering if its possible to attach a pickup to a player, like the skull pickup put on a players head... is this possible?
greets niels
Re: attachplayertopickup?? -
iggy1 - 14.04.2012
Not possible to attach pickups to players but, IIRC (not certain) all/most pickup models also have object IDS so you could make it appear as if its a pickup but really it's an object.
Re: attachplayertopickup?? -
niels44 - 14.04.2012
eehm i dont understand you... you saying i can make the pickup use as a object? cuz i already tried before to use a object as pickup and that didnt packed out well... so what you mean? i dont understand you
Re: attachplayertopickup?? -
Vince - 14.04.2012
All pickups have an object model id (not to be confused with pickup id). The skull, for example, is 1254. You can use this in combination with SetPlayerHoldingObject or AttachObjectToPlayer. That object then, however, does not function as a pickup anymore and it also doesn't rotate.
Re: attachplayertopickup?? -
iggy1 - 14.04.2012
No i mean you could find an object that looks like a pickup and use that to attach to players. Because it cant be done with pickups.
You could however use a timer or OnPlayerUpdate to keep setting the position of the pickup on the players head. I'm not sure if that will work, it may set the pickup at ground level i'm not sure how that works. It would also have to be a none-pickupable pickup so the player doesn't pick it up.

(that was a mouthful)
Re: attachplayertopickup?? -
Shetch - 14.04.2012
For example here are some weapon model IDs, you could atach those to your player and they would look like pickups.
https://sampwiki.blast.hk/wiki/Game_Obje..._.28weapons.29
Re: attachplayertopickup?? -
niels44 - 14.04.2012
eehm so if im right you guys just mean i can use the object in mta?, cuz in mta the skull pickup is 1256 id as object... so you guys saying i can make that as a object on the head? with attachobjecttoplayer?
Re: attachplayertopickup?? -
niels44 - 14.04.2012
ah i found out how it works


it worked with setplayerattachedobject

anyways thnx guys


: