Scripting/Squirrel/Functions/SetUseClasses: Difference between revisions
Jump to navigation
Jump to search
This wiki is using an old backup from 2020
Some information may be old/missing
No edit summary |
Kennedyarz (talk | contribs) |
||
Line 12: | Line 12: | ||
function onScriptLoad() | function onScriptLoad() | ||
{ | { | ||
AddClass( 1, RGB( 75, 215, 241 ) ,0, Vector( -378.79, -537.962, 17.2832 ), 140.020, 22, 999 ,17, 100, 21, 245 ); | |||
AddClass( 1, RGB( 140,250,300 ) ,11, Vector( -378.79, -537.962, 17.2832 ), 140.020, 25, 999 ,18, 999, 19, 999 ); | |||
AddClass( 1, RGB( 91, 21, 255 ) ,15, Vector( -378.79, -537.962, 17.2832 ), 140.020, 22, 999 ,17, 100, 21, 245 ); | |||
AddClass( 2, RGB( 221, 81, 9 ) ,83, Vector( -378.79, -537.962, 17.2832 ), 140.020, 22, 999 ,17, 100, 21, 245 ); | |||
AddClass( 2, RGB( 255, 51, 153 ) ,84, Vector( -378.79, -537.962, 17.2832 ), 140.020, 22, 999 ,17, 100, 21, 245 ); | |||
AddClass( 3, RGB( 241, 25, 123 ) ,122, Vector( -398.79, -517.962, 17.2832 ), 140.020, 20, 999 ,19, 100, 21, 245 ); | |||
AddClass( 4, RGB( 245, 56, 243 ) ,51, Vector( -398.79, -517.962, 17.2832 ), 140.020, 20, 999 ,19, 100, 21, 245 ); | |||
} | } | ||
function onPlayerRequestClass( player, classID, team, skin ) | |||
{ | |||
switch( skin ) | |||
{ | |||
case 0: | |||
{ | |||
Announce( "Tommy Vercetti", player, 6 ); | |||
} | |||
break; | |||
case 11: | |||
{ | |||
Announce( "Civilian", player, 6 ); | |||
} | |||
break; | |||
case 15: | |||
{ | |||
Announce( "DrugDealer", player, 6 ); | |||
} | |||
break; | |||
case 51: | |||
{ | |||
Announce( "Punk", player, 6 ); | |||
} | |||
break; | |||
case 122: | |||
{ | |||
Announce( "Robot", player, 6 ); | |||
} | |||
break; | |||
case 83: | |||
{ | |||
Announce( "Team Cuban", player, 6 ); | |||
} | |||
break; | |||
case 84: | |||
{ | |||
Announce( "Team Cuban", player, 6 ); | |||
} | |||
break; | |||
} | |||
} | |||
</source> | </source> |
Revision as of 20:57, 21 March 2016
This function will enable/disable use of classes
SetUseClasses( bool );
Arguments
- bool - true or false
Example
function onScriptLoad()
{
AddClass( 1, RGB( 75, 215, 241 ) ,0, Vector( -378.79, -537.962, 17.2832 ), 140.020, 22, 999 ,17, 100, 21, 245 );
AddClass( 1, RGB( 140,250,300 ) ,11, Vector( -378.79, -537.962, 17.2832 ), 140.020, 25, 999 ,18, 999, 19, 999 );
AddClass( 1, RGB( 91, 21, 255 ) ,15, Vector( -378.79, -537.962, 17.2832 ), 140.020, 22, 999 ,17, 100, 21, 245 );
AddClass( 2, RGB( 221, 81, 9 ) ,83, Vector( -378.79, -537.962, 17.2832 ), 140.020, 22, 999 ,17, 100, 21, 245 );
AddClass( 2, RGB( 255, 51, 153 ) ,84, Vector( -378.79, -537.962, 17.2832 ), 140.020, 22, 999 ,17, 100, 21, 245 );
AddClass( 3, RGB( 241, 25, 123 ) ,122, Vector( -398.79, -517.962, 17.2832 ), 140.020, 20, 999 ,19, 100, 21, 245 );
AddClass( 4, RGB( 245, 56, 243 ) ,51, Vector( -398.79, -517.962, 17.2832 ), 140.020, 20, 999 ,19, 100, 21, 245 );
}
function onPlayerRequestClass( player, classID, team, skin )
{
switch( skin )
{
case 0:
{
Announce( "Tommy Vercetti", player, 6 );
}
break;
case 11:
{
Announce( "Civilian", player, 6 );
}
break;
case 15:
{
Announce( "DrugDealer", player, 6 );
}
break;
case 51:
{
Announce( "Punk", player, 6 );
}
break;
case 122:
{
Announce( "Robot", player, 6 );
}
break;
case 83:
{
Announce( "Team Cuban", player, 6 );
}
break;
case 84:
{
Announce( "Team Cuban", player, 6 );
}
break;
}
}