Skip to content

Natives (Miscellaneous)

samp-incognito edited this page Jul 9, 2015 · 26 revisions

HomeNativesMiscellaneous

  • Parameters:
    • x: The game world X coordinate.
    • y: The game world Y coordinate.
    • z: The game world Z coordinate.
    • type: The item type.
    • id: The item ID.
    • data: The stored distance.
    • dimensions: The number of dimensions to be used in the distance calculation (2 or 3).
  • Returns:
    • 0 on failure, 1 on success.

Gets the distance from a game world point to an item.


  • Parameters:
    • type: The item type.
    • id: The item ID.
    • toggle: 0 to turn off, 1 to turn on.
  • Returns:
    • 0 on failure, 1 on success.

Toggles whether an item is static.

  • If the item is static, all distance checks will be omitted, and the item will take priority over non-static items.
  • This has the same effect as specifying a negative streaming distance. When this is turned on, the item's streaming distance will change to a negative value. When it is turned off, the item's streaming distance will be restored.

  • Parameters:
  • Returns:
    • 0 or 1.

Returns whether Streamer_ToggleStaticItem is turned on.


  • Parameters:
    • playerid: The player ID.
    • type: The item type.
    • streamerid: The streamer ID.
  • Returns:
    • The internal ID.

Returns the internal ID (assigned by the SA-MP server) from the specified player, item type, and streamer ID (assigned by the server plugin).


  • Parameters:
    • playerid: The player ID.
    • type: The item type.
    • internalid: The internal ID.
  • Returns:
    • The streamer ID.

Returns the streamer ID (assigned by the server plugin) from the specified player, item type, and internal ID (assigned by SA-MP server).


  • Parameters:
    • playerid: The player ID.
    • type: The item type.
    • id: The item ID.
  • Returns:
    • 0 or 1.

Returns whether an item is currently streamed in for the specified player and item type.


  • Parameters:
    • playerid: The player ID.
    • type: The item type.
    • serverwide: 0 for the current script, 1 for all scripts.
  • Returns:
    • 0 on failure, 1 on success.

Destroys all items streamed in for the specified player and item type.


  • Parameters:
    • playerid: The player ID.
    • type: The item type.
    • serverwide: 0 for the current script, 1 for all scripts.
  • Returns:
    • Number of visible items.

Counts all items streamed in for the specified player and item type.


  • Parameters:
    • type: The item type.
    • serverwide: 0 for the current script, 1 for all scripts.
  • Returns:
    • 0 on failure, 1 on success.

Destroys all created items of the specified item type.


  • Parameters:
    • type: The item type.
    • serverwide: 0 for the current script, 1 for all scripts.
  • Returns:
    • Number of created items.

Counts all created items of the specified item type.

  • This differs from Streamer_GetUpperBound in that it returns the the number of items that have been created and not the highest ID. It should not be used for iteration purposes.