View Full Version : Event
h0_noMan
12-19-2007, 03:13 PM
Hi all.
Before starting i wanna apologyze for my mistakes, i am French.
I am a beginner in DoD Scripting.
I have started a plugin : Checkpoint for KZ or stunt map.
I wanna know what event is activated when a player join (or leave).
Thanks.
h0_noMan
12-19-2007, 05:32 PM
I found it alone :
register_event("TextMsg","function","a","1=3","2=#game_joined_team")
diamond-optic
12-19-2007, 09:03 PM
if you want to have seperate ones for each team use something like:
register_event("TextMsg","join_axis_function","a","1=3","2=#game_joined_team","4=Axis") //joined axis
register_event("TextMsg","join_allies_function","a","1=3","2=#game_joined_team","4=Allies") //joined allies
register_event("TextMsg","join_spec_function","a","1=3","2=#game_joined_team","4=Spectators") //joined spec
Wilson [29th ID]
12-20-2007, 12:24 AM
Hi all.
I wanna know what event is activated when a player join (or leave).
Join/Leave, not join team.
h0_noMan,
Go to amxmodx/scripting/includes and open amxmodx.inc
You will see a bunch of forwards in there. A few lines down, you will see:
client_connect(id)
client_disconnect(id)
Those are called when clients join/leave.
For example,
public client_connect(id) {
log_amx( "Client %i joined the server", id )
}
public client_disconnect(id) {
log_amx( "Client %i left the server", id )
}
h0_noMan
12-20-2007, 03:34 AM
Thanks to you 2.
vBulletin® v3.8.6, Copyright ©2000-2010, Jelsoft Enterprises Ltd.