Scripting/Squirrel/Functions/AddClass
Jump to navigation
Jump to search
This wiki is using an old backup from 2020
Some information may be old/missing
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.