Raised This Month: $ Target: $400
 0% 

[HELP] Fix method random_num


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
extream87
Senior Member
Join Date: Aug 2011
Old 03-11-2014 , 20:39   [HELP] Fix method random_num
Reply With Quote #1

What is the best method to do this?
Sometimes the hudmessage not appear but the sound works.
Code:
public plugin_init() { register_event("HLTV","rnstart","a", "1=0", "2=0"); } public rnstart(id) {     if(get_pcvar_num(rnstartcvar) == 1)     {     firstblood = 1           new rand = random_num(1,3)     switch(rand)     {     case 1:     {         set_hudmessage(255, 0, 255, -1.0, 0.30, 0, 6.0, 6.0)         show_hudmessage(0, "P R E P A R E 1 !")         client_cmd(0,"spk sound/Prepare1.wav")     }     case 2:     {         set_hudmessage(255, 0, 255, -1.0, 0.30, 0, 6.0, 6.0)         show_hudmessage(0, "P R E P A R E 2 !")         client_cmd(0,"spk sound/Prepare2.wav")     }     case 3:     {         set_hudmessage(255, 0, 255, -1.0, 0.30, 0, 6.0, 6.0)         show_hudmessage(0, "P R E P A R E 3 !")         client_cmd(0,"spk sound/Prepare3.wav")     }     }       } }

Last edited by extream87; 03-11-2014 at 20:43.
extream87 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 06:01.


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