Forum

> > CS2D > General > Help Commands and Functions
ForenübersichtCS2D-ÜbersichtGeneral-ÜbersichtEinloggen, um zu antworten

Englisch Help Commands and Functions

6 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Help Commands and Functions

Holloweye
User Off Offline

Zitieren
1: Is there any command or lua script to force a player to change team?

2: Is there any command or lua script to remove the c4 in the game? (I have tried with "parse("strip "..p.." "..5)" it dont work)

alt Re: Help Commands and Functions

Lee
Moderator Off Offline

Zitieren
Holloweye hat geschrieben
1: Is there any command or lua script to force a player to change team?


if you're using amx2d

1
2
3
4
function adm_swap_admin(p, typ, cmd)
	cmd = args(cmd, "id_id, team")
	parse("make"..cmd.team.." "..cmd.id)
end

if not

1
2
3
4
5
6
7
8
9
10
11
12
add_hook("say", "swap")
function swap(p, t)
	if t:sub(1, 6) == "@swap " then
		local pl = t:sub(7, 8)
		local team = t:sub(9)
		for word in team:gmatch("[^%s]+") do
			team = word
			break
		end
		parse("make"..team.." "..pl)
	end
end

alt Re: Help Commands and Functions

DC
Admin Off Offline

Zitieren
the cs2d commands are simply
cs2d cmd maket and cs2d cmd makect and cs2d cmd makespec (click for details)
you can execute cs2d commands in Lua by using the parse command.
for example parse("makect "..id) this will make the player with the id "id" (variable) a ct.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antwortenGeneral-ÜbersichtCS2D-ÜbersichtForenübersicht