AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Random (https://forums.alliedmods.net/showthread.php?t=135253)

zirualas 08-14-2010 08:11

Random
 
How i can do a random skin?

naven 08-14-2010 08:18

Re: Random
 
You mean from default skins?
Do it that way:
PHP Code:

new variable random_num(13);
switch(
variable)
{
case 
//first model
case //second model
case //third model
//etc.



mottzi 08-14-2010 08:24

Re: Random
 
@ Zirualas Just a tipp; When you dont need the Random Integer anywhere out of the Block you can do like that:

PHP Code:

switch(random_num(13)) 

case 
//first model 
case //second model 
case //third model 
//etc. 



zirualas 08-14-2010 08:26

Re: Random
 
Thanks :)

mottzi 08-14-2010 08:31

Re: Random
 
Next Time use search :)

Bugsy 08-14-2010 09:41

Re: Random
 
PHP Code:

new const szModels[][] = 

     
"/model1.abc",
     
"/model2.abc",
     
"/model3.abc",
     
"/model4.abc"
};

SetModelFuncid szModelsrandomsizeofszModels ) ) ] ); 



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

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