11.06.2015, 12:40
Ok , so if i edit my position of object , it get edited.
But all others player don't see the new position..
Example:
Me:
http://i.imgur.com/ttituIK.jpg
Players:
http://i.imgur.com/tWfP3bO.jpg
How i can update the object position for players?
Code:
But all others player don't see the new position..
Example:
Me:
http://i.imgur.com/ttituIK.jpg
Players:
http://i.imgur.com/tWfP3bO.jpg
How i can update the object position for players?
Code:
pawn Код:
//Attaching
SetPlayerAttachedObject(playerid, 3,19559 .. etc
PlayerInfo[playerid][pBody] = 19559;
GetPlayerPos(playerid, x,y,z);
PlayerPlaySound(playerid, 1055, x,y,z);
PlayerInfo[playerid][pBodyx] = 0;
PlayerInfo[playerid][pBodyy] = 0;
PlayerInfo[playerid][pBodyz] = 0;
PlayerInfo[playerid][pBodya] = 0;
PlayerInfo[playerid][pBodyb] = 0;
PlayerInfo[playerid][pBodyc] = 0;
PlayerInfo[playerid][pBodyq] = 0;
PlayerInfo[playerid][pBodyw] = 0;
PlayerInfo[playerid][pBodye] = 0;
//
pawn Код:
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)
{
SendClientMessage(playerid, COLOR_WHITE, "{DC0C0C}(Atasare obiecte) {FF6633} obiectele atasate au fost salvate.");
if(IsEditingHead[playerid] == 1)
{
PlayerInfo[playerid][pHeadx] = fOffsetX;
PlayerInfo[playerid][pHeady] = fOffsetY;
PlayerInfo[playerid][pHeadz] = fOffsetZ;
PlayerInfo[playerid][pHeada] = fRotX;
PlayerInfo[playerid][pHeadb] = fRotY;
PlayerInfo[playerid][pHeadc] = fRotZ;
PlayerInfo[playerid][pHeadq] = fScaleX;
PlayerInfo[playerid][pHeadw] = fScaleY;
PlayerInfo[playerid][pHeade] = fScaleZ;
IsEditingHead[playerid] = 0;
}
else if(IsEditingFace[playerid] == 1)
{
PlayerInfo[playerid][pFacex] = fOffsetX;
PlayerInfo[playerid][pFacey] = fOffsetY;
PlayerInfo[playerid][pFacez] = fOffsetZ;
PlayerInfo[playerid][pFacea] = fRotX;
PlayerInfo[playerid][pFaceb] = fRotY;
PlayerInfo[playerid][pFacec] = fRotZ;
PlayerInfo[playerid][pFaceq] = fScaleX;
PlayerInfo[playerid][pFacew] = fScaleY;
PlayerInfo[playerid][pFacee] = fScaleZ;
IsEditingFace[playerid] = 0;
}
else if(IsEditingBody[playerid] == 1)
{
PlayerInfo[playerid][pBodyx] = fOffsetX;
PlayerInfo[playerid][pBodyy] = fOffsetY;
PlayerInfo[playerid][pBodyz] = fOffsetZ;
PlayerInfo[playerid][pBodya] = fRotX;
PlayerInfo[playerid][pBodyb] = fRotY;
PlayerInfo[playerid][pBodyc] = fRotZ;
PlayerInfo[playerid][pBodyq] = fScaleX;
PlayerInfo[playerid][pBodyw] = fScaleY;
PlayerInfo[playerid][pBodye] = fScaleZ;
IsEditingBody[playerid] = 0;
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "failed");
}
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "failed");
}
return 1;
}