Squirrel/Server/Functions/Pickups/Model

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with '{{Squirrel/Title|Pickup.Model}} __NOTOC__ This ''Pickup'' class member returns the Model of the given pickup. == Syntax == <code>Integer pickup.Model</code> == Example == {{Sq…')
 
(Example)
 
Line 8: Line 8:
 
== Example ==
 
== Example ==
  
{{Squirrel/NeedsExample}}
+
This will tell the player what pickup model they just collected
Explanation for the example
+
  
 
<code lang="squirrel">
 
<code lang="squirrel">
-- Todo
+
function onPickupPickedUp( pPlayer, pPickup )
 +
{
 +
MessagePlayer( "Pickup Model: " + pPickup.Model, pPlayer );
 +
 +
return 1;
 +
}
 
</code>
 
</code>
  
 
=== Notes ===
 
=== Notes ===
  
-- List of used functions and other notes here.  
+
The function [[Squirrel/Server/Functions/Messages/MessagePlayer|MessagePlayer]] and event [[Squirrel/Server/Events/Pickup/onPickupPickedUp|onPickupPickedUp]] were used in this example. More info about them in the corresponding pages.
 
+
  
 
== Related Functions ==
 
== Related Functions ==
  
 
{{Squirrel/Server/Functions/Pickups}}
 
{{Squirrel/Server/Functions/Pickups}}

Latest revision as of 17:57, 23 October 2010

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


This Pickup class member returns the Model of the given pickup.

[edit] Syntax

  1. Integer pickup.Model

[edit] Example

This will tell the player what pickup model they just collected

  1.  
  2. function onPickupPickedUp( pPlayer, pPickup )
  3. {
  4. MessagePlayer( "Pickup Model: " + pPickup.Model, pPlayer );
  5. return 1;
  6. }
  7.  

[edit] Notes

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

[edit] Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox