Raised This Month: $12 Target: $400
 3% 

set case 1 ~ case 100 to simple code


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
luverr
Junior Member
Join Date: Nov 2007
Old 06-11-2008 , 17:14   set case 1 ~ case 100 to simple code
Reply With Quote #1

HI,
First of all i had searched "simple code" for 1 hours.

but i can't find it

so i write this Thread

Quote:
new random = random_num(0,100)
switch(random)
{
case 1 : set_pev(id,pev_viewmodel,"models/v_knife.mdl")
.....
case 100 : set_pev(id,pev_viewmodel,"models/custom/v_custom.mdl")
}
Quote is example

if number(case number) is 1 2 3 ~ 97 98 100,
Should i write such like QUOTE?

if the answer is no, Would you tell me the Way?

-----------------------------------------------------------------------

i'm non english culture
i'm Asian

Last edited by luverr; 06-11-2008 at 17:18.
luverr is offline
 


Thread Tools
Display Modes

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


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