Raised This Month: $ Target: $400
 0% 

Reduce code


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Eviatar Mor
Senior Member
Join Date: Jun 2014
Location: israel
Old 01-02-2015 , 08:17   Re: Reduce code
Reply With Quote #1

Quote:
Originally Posted by YamiKaitou View Post
Why? There is nothing wrong with that
i can't make this smaller ?
PHP Code:
    if(cs_get_terrorist_count(1) == && get_pcvar_num(toao_voice) == 0){ 
        
set_dhudmessage(random(256), random(256), random(256)); 
        
show_dhudmessage(0"%s The Last And Only!"tName
    } 
    if(
cs_get_terrorist_count(1) == && get_pcvar_num(toao_voice) == 1){ 
        
set_dhudmessage(random(256), random(256), random(256)); 
        
show_dhudmessage(0"%s The Last And Only!"tName
        
client_cmd(read_data(2), "spk %s"g_szSoundVoice); 
    } 
    if(
cs_get_terrorist_count(1) == && get_pcvar_num(toao_voice) == 2){ 
        
set_dhudmessage(random(256), random(256), random(256)); 
        
show_dhudmessage(0"%s The Last And Only!"tName
        
client_cmd(read_data(2), "spk %s"g_szSoundVoice1); 
    } 
because i dont want to make always like that:
get_pcvar_num(toao_voice) == 0:
PHP Code:
if(cs_get_terrorist_count(1) == && get_pcvar_num(toao_voice) == 0){ 
        
set_dhudmessage(random(256), random(256), random(256)); 
        
show_dhudmessage(0"%s The Last And Only!"tName
    } 
get_pcvar_num(toao_voice) == 1:
PHP Code:
if(cs_get_terrorist_count(1) == && get_pcvar_num(toao_voice) == 1){ 
        
set_dhudmessage(random(256), random(256), random(256)); 
        
show_dhudmessage(0"%s The Last And Only!"tName
client_cmd(read_data(2), "spk %s"g_szSoundVoice);
    } 
get_pcvar_num(toao_voice) == 2:
PHP Code:
if(cs_get_terrorist_count(1) == && get_pcvar_num(toao_voice) == 2){ 
        
set_dhudmessage(random(256), random(256), random(256)); 
        
show_dhudmessage(0"%s The Last And Only!"tName
client_cmd(read_data(2), "spk %s"g_szSoundVoice1);
    } 
Eviatar Mor is offline
Reply



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 15:17.


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