Scripting/Squirrel/Functions/SetUseClasses: Difference between revisions

From Vice City Multiplayer
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing
No edit summary
 
(One intermediate revision by one other user not shown)
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 );
SetUseClasses( true );
    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 )
 
</source>
 
 
 
<source lang=squirrel>
function onScriptLoad()
{
{
switch( skin )
SetUseClasses( false );
    {
    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>


== Related Functions ==


</source>
{{Scripting/Squirrel/Functions/Spawn_and_Wasted_Screen_Functions}}
[[Category:Scripting/Squirrel/Functions/Spawn_and_Wasted_Screen_Functions]]

Latest revision as of 21:59, 30 January 2017

This function will enable/disable use of classes

SetUseClasses( bool );

Arguments

  • bool - true or false

Example

function onScriptLoad()
{
SetUseClasses( true );
}


function onScriptLoad()
{
SetUseClasses( false );
}

Related Functions