Scripting/Squirrel/Functions/ShowMapObject

From Vice City Multiplayer
Revision as of 09:06, 9 March 2016 by Xmair (talk | contribs)
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing

This function will show an object on the map if the map was hidden using HideMapObject or RawHideMapObject

Syntax

ShowMapObject( ObjectID , VectorX, VectorY, VectorZ );

Arguments

  • int ObjectID - The ID of the object, must be an integer.
  • float VectorX - The vector x of the hidden object. Should be float.
  • float VectorY - The vector y of the hidden object. Should be float.
  • float VectorZ - The vector z of the hidden object. Should be float.

Example

function onPlayerCommand( player, cmd, text );
{
 if ( cmd == "hideobj" )
 {
   HideMapObject ( 379 , -1721.86 , -293.002 , 15.1086 );
   MessagePlayer ( "You've successfully hidden the army gate!" , player );
 }
 else if ( cmd == "showobj" )
 {
  ShowMapObject ( 379 , -1721.86 , -293.002 , 15.1086 );
  MessagePlayer ( "The army gate is no longer hidden!" , player );
 }
}

- Xmair.

Notes

Call onPlayerCommand were used in this example. More info about them in the corresponding pages.

Related Functions