mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 06:15:37 +03:00
Removing task waiting to call dispInfo if client disconnects before the task is executed. This fixes run time errors.
This commit is contained in:
parent
3774575160
commit
7b8165fe6f
@ -45,8 +45,14 @@ public plugin_init() {
|
||||
|
||||
#if defined DISPLAY_MSG
|
||||
public client_putinserver(id) {
|
||||
if (is_user_bot(id))
|
||||
return
|
||||
set_task(15.0,"dispInfo",id)
|
||||
}
|
||||
|
||||
public client_disconnect(id) {
|
||||
remove_task(id)
|
||||
}
|
||||
#endif
|
||||
|
||||
public cmdHelp(id,level,cid) {
|
||||
@ -88,8 +94,6 @@ public cmdHelp(id,level,cid) {
|
||||
|
||||
#if defined DISPLAY_MSG
|
||||
public dispInfo(id) {
|
||||
if (!is_user_connected(id))
|
||||
return
|
||||
client_print(id,print_chat,"%L",id,"TYPE_HELP")
|
||||
new nextmap[32]
|
||||
get_cvar_string("amx_nextmap",nextmap,31)
|
||||
|
@ -71,10 +71,14 @@ public plugin_init()
|
||||
|
||||
#if defined DISPLAY_MSG
|
||||
public client_putinserver(id) {
|
||||
if (get_cvar_num("amx_client_languages"))
|
||||
if (get_cvar_num("amx_client_languages") && !is_user_bot(id))
|
||||
set_task(10.0,"dispInfo",id)
|
||||
}
|
||||
|
||||
public client_disconnect(id) {
|
||||
remove_task(id)
|
||||
}
|
||||
|
||||
public dispInfo(id)
|
||||
{
|
||||
if (get_cvar_num("amx_client_languages"))
|
||||
|
Loading…
Reference in New Issue
Block a user