English Random make t per round

5 replies
Goto Page
To the start Previous 1 Next To the start
20.05.13 10:56:51 pm
Up
limonata
User
Offline Off
Hi guys. I tried to make a script but i couldnt.

Firstly all players will be teror. On the startround just one player will join ct it will be random. It will be same with endround.

My try;
Spoiler >


Thanks all.
21.05.13 10:39:57 am
Up
Infinite Rain
Reviewer
Offline Off
Code:
1
2
3
4
5
6
7
addhook('endround', 'endround_hook')
function endround_hook(mode)
     for k, v in pairs(player(0, 'team2')) do
          parse('maket '.. v)
     end
     parse('makect '.. player(0, 'team1')[math.random(1, #player(0, 'team1'))])
end

Haven't tested it.
edited 1×, last 21.05.13 01:57:42 pm
A thousand may fall at your side, ten thousand at your right hand, but it will not come near you. You will only look with your eyes and see the recompense of the wicked. - Psalm 91:7-8 ESV
21.05.13 01:00:05 pm
Up
TimeQuesT
User
Offline Off
@user Infinite Rain: Line 6, you have to add an additional " ' " near the first "team1".
Code:
1
parse('maket '.. player(0, 'team1')[math.random(1, #player(0, 'team1'))])
Muh
21.05.13 01:43:33 pm
Up
EngiN33R
Moderator
Offline Off
And secondly, line 6 should be 'makect'.
I code, therefore I exist. | Visit my blog for Lua tips and other interesting info
21.05.13 01:57:18 pm
Up
Infinite Rain
Reviewer
Offline Off
@user EngiN33R: @user TimeQuesT:
Ty, will fix it now.
A thousand may fall at your side, ten thousand at your right hand, but it will not come near you. You will only look with your eyes and see the recompense of the wicked. - Psalm 91:7-8 ESV
21.05.13 03:25:26 pm
Up
limonata
User
Offline Off
I tested. But on the end of the round the ct should be teror. And random teror should be ct. But there is a two ct on the end of the round. It should be one.

And i cant make all terrorist.

I removed all bots. And joined the teror. Then I added a bot to terrorist then we were ct.
To the start Previous 1 Next To the start