GetBlipCount

From Liberty Unleashed Wiki
Revision as of 19:08, 24 September 2010 by Juppi (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This function returns the number of created radar blips. If the optional player argument is used, the function will return how many client-side blips does the given player have. Without the argument it will return the number of global blips.

Syntax

  1. int GetBlipCount( [ Player plr ] )

Arguments

  • plr - If you want to get the number of the blips for a specific client, use this argument to indicate the player. If you don't use this argument the global blip count will be returned

Example

This example command returns the number of blips ingame (global and local blips) when a player types '/blips'.

  1.  
  2. function onPlayerCommand( player, command, text )
  3. {
  4. if ( command == "blips" )
  5. {
  6. local blips = GetBlipCount();
  7. local localBlips = GetBlipCount( player );
  8. MessagePlayer( "There are currently " + blips + " global blips shown on the radar.", player );
  9. MessagePlayer( "There are also " + localBlips + " local blips which only you can see.", player );
  10. }
  11. return 1;
  12. }
  13.  

Notes

The function MessagePlayer and event onPlayerCommand were used in in this example. More info about them in the corresponding pages.

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox