Forum

> > CS2D > Scripts > Tournament script request
Forums overviewCS2D overview Scripts overviewLog in to reply

English Tournament script request

13 replies
To the start Previous 1 Next To the start

old Tournament script request

kerker
User Off Offline

Quote
Hi!
I need a script that meets the following criteria:
Admin can write a command: !players. It shows the list of players. Is visible to all.To hide the list, the Administrator must write this command again.
I can clarify if you do not understand.

old Re: Tournament script request

kerker
User Off Offline

Quote
Meaning the list of players on the screen. I forgot to mention that when it is visible - all players can't move.
Gee-Gee-Gee.That they are all paralyzed. IMG:https://all-cs.net.ru/img/smiles/trollface.gif

old Re: Tournament script request

GeoB99
Moderator Off Offline

Quote
Couldn't get the point why you want all the players froze when showing the list of all visible players but here you go.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
local AdminList = {} -- The U.S.G.N ID must be written here, multiple IDs must be separated with a comma

function ShowPlayersSay(id, message)
   for _, USGNID in pairs( AdminList ) do
      if ( player(id, 'usgn') == USGNID ) then
         if ( string.sub(message, 1, 8) == '!players' ) then
            
            local PlayerList = player(0, 'tableliving')

            for _, id in pairs( PlayerLIst ) do
               msg('The list of all players present in the server ' .. player(id, 'name'))
               for _, all in pairs( player(0, 'tableliving') ) do
                  parse('speedmod ' .. all .. ' -100')
               end
            end
         end
      end
   end
end

addhook('say', 'ShowPlayersSay')
It'll only show the list of living players - Spectators are excluded from the list.

old Re: Tournament script request

Bowlinghead
User Off Offline

Quote
Here is some untested code to give you inspiration.
If you want to modify speed you should use setSpeed()
More >

EDIT: This script will show you all player on screen; not on the server
edited 1×, last 23.10.16 02:47:01 pm

old Re: Tournament script request

GeoB99
Moderator Off Offline

Quote
@user kerker: That'd mean everything. Does the other script use the same local variable identifier
local AdminList
? Does the other script use the same command name? What scripts do you use?

old Re: Tournament script request

GeoB99
Moderator Off Offline

Quote
Took a look at user Baloon's code. I don't see any identifier or such that conflicts with my code. If things get weird just disable all the following script(s) with two dashes (
--dofile('SCRIPTPATH')
) through server.lua file.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview