Scripting/Squirrel/Functions/AddClass: Difference between revisions
		
		
		
		Jump to navigation
		Jump to search
		
This wiki is using an old backup from 2020
Some information may be old/missing
ProsuWANTED (talk | contribs)  (Undo revision 18228 by ProsuWANTED (talk))  | 
				No edit summary  | 
				||
| Line 35: | Line 35: | ||
=== Notes ===  | === Notes ===  | ||
Call [[Scripting/Squirrel/Events/Player/onScriptLoad|onScriptLoad]] were used in this example. More info about them in the corresponding pages.  | Call [[Scripting/Squirrel/Events/Player/onScriptLoad|onScriptLoad]] were used in this example. More info about them in the corresponding pages.  | ||
== Related Functions ==  | |||
{{Scripting/Squirrel/Functions/Spawn_and_Wasted_Screen_Functions}}  | |||
[[Category:Scripting/Squirrel/Functions/Spawn_and_Wasted_Screen_Functions]]  | |||
Latest revision as of 21:58, 30 January 2017
Adds a class to select.
Syntax
AddClass( class, color, skin, position, angle, weapon1, ammo1 ,weapon2, ammo2, weapon3, ammo3 );
Arguments
- int class - Class/team id
 - cRGB color - Color
 - int skin - Skin id
 - Vector position - Position of the class
 - float angle - Angle
 - int weapon1 - First weapon id of the class
 - int ammo1 - Ammo of the first weapon
 - int weapon2 - Second weapon id 2 of the class
 - int ammo2 - Ammo of the second weapon
 - int weapon3 - Third weapon id 3 of the class
 - int ammo3 - Ammo of the third weapon
 
Example
function onScriptLoad(){
    AddClass( 1, RGB( 24, 255, 241 ) ,0, Vector( -378.79, -537.962, 17.2832 ), 140.020, 21, 999 ,1, 1, 25, 255 );
    AddClass( 2, RGB( 100,200,300 ) ,5, Vector( -378.79, -537.962, 17.2832 ), 140.020, 21, 999 ,1, 1, 25, 255 );
    AddClass( 3, RGB( 51, 51, 255 ) ,97, Vector( -378.79, -537.962, 17.2832 ), 140.020, 21, 999 ,1, 1, 25, 255 );
    AddClass( 4, RGB( 121, 91, 9 ) ,16, Vector( -378.79, -537.962, 17.2832 ), 140.020, 21, 999 ,1, 1, 25, 255 );
    AddClass( 5, RGB( 255, 51, 153 ) ,34, Vector( -378.79, -537.962, 17.2832 ), 140.020, 21, 999 ,1, 1, 25, 255 );
}Notes
Call onScriptLoad were used in this example. More info about them in the corresponding pages.