Scripting/Squirrel/Functions/DestroyMarker: Difference between revisions

From Vice City Multiplayer
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing
(Created page with "'''Syntax''' <pre>DestroyMarker(MarkerName)</pre> '''Example''' <source lang=squirrel> function onPlayerCommand( player, cmd, text ) { if ( cmd == "createmarker" ) { Ma...")
 
No edit summary
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
'''Syntax'''
This function will destroy a created Marker.
 
== Syntax ==
<pre>DestroyMarker(MarkerName)</pre>
<pre>DestroyMarker(MarkerName)</pre>


== Arguments ==
* ''string'' '''MarkerName''' - The name of the created Marker.


 
== Example ==
'''Example'''
<source lang=squirrel>
<source lang=squirrel>
function onPlayerCommand( player, cmd, text )
function onPlayerCommand( player, cmd, text )
{
{
if ( cmd == "createmarker" )
    if ( cmd == "createmarker" )
{
    {
Marker<-CreateMarker(p.UniqueWorld, Vector( 498.03,-83.8962,9.74025  ), 5,RGB(209, 209, 209),0);
          Marker<-CreateMarker(player.UniqueWorld, Vector( 498.03,-83.8962,9.74025  ), 5,RGB(209, 209, 209),0);
}
    }
if ( cmd == "deletmarker" )
    if ( cmd == "deletemarker" )
{
    {
DestroyMarker(Marker);
          DestroyMarker(Marker);
}
    }
    return 1;
}
}
</source>
== Related Functions ==
{{Scripting/Squirrel/Functions/Game_Functions}}
[[Category:Scripting/Squirrel/Functions/Game_Functions]]

Latest revision as of 18:06, 30 January 2017

This function will destroy a created Marker.

Syntax

DestroyMarker(MarkerName)

Arguments

  • string MarkerName - The name of the created Marker.

Example

function onPlayerCommand( player, cmd, text )
{
     if ( cmd == "createmarker" )
     {
          Marker<-CreateMarker(player.UniqueWorld, Vector( 498.03,-83.8962,9.74025  ), 5,RGB(209, 209, 209),0);
     }
     if ( cmd == "deletemarker" )
     {
          DestroyMarker(Marker);
     }
     return 1;
}

Related Functions