Forum

> > CS2D > Scripts > how to make lua left game and join
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch how to make lua left game and join

4 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt how to make lua left game and join

maninja
User Off Offline

Zitieren
Hello guys !

I need someone to help me for make a lua I will explain to you how to know what I mean For Example 'When one joins the server, you have a writing meant to have player join in server when to the server ' and etc too left game
1
parse('hudtxt 32 "©000255255'..player(id, "name")..' ©000255255has join in game" 5 412')
and left game
1
parse('hudtxt 32 "©000255255'..player(id, "name")..' ©000255255has left the game" 5 412')

alt Re: how to make lua left game and join

Cebra
User Off Offline

Zitieren
if I understand you right, this should help you:

1
2
3
4
5
addhook("join","_join")
function _join(id)
	parse('hudtxt 32 "\169000255255'..player(id, "name")..' ©000255255has join in game" 5 412')
	timer(2500,"parse",'hudtxt 32 "" 0 0')
end

1
2
3
4
5
addhook("leave","_leave")
function _leave(id,reason)
	parse('hudtxt 32 "\169000255255'..player(id, "name")..' ©000255255has left the game" 5 412')
	timer(2500,"parse",'hudtxt 32 "" 0 0')
end
1× editiert, zuletzt 29.09.18 19:55:23

alt Re: how to make lua left game and join

GeoB99
Moderator Off Offline

Zitieren
You do not have to use cs2d cmd hudtxt just to display a simple "join/left" message in the screen. cs2d lua cmd msg can do the job for you and the message will also fade automatically after a short period of time.

@user Cebra: Please use
\169
for character colour output.

alt Re: how to make lua left game and join

script favor
User Off Offline

Zitieren
Try this :

1
2
3
4
5
6
7
8
9
10
11
12
13
if not easy == {} then easy = {} end

easy = {}


function easy.PlayerJoin(ParamPlayer)
	easy.name = player(ParamPlayer,"name")
		msg(easy.name.." Has joined the fucking server")
		end
	
	
	
addhook("join","easy.PlayerJoin")
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht