Minor fixes to stop crashing in Zombie Panic

(Don't send SVC_INTERMISSION if running zp)
This commit is contained in:
Steve Dudenhoeffer 2004-11-06 00:24:55 +00:00
parent 09c1471c3a
commit 5dfbcf2a23
2 changed files with 24 additions and 9 deletions

View File

@ -353,8 +353,12 @@ public cmdMap(id,level,cid) {
case 1: client_print(0,print_chat,"%L",LANG_PLAYER,"ADMIN_MAP_1",arg) case 1: client_print(0,print_chat,"%L",LANG_PLAYER,"ADMIN_MAP_1",arg)
} }
log_amx("Cmd: ^"%s<%d><%s><>^" changelevel ^"%s^"", name,get_user_userid(id),authid, arg) log_amx("Cmd: ^"%s<%d><%s><>^" changelevel ^"%s^"", name,get_user_userid(id),authid, arg)
message_begin(MSG_ALL, SVC_INTERMISSION) new _modName[10]
message_end() get_modname(_modName,9)
if (!equal(_modName,"zp")) {
message_begin(MSG_ALL, SVC_INTERMISSION)
message_end()
}
set_task(2.0,"chMap",0,arg,arglen+1) set_task(2.0,"chMap",0,arg,arglen+1)
return PLUGIN_HANDLED return PLUGIN_HANDLED
} }

View File

@ -82,8 +82,12 @@ public actionResult(id,key) {
remove_task( 4545454 ) remove_task( 4545454 )
switch (key){ switch (key){
case 0: { case 0: {
message_begin(MSG_ALL, SVC_INTERMISSION) new _modName[10]
message_end() get_modname(_modName,9)
if (!equal(_modName,"zp")) {
message_begin(MSG_ALL, SVC_INTERMISSION)
message_end()
}
set_task(2.0,"delayedChange",0, g_mapName[ g_choosed ] , strlen(g_mapName[ g_choosed ]) + 1 ) set_task(2.0,"delayedChange",0, g_mapName[ g_choosed ] , strlen(g_mapName[ g_choosed ]) + 1 )
log_amx("Vote: %L" , "en", "RESULT_ACC") log_amx("Vote: %L" , "en", "RESULT_ACC")
client_print(0,print_chat, "%L", LANG_PLAYER, "RESULT_ACC") client_print(0,print_chat, "%L", LANG_PLAYER, "RESULT_ACC")
@ -118,8 +122,12 @@ public checkVotes( id ) {
set_task(10.0,"autoRefuse",4545454) set_task(10.0,"autoRefuse",4545454)
} }
else { else {
message_begin(MSG_ALL, SVC_INTERMISSION) new _modName[10]
message_end() get_modname(_modName,9)
if (!equal(_modName,"zp")) {
message_begin(MSG_ALL, SVC_INTERMISSION)
message_end()
}
set_task(2.0,"delayedChange",0, g_mapName[ g_choosed ] , strlen(g_mapName[ g_choosed ]) + 1 ) set_task(2.0,"delayedChange",0, g_mapName[ g_choosed ] , strlen(g_mapName[ g_choosed ]) + 1 )
} }
} }
@ -352,9 +360,12 @@ public actionMapsMenu(id,key) {
{ {
new a = g_menuPosition[id] * 8 + key new a = g_menuPosition[id] * 8 + key
message_begin(MSG_ALL, SVC_INTERMISSION) new _modName[10]
message_end() get_modname(_modName,9)
if (!equal(_modName,"zp")) {
message_begin(MSG_ALL, SVC_INTERMISSION)
message_end()
}
new authid[32],name[32] new authid[32],name[32]
get_user_authid(id,authid,31) get_user_authid(id,authid,31)
get_user_name(id,name,31) get_user_name(id,name,31)