Quote:
Originally Posted by D3XT3R
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_model, szFlags, 11)
new iChosen = read_flags(szFlag[clamp(random(strlen(szFlags)), 0, charsmax(supplybox_model)]);
for(new i ; i < supplybox_model;i++)
{
if(iChosen == (1<<i))
return i;
}
return 0;
}
// latter on .....
entity_set_model( ent, supplybox_model[ get_random_supplybox_mdl() ] )
__________________