onplayereditattachedobject not works.. the obj just gone.. - 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: onplayereditattachedobject not works.. the obj just gone.. (
/showthread.php?tid=472072)
onplayereditattachedobject not works.. the obj just gone.. -
Chrisli520 - 26.10.2013
Код:
public OnPlayerEditAttachedObject(playerid, response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ)
{
if(response)
{
new id;
SCM(playerid,COLOR_LIGHTBLUE,"You had now saved");
PlayerInfo[playerid][pobjx] = fOffsetX;
PlayerInfo[playerid][pobjy] = fOffsetY;
PlayerInfo[playerid][pobjz] = fOffsetZ;
format(PlayerInfo[playerid][pobjrx],30,"%f",fRotX);//PlayerInfo[playerid][pobjry] = fRotY;
format(PlayerInfo[playerid][pobjry],30,"%f",fRotY);
format(PlayerInfo[playerid][pobjrz],30,"%f",fRotZ);//PlayerInfo[playerid][pobjsx] = fScaleX;
format(PlayerInfo[playerid][pobjsx],30,"%f",fScaleX);
format(PlayerInfo[playerid][pobjsy],30,"%f",fScaleY);
format(PlayerInfo[playerid][pobjsz],30,"%f",fScaleZ);
id = PlayerInfo[playerid][pobj];
SetPlayerAttachedObject(playerid, index, FurnitureInfo[id][fModel], PlayerInfo[playerid][pobjbond], PlayerInfo[playerid][pobjx], PlayerInfo[playerid][pobjy], PlayerInfo[playerid][pobjz],PlayerInfo[playerid][pobjrx],PlayerInfo[playerid][pobjry], PlayerInfo[playerid][pobjrz], PlayerInfo[playerid][pobjsx], PlayerInfo[playerid][pobjsy], PlayerInfo[playerid][pobjsz]);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Save not success");
}
return 1;
}
i edit the attached object, but when i click save, the object just gone, but i can use my another command to see that it was still on my body, maybe the scale set wrong or something??
Re: onplayereditattachedobject not works.. the obj just gone.. -
Pottus - 26.10.2013
I helps if you save the scale and rotation as well...
Re: onplayereditattachedobject not works.. the obj just gone.. -
Chrisli520 - 26.10.2013
i do save
Re: onplayereditattachedobject not works.. the obj just gone.. -
Pottus - 26.10.2013
Quote:
Originally Posted by Chrisli520
i do save
|
You do some string bullshit when they're floats
pawn Код:
format(PlayerInfo[playerid][pobjsx],30,"%f",fScaleX);
format(PlayerInfo[playerid][pobjsy],30,"%f",fScaleY);
format(PlayerInfo[playerid][pobjsz],30,"%f",fScaleZ);
Your not saving shit period.