Squirrel/Server/Functions/Blips/Owner

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
 
(2 intermediate revisions by one user not shown)
Line 12: Line 12:
 
== Example ==
 
== Example ==
  
{{Squirrel/NeedsExample}}
+
This example function will return the name of the blip owner (or "Unknown" if the blip is a global blip) when called.
 +
 
 
<code lang="squirrel">
 
<code lang="squirrel">
-- todo
+
// This is a custom function
 +
function GetBlipOwnerName( blip )
 +
{
 +
    if ( blip.Owner ) return blip.Owner.Name;
 +
    return "Unknown";
 +
}
 
</code>
 
</code>
  
 
=== Notes ===
 
=== Notes ===
  
Example notes and used functions here.
+
The function [[Squirrel/Server/Functions/Players/Name|Player.Name]] was used in in this example. More info about it in the corresponding page.
 +
 
 +
Note that this function is a completely custom function, you'll have to call it using your own script.
  
 
== Related Functions ==
 
== Related Functions ==
  
 
{{Squirrel/Server/Functions/Blips}}
 
{{Squirrel/Server/Functions/Blips}}

Latest revision as of 00:22, 29 September 2010

Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This Blip class member returns a pointer to the owner of this blip, or null if the blip is visible for everyone.

[edit] Syntax

  1. Player Blip.Owner

[edit] Arguments

  • none

[edit] Example

This example function will return the name of the blip owner (or "Unknown" if the blip is a global blip) when called.

  1.  
  2. // This is a custom function
  3. function GetBlipOwnerName( blip )
  4. {
  5. if ( blip.Owner ) return blip.Owner.Name;
  6. return "Unknown";
  7. }
  8.  

[edit] Notes

The function Player.Name was used in in this example. More info about it in the corresponding page.

Note that this function is a completely custom function, you'll have to call it using your own script.

[edit] Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox