Brackets
#1

Well..First of All - Hello Everybody , I Am new to Scripting and i really want to learn , Anyway..

I made this Code :

PHP код:
public OnPlayerRequestClass(playeridclassid)
{
    
SetPlayerInterior(playerid,0);
    
SetPlayerPosplayerid1455.2064, -785.192399.8605 );
    
SetPlayerFacingAngleplayerid139.1213 );
    
SetPlayerCameraPosplayerid1453.343, -787.109100.860 );
    
SetPlayerCameraLookAtplayerid1455.2064, -785.192399.8605 );
    
ApplyAnimationplayerid"DANCING""DNCE_M_B"4.01000, -);
    
PlayerPlaySoundplayerid1097, -119.946023.109612.2238 );

I want to add this to it :

PHP код:
public OnPlayerRequestClassplayeridclassid //  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            
GameTextForPlayerplayerid"~r~TEAM Ballas"300);            // Sends a gametext for player            // ~r~ is a red color in gametext.            // Arguments : Player ID, const string[ ], time ( milliseconds ), style             // Wiki for more info            
SetPlayerTeamplayeridTEAM_BALLAS ); // Sets the player's team to TEAM_BALLAS       
 
}        
case 
1// If the classid is 1        
// Then            
GameTextForPlayerplayerid"~g~TEAM CJ"300);            // Sends a gametext for player            // ~g~ is a green color in gametext.            // Arguments : Player ID, const string[ ], time ( milliseconds ), style             // Wiki for more info            
SetPlayerTeamplayeridTEAM_CJ ); // Sets the player's team to TEAM_CJ        }        
case 2// If the classid is 2       
 
// Then            
GameTextForPlayerplayerid"~g~TEAM CJ"300);            // Sends a gametext for player            // ~g~ is a green color in gametext.            // Arguments : Player ID, const string[ ], time ( milliseconds ), style             // Wiki for more info            
SetPlayerTeamplayeridTEAM_CJ ); // Sets the player's team to TEAM_CJ        
}    
}        
return 
1// This means the callback is executed succesfully AFAIK.} 
- Any Help would be Appreciated And i really want to know how to open the bracket again under PlayerPlaySound to add those
Reply


Messages In This Thread
Brackets - by Black Axe - 29.11.2011, 19:05
Re: Brackets - by Kingunit - 29.11.2011, 19:06
Re: Brackets - by Black Axe - 29.11.2011, 19:08
Re: Brackets - by Kingunit - 29.11.2011, 19:11
Re: Brackets - by Kostas' - 29.11.2011, 19:11
Re: Brackets - by Black Axe - 29.11.2011, 19:15

Forum Jump:


Users browsing this thread: 1 Guest(s)