onplayereditattachedobject not works.. the obj just gone..
#1

Код:
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??
Reply
#2

I helps if you save the scale and rotation as well...
Reply
#3

i do save
Reply
#4

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)