Squirrel/Server/Functions/Blips/ID
From Liberty Unleashed Wiki
(Difference between revisions)
m (moved Squirrel/Functions/Blips/ID to Squirrel/Server/Functions/Blips/ID: Server-side function) |
(→Example) |
||
Line 12: | Line 12: | ||
== Example == | == Example == | ||
− | |||
<code lang="squirrel"> | <code lang="squirrel"> | ||
− | + | function onPlayerCommand( pPlayer, szCommand, szText ) | |
+ | { | ||
+ | if ( szCommand == "createblip" ) | ||
+ | { | ||
+ | local pBlip = CreateBlip( 0, pPlayer.Pos, 0 ); | ||
+ | if ( pBlip ) MessagePlayer( "Created Blip ID " + pBlip.ID, pPlayer ); | ||
+ | } | ||
+ | } | ||
</code> | </code> | ||
=== Notes === | === Notes === | ||
− | + | The function [[Squirrel/Server/Functions/Messages/MessagePlayer|MessagePlayer]] and event [[Squirrel/Server/Events/Player/onPlayerCommand|onPlayerCommand]] were used in in this example. More info about them in the corresponding pages. | |
== Related Functions == | == Related Functions == | ||
{{Squirrel/Server/Functions/Blips}} | {{Squirrel/Server/Functions/Blips}} |
Revision as of 19:17, 28 September 2010
This Blip class member returns the ID of the blip.
Syntax
int Blip.ID
Arguments
- none
Example
function onPlayerCommand( pPlayer, szCommand, szText ) { if ( szCommand == "createblip" ) { local pBlip = CreateBlip( 0, pPlayer.Pos, 0 ); if ( pBlip ) MessagePlayer( "Created Blip ID " + pBlip.ID, pPlayer ); } }
Notes
The function MessagePlayer and event onPlayerCommand were used in in this example. More info about them in the corresponding pages.