Having issues with AttachDynamicObjectToPlayer... - 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: Having issues with AttachDynamicObjectToPlayer... (
/showthread.php?tid=571088)
Having issues with AttachDynamicObjectToPlayer... -
Dokins - 16.04.2015
pawn Код:
CMD:steal(playerid, params[])
{
new furni;
for(new o = 1; o < MAX_FURNI; o++)
{
if(IsPlayerInRangeOfPoint(playerid, 3, FurniX[o], FurniY[o], FurniZ[o]))
{
furni = o;
printf(" ID %d" , o);
}
}
printf("Furni Picked %d", FurniObject[furni]);
AttachDynamicObjectToPlayer(FurniObject[furni], playerid,0.1,0.2,0.1,0.1,0.1,0.1);
SetPlayerSpecialAction(playerid, 25);
return 1;
}
I'm trying to pick up the object nearest, I get a message on the server saying:
Код:
[02:12:28] AttachPlayerObjectToPlayer : removed in 0.3. I can only attach global objects.
It's not a player object and it is created when the server starts, as in loaded through mysql.
Re: Having issues with AttachDynamicObjectToPlayer... -
Sascha - 16.04.2015
Do you have the latest streamer version?
Re: Having issues with AttachDynamicObjectToPlayer... -
RoboN1X - 16.04.2015
Streamer Dynamic objects uses Player Object,
AttachPlayerObjectToPlayer function was removed in SA-MP 0.3, so it does not work.
Alternatively, you can use
SetPlayerAttachedObject, the different is the object position/rotation depends on the player's skin bone, it's non solid, scaleable, and visible by all players.
I'm not sure why AttachDynamicObjectToPlayer function existed in streamer though.