CreateBlip: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
Line 13: Line 13:
{{OptionalArg}}  
{{OptionalArg}}  
*'''icon:''' The icon that the radar blips should be. Valid values are:
*'''icon:''' The icon that the radar blips should be. Valid values are:
** '''0:''' Border [default]
** '''1:''' Border [default]
** '''1:''' Centre
** '''2:''' Centre
** '''2:''' Map_here
** '''3:''' Map_here
** '''3:''' North
** '''4:''' North
** '''4:''' Airyard
** '''5:''' Airyard
** '''5:''' Gun
** '''6:''' Gun
** '''6:''' Barbers
** '''7:''' Barbers
** '''7:''' Big_smoke
** '''8:''' Big_smoke
** '''8:''' Boatyard
** '''9:''' Boatyard
** '''9:''' Burgershot
** '''10:''' Burgershot
** '''10:'''Bulldozer
** '''11:''' Bulldozer
** '''11:'''Cat_pink
** '''12:''' Cat_pink
** '''12:'''Cesar
** '''13:''' Cesar
** '''13:'''Chicken
** '''14:''' Chicken
** '''14:'''Cj
** '''15:''' Cj
** '''15:'''Crash1
** '''16:''' Crash1
** '''16:'''Diner
** '''17:''' Diner
** '''17:''' Emmetgun
** '''18:''' Emmetgun
** '''18:''' Enemyattack
** '''19:''' Enemyattack
** '''19:''' Fire
** '''20:''' Fire
** '''20:''' Girlfriend
** '''21:''' Girlfriend
** '''21:''' Hospital
** '''22:''' Hospital
** '''22:''' Loco
** '''23:''' Loco
** '''23:''' Maddog
** '''24:''' Maddog
** '''24:''' Mafia
** '''25:''' Mafia
** '''25:''' Mcstrap
** '''26:''' Mcstrap
** '''26:''' Mod_garage
** '''27:''' Mod_garage
** '''27:''' Ogloc
** '''28:''' Ogloc
** '''28:''' Pizza
** '''29:''' Pizza
** '''29:''' Police
** '''30:''' Police
** '''30:''' Property_green
** '''31:''' Property_green
** '''13:''' Property_red
** '''12:''' Property_red
** '''32:''' Race
** '''33:''' Race
** '''33:''' Ryder
** '''34:''' Ryder
** '''34:''' Savehouse
** '''35:''' Savehouse
** '''35:''' School
** '''36:''' School
** '''36:''' Mystery
** '''37:''' Mystery
** '''36:''' Sweet
** '''38:''' Sweet
** '''38:''' Tattoo
** '''39:''' Tattoo
** '''39:''' Truth
** '''40:''' Truth
** '''40:''' Waypoint
** '''41:''' Waypoint
** '''41:''' Toreno_ranch
** '''42:''' Toreno_ranch
** '''42:''' Triads
** '''43:''' Triads
** '''43:''' Triads_casino
** '''44:''' Triads_casino
** '''44:''' Tshirt
** '''45:''' Tshirt
** '''45:''' Woozie
** '''46:''' Woozie
** '''46:''' Zero
** '''47:''' Zero
** '''47:''' Date_disco
** '''48:''' Date_disco
** '''48:''' Date_drink
** '''49:''' Date_drink
** '''49:''' Date_food
** '''50:''' Date_food
** '''50:''' Truck
** '''51:''' Truck
** '''51:''' Cash
** '''52:''' Cash
** '''52:''' Flag
** '''53:''' Flag
** '''53:''' Gym
** '''54:''' Gym
** '''54:''' Impound
** '''55:''' Impound
** '''55:''' Runway_light
** '''56:''' Runway_light
** '''56:''' Runway
** '''57:''' Runway
** '''57:''' Gang_b
** '''58:''' Gang_b
** '''58:''' Gang_p
** '''59:''' Gang_p
** '''59:''' Gang_y
** '''60:''' Gang_y
** '''60:''' Gang_n
** '''61:''' Gang_n
** '''61:''' Gang_g
** '''62:''' Gang_g
** '''62:''' Spray
** '''63:''' Spray
*'''size:''' The size of the radar blip. Default is 2.
*'''size:''' The size of the radar blip. Default is 2.
*'''r:''' The ammount of red in the blip's color (0 - 255). Only applicable to the ''border'' icon. 'Default is 255.  
*'''r:''' The ammount of red in the blip's color (0 - 255). Only applicable to the ''border'' icon. 'Default is 255.  

Revision as of 14:38, 18 May 2006

This function creates a blip element, which is displayed as an icon on the client's radar.

Syntax

blip createBlip ( float x, float y, float z, [int icon=0, int size=2, int r=255, int g=0, int b=0, int a=255, visibleTo=getRootElement()] )

Required Arguments

Optional Arguments

NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use. For more information on optional arguments, see optional arguments.

  • icon: The icon that the radar blips should be. Valid values are:
    • 1: Border [default]
    • 2: Centre
    • 3: Map_here
    • 4: North
    • 5: Airyard
    • 6: Gun
    • 7: Barbers
    • 8: Big_smoke
    • 9: Boatyard
    • 10: Burgershot
    • 11: Bulldozer
    • 12: Cat_pink
    • 13: Cesar
    • 14: Chicken
    • 15: Cj
    • 16: Crash1
    • 17: Diner
    • 18: Emmetgun
    • 19: Enemyattack
    • 20: Fire
    • 21: Girlfriend
    • 22: Hospital
    • 23: Loco
    • 24: Maddog
    • 25: Mafia
    • 26: Mcstrap
    • 27: Mod_garage
    • 28: Ogloc
    • 29: Pizza
    • 30: Police
    • 31: Property_green
    • 12: Property_red
    • 33: Race
    • 34: Ryder
    • 35: Savehouse
    • 36: School
    • 37: Mystery
    • 38: Sweet
    • 39: Tattoo
    • 40: Truth
    • 41: Waypoint
    • 42: Toreno_ranch
    • 43: Triads
    • 44: Triads_casino
    • 45: Tshirt
    • 46: Woozie
    • 47: Zero
    • 48: Date_disco
    • 49: Date_drink
    • 50: Date_food
    • 51: Truck
    • 52: Cash
    • 53: Flag
    • 54: Gym
    • 55: Impound
    • 56: Runway_light
    • 57: Runway
    • 58: Gang_b
    • 59: Gang_p
    • 60: Gang_y
    • 61: Gang_n
    • 62: Gang_g
    • 63: Spray
  • size: The size of the radar blip. Default is 2.
  • r: The ammount of red in the blip's color (0 - 255). Only applicable to the border icon. 'Default is 255.
  • g: The ammount of green in the blip's color (0 - 255). Only applicable to the border icon. Default is 0.
  • b: The ammount of blue in the blip's color (0 - 255). Only applicable to the border icon. Default is 0.
  • a: The ammount of alpha in the blip's color (0 - 255). Default is 255.
  • visibleTo: What elements can see the blip. Defaults to visible to everyone. See visibility.

Example

This example creates a radar blip at a random player's position and makes it so that it is only visible to that player.

-- Pick a random player
myPlayer = getRandomPlayer ()
-- Retrieve the player's position and store it in the variables x, y and z
x,y,z = getEntityPosition ( myPlayer )
-- Create a radar blip at the player's position, with a 'cash' icon and only visible to the player
myBlip = createBlip ( x, y, z, 51, 0, 0, 0, 255, myPlayer )

See Also

Template:Blip Functions