Squirrel/Server/Functions/Blips/GetBlipCount

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with '{{Squirrel/Title|GetBlipCount}} This function returns the number of created radar blips. If the optional player argument is used, the function will return how many client-side bl…')
 
 

Latest revision as of 19:08, 24 September 2010

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.

[edit] Syntax

  1. int GetBlipCount( [ Player plr ] )

[edit] 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

[edit] 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.  

[edit] Notes

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

[edit] Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox