Skip to main content

EditAttachedObject

คำอธิบาย

Enter edition mode for an attached object.

NameDescription
playeridThe ID of the player to enter in to edition mode
indexThe index (slot) of the attached object to edit

ส่งคืน

1 on success and 0 on failure.

ตัวอย่าง

public OnPlayerSpawn(playerid)
{
SetPlayerAttachedObject(playerid, 0, 1337, 2);
}

public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp(cmdtext, "/edit", true))
{
EditAttachedObject(playerid, 0);
SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: You now edit your attached object on index slot 0!");
return 1;
}
return 0;
}

บันทึก

tip

You can move the camera while editing by pressing and holding the spacebar (or W in vehicle) and moving your mouse.

warning

Players will be able to scale objects up to a very large or negative value size. Limits should be put in place using OnPlayerEditAttachedObject to abort the edit.

ฟังก์ชั่นที่เกี่ยวข้องกัน