Raised This Month: $ Target: $400
 0% 

Small Help Code Optimization , If someone can optimize for me this code ^^


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
FragPawn
Junior Member
Join Date: Dec 2014
Location: France
Old 08-29-2015 , 14:20   Small Help Code Optimization , If someone can optimize for me this code ^^
Reply With Quote #1

PHP Code:
public Musique_HandleridCTMenuitem )
{
        if( 
item == MENU_EXIT )
        {
                
menu_destroyCTMenu );
                return 
PLUGIN_HANDLED;
        }
        
        new 
szData];
        new 
iAccesshCallback;        
        
menu_item_getinfoCTMenuitemiAccessszData5__hCallback );
        
        new 
name32 ];
        
get_user_name(id,name,31)

        switch( 
str_to_numszData ) )
        {
                case 
0
                { 
                        
ColorChat(0RED"^4[PrisonBreak]^1 || Guard ^3%s^1 Start Song 1 || ^4!",name)
                        
client_cmd0"mp3 play ^"sound/Masters-PrisonBreak/Masters-music/Song1.mp3^"" );
                }
                case 
1:
                {  
                        
ColorChat(0RED"^4[PrisonBreak]^1 || Guard ^3%s^1 Start Song 2 || ^4!",name)
                        
client_cmd0"mp3 play ^"sound/Masters-PrisonBreak/Masters-music/Song2.mp3^"" );
                }
                case 
2:
                {     
                        
ColorChat(0RED"^4[PrisonBreak]^1 || Guard ^3%s^1 Start Song 3 || ^4!",name)
                        
client_cmd0"mp3 play ^"sound/Masters-PrisonBreak/Masters-music/Song3.mp3^"" );
                }
                case 
3:
                {   
                        
ColorChat(0RED"^4[PrisonBreak]^1 || Guard ^3%s^1 Start Song 4 || ^4!",name)
                        
client_cmd0"mp3 play ^"sound/Masters-PrisonBreak/Masters-music/Song4.mp3^"" );
                }
                case 
4
                {
                        
ColorChat(0RED"^4[PrisonBreak]^1 || Guard ^3%s^1 Start Song 5 || ^4!",name)
                        
client_cmd0"mp3 play ^"sound/Masters-PrisonBreak/Masters-music/Song5.mp3^"" );  
                }
                case 
5
                { 
                        
ColorChat(0RED"^4[PrisonBreak]^1 || Guard ^3%s^1 Start Song 6 || ^4!",name)
                        
client_cmd0"mp3 play ^"sound/Masters-PrisonBreak/Masters-music/Song6.mp3^"" );  
                }
        }   
        
menu_destroyCTMenu );
        return 
PLUGIN_HANDLED;


Last edited by Bugsy; 08-29-2015 at 15:40. Reason: Added php tags
FragPawn is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:12.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode