Thread: Model Set
View Single Post
Natsheh
Veteran Member
Join Date: Sep 2012
Old 04-10-2018 , 11:08   Re: Model Set
Reply With Quote #6

Quote:
Originally Posted by D3XT3R View Post
out from my thread! i cant to explain for stupid...learn pawn then come with something new...
You cant tell some1 to not comment on your threads its a freewill, he is trying to help you as i can see your description is totally not-understandable make sure to fix all your typing mistakes, and one more thing be respectful to gain respect.

OP your problem will be solved by setting a bitsum value for each flag

PHP Code:
enum |=  (1<<
{
   
Supplybox 0,
   
Supplybox2,
   
SupplyboxRex,
   
SupplyboxRex2,
   
SupplyboxHms,
   
SupplyboxBio
   SupplyboxUmb
,
   
SupplyboxUmb2,
   
SupplyboxZbs,
   
SupplyboxClassic }

public 
get_random_supplybox_mdl()
{
   new 
szFlags[12]
   
get_pcvar_string(cvar_modelszFlags11)

   new 
iChosen read_flags(szFlag[clamp(random(strlen(szFlags)), 0charsmax(supplybox_model)]);
   
   for(new 
supplybox_model;i++)
   {
      if(
iChosen == (1<<i))
            return 
i;
   }
   return 
0;
}


// latter on .....
entity_set_modelentsupplybox_modelget_random_supplybox_mdl() ] ) 
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 04-10-2018 at 11:33.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh