Forum

> > CS2D > Scripts > Tournament script request
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Tournament script request

13 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Tournament script request

kerker
User Off Offline

Zitieren
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.

alt Re: Tournament script request

kerker
User Off Offline

Zitieren
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

alt Re: Tournament script request

GeoB99
Moderator Off Offline

Zitieren
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.

alt Re: Tournament script request

Bowlinghead
User Off Offline

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

EDIT: This script will show you all player on screen; not on the server
1× editiert, zuletzt 23.10.16 14:47:01

alt Re: Tournament script request

GeoB99
Moderator Off Offline

Zitieren
@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?

alt Re: Tournament script request

GeoB99
Moderator Off Offline

Zitieren
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.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht