// =============================================================================== // DESCRIPTION: Called whenever a player joins the server // CALLED BY: Game // PARAMS: name // accountid // clientid // index // TYPE: Server-Side // =============================================================================== // Init ========================================================================== @INIT CreateVar string _svr_mapname #__mapname# CreateVar string _cl_mapname #_cl_|#GetScriptParam(clientid)|#_mapname# if #StringEquals(|#_svr_mapname|#,|#_cl_mapname|#)# goto DEBUG if [vid_width != "0"] goto DEBUG Sleep 1000 CreateVar string _cl_#GetScriptParam(clientid)#_mapname #_svr_mapname# ClientExecScript #GetScriptParam(clientid)# _CL_PLAYER :: RECONNECT goto EOF if [__debug == 1] goto DEBUG goto SCRIPT // =============================================================================== // Debug ========================================================================= @DEBUG Echo #__debug_prefix#"Calling script playerjoin" goto SCRIPT // =============================================================================== // Script ======================================================================== @SCRIPT Echo #__debug_prefix#"playerjoin: Player name: "#GetScriptParam(name)#" accountid: "#GetScriptParam(accountid)#" clientid: "#GetScriptParam(clientid)#" index: "#GetScriptParam(index)# ExecScript _SVR_PLAYER :: REGISTER clientid #GetScriptParam(clientid)# if [__clients < __start_game_min] SendMessage -1 "^rDUELARENA^yWaiting for "[__start_game_min - __clients]" players to BEGIN" if [__clients == __start_game_min] "ExecScript _SVR_GAME :: RESET do START;" ExecScript _SVR_PLAYER :: JOIN clientid #GetScriptParam(clientid)# goto EOF @EOF // ===============================================================================