Forum

> > CS2D > Scripts > Random chance in a round?
Forums overviewCS2D overview Scripts overviewLog in to reply

English Random chance in a round?

3 replies
To the start Previous 1 Next To the start

moved Random chance in a round?

Louie
User Off Offline

Quote
I've seen in most Jail maps that there is a random chance that the Terrorist(Prisoners) get free ak47s and kevlar how do i do that also?

old Re: Random chance in a round?

MikuAuahDark
User Off Offline

Quote
1
2
3
4
5
6
local selected_id=0
addhook("startround","getrandomplayer")
function getrandomplayer()
	local list=player(0,"table")
	selected_id=list[math.random(1,#list)]
end

Something like that?
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview