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.
- int GetBlipCount( [ Player plr ] )
- 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
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;