GetBlipCount
From Liberty Unleashed Wiki
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
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'.
function onPlayerCommand( player, command, text ) { if ( command == "blips" ) { local blips = GetBlipCount(); local localBlips = GetBlipCount( player ); MessagePlayer( "There are currently " + blips + " global blips shown on the radar.", player ); MessagePlayer( "There are also " + localBlips + " local blips which only you can see.", player ); } return 1; }
Notes
The function MessagePlayer and event onPlayerCommand were used in in this example. More info about them in the corresponding pages.