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
No edit summary |
m (Do not sign your edits) |
||
Line 27: | Line 27: | ||
} | } | ||
</source> | </source> | ||
=== Notes === | === Notes === |
Revision as of 10:58, 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 );
}
}
Notes
Call onPlayerCommand were used in this example. More info about them in the corresponding pages.