29.11.2011, 19:05
Well..First of All - Hello Everybody , I Am new to Scripting and i really want to learn , Anyway..
I made this Code :
I want to add this to it :
- Any Help would be Appreciated And i really want to know how to open the bracket again under PlayerPlaySound to add those
I made this Code :
PHP код:
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerInterior(playerid,0);
SetPlayerPos( playerid, 1455.2064, -785.1923, 99.8605 );
SetPlayerFacingAngle( playerid, 139.1213 );
SetPlayerCameraPos( playerid, 1453.343, -787.109, 100.860 );
SetPlayerCameraLookAt( playerid, 1455.2064, -785.1923, 99.8605 );
ApplyAnimation( playerid, "DANCING", "DNCE_M_B", 4.0, 1, 0, 0, 0, -1 );
PlayerPlaySound( playerid, 1097, -119.9460, 23.1096, 12.2238 );
}
PHP код:
public OnPlayerRequestClass( playerid, classid ) // This is called when a player is on class selection
{
switch ( classid ) // This is like a if/elseif statement.
{
case 0: // If the classid is 0
{ // Then
GameTextForPlayer( playerid, "~r~TEAM Ballas", 300, 3 ); // Sends a gametext for player // ~r~ is a red color in gametext. // Arguments : Player ID, const string[ ], time ( milliseconds ), style // Wiki for more info
SetPlayerTeam( playerid, TEAM_BALLAS ); // Sets the player's team to TEAM_BALLAS
}
case 1: // If the classid is 1
{ // Then
GameTextForPlayer( playerid, "~g~TEAM CJ", 300, 3 ); // Sends a gametext for player // ~g~ is a green color in gametext. // Arguments : Player ID, const string[ ], time ( milliseconds ), style // Wiki for more info
SetPlayerTeam( playerid, TEAM_CJ ); // Sets the player's team to TEAM_CJ }
case 2: // If the classid is 2
{ // Then
GameTextForPlayer( playerid, "~g~TEAM CJ", 300, 3 ); // Sends a gametext for player // ~g~ is a green color in gametext. // Arguments : Player ID, const string[ ], time ( milliseconds ), style // Wiki for more info
SetPlayerTeam( playerid, TEAM_CJ ); // Sets the player's team to TEAM_CJ
}
}
return 1; // This means the callback is executed succesfully AFAIK.}