Scripting/Squirrel/Functions/ShowMapObject: Difference between revisions
Jump to navigation
Jump to search
This wiki is using an old backup from 2020
Some information may be old/missing
(Created page with "This function will show an object on the map if the map was hidden using HideMapObject or RawHideMapObject == Syntax == <pre>ShowMapObject( ObjectID , VectorX, Vecto...") |
No edit summary |
||
Line 27: | Line 27: | ||
} | } | ||
</source> | </source> | ||
- Xmair. | |||
=== Notes === | === Notes === |
Revision as of 09:06, 9 March 2016
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.