Random ID on New Round
Ok im trying to pick 2 players randomly each round , 1 T and 1 CT , and make them a samari , set there knife model to the samari and so on . but this doesnt seem to work . It precaches the model , but its not setting. Thanks :wink:
Code:
|
Re: Random ID on New Round
Code:
// round start random playersCode:
g_CTSamari[CTs[random_num(0,CT_num-1)]] = 1 //or you could make it a boolean and set it to true, but 1 will work as wellCode:
for(new i=0; i<33; i++){ |
Re: Random ID on New Round
good idea. i dont quit understand what to do about the random. So your saying that my if conditions are the reason its not working properly ?
But i dint use a round start , round start uses a logevent which doesnt pass id's . im using New round event which is defierant and does pass id's. According to Vens tutorial on this . So what should i do to make it randomly choose a player on ct and t ?:| |
Re: Random ID on New Round
i told you...
Code:
CTs[random_num(0,CT_num-1)] |
Re: Random ID on New Round
thats what i did have for a random player. but i dont understand how im giving it the wrong id ??
|
Re: Random ID on New Round
there's no parameter passed through RoundStart event
so RoundStart(id) this id is some value or maybe 0, i'm not sure. random(t_num) == random_num(0, t_num-1) |
Re: Random ID on New Round
if you only want a t and a ct , you just need to do this
g_TSamari = Terrorist[random(T_num)]; g_CTSamari = CTs[random(CT_num)]; |
Re: Random ID on New Round
Quote:
http://forums.alliedmods.net/showthread.php?t=42159 But you think it will work if i dont use [id] ? |
Re: Random ID on New Round
um... ya... http://www.amxmodx.org/funcwiki.php?...vent&go=search
still think it passes the id? anyway, if you are to use jim_yang's method, you will need to change all your g_CTSamurai[id] to g_CTSamurai==id and same goes for T |
Re: Random ID on New Round
So how is it that curweapon events can have id as a paramter ? acording to VEN the only events that DONT have ID's passed are logevents.
anyways, well i got part of it working . my smoke for the samari works , after fuckign with it like jim said. but my models arnt setting any idea why ? can i use engfunc to set a weapon model ?:| |
| All times are GMT -4. The time now is 06:50. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.