SetObjectNoCameraCol

From SA-MP Wiki

Jump to: navigation, search

SetObjectNoCameraCol was added in SA-MP 0.3.7 This function was added in SA-MP 0.3.7 and will not work in earlier versions!


Description:

Disable collisions between players' cameras and the specified object.


Parameters:
(objectid)
objectidThe ID of the object to disable camera collisions on.


Return Values:

  • 1: The function executed successfully.
  • 0: The function failed to execute. The object specified does not exist.


Image:32px-Ambox_warning_orange.png

Note

This only works outside the map boundaries (past -3000/3000 units on the x and/or y axis).

Example Usage:

public OnObjectMoved(objectid)
{
    new Float:objX, Float:objY, Float:objZ;
    GetObjectPos(objectid, objX, objY, objZ);
    if(objX >= 3000.0 || objY >= 3000.0 || objX <= -3000.0 || objY <= -3000.0)
    {
        SetObjectNoCameraCol(objectid);
    }
    return 1;
}

Related Functions

The following functions may be useful, as they are related to this function in one way or another.

Personal tools
Navigation
Toolbox