fixed compiling errors

This commit is contained in:
Felix Geyer 2004-08-07 10:47:08 +00:00
parent d81f4af4c9
commit 574189468b
6 changed files with 17 additions and 15 deletions

View File

@ -147,7 +147,7 @@ public voteNextmap() {
return return
g_selected = true g_selected = true
new menu[512], a, mkeys = (1<<SELECTMAPS+1) new menu[512], a, mkeys = (1<<SELECTMAPS+1)
new pos = copy(menu,511,g_coloredMenus ? "\y%L:\w^n^n" : "%L:^n^n", LANG_SERVER, "CHOOSE_NEXTM") new pos = format(menu,511,g_coloredMenus ? "\y%L:\w^n^n" : "%L:^n^n", LANG_SERVER, "CHOOSE_NEXTM")
new dmax = (g_mapNums > SELECTMAPS) ? SELECTMAPS : g_mapNums new dmax = (g_mapNums > SELECTMAPS) ? SELECTMAPS : g_mapNums
for(g_mapVoteNum = 0;g_mapVoteNum<dmax;++g_mapVoteNum){ for(g_mapVoteNum = 0;g_mapVoteNum<dmax;++g_mapVoteNum){
a=random_num(0,g_mapNums-1) a=random_num(0,g_mapNums-1)

View File

@ -128,7 +128,7 @@ new g_SHeMessages[4][] = {
"SHE_MSG_1", "SHE_MSG_1",
"SHE_MSG_2", "SHE_MSG_2",
"SHE_MSG_3", "SHE_MSG_3",
"SHE_MSG_4", "SHE_MSG_4"
} }
new g_HeadShots[7][] = { new g_HeadShots[7][] = {
"HS_MSG_1", "HS_MSG_1",
@ -327,7 +327,7 @@ public eDeathMsg() {
read_data( 4 , weapon , 31 ) read_data( 4 , weapon , 31 )
get_players(players,pnum,"c") get_players(players,pnum,"c")
for (new i=0;i<pnum;i++) { for (new i=0;i<pnum;i++) {
fromat( message, 127, "%L",players[i],g_HeadShots[ random_num(0,6) ] ) format( message, 127, "%L",players[i],g_HeadShots[ random_num(0,6) ] )
replace( message, 127 , "$vn", victim ) replace( message, 127 , "$vn", victim )
replace( message, 127 , "$wn", weapon ) replace( message, 127 , "$wn", weapon )
replace( message, 127 , "$kn", killer ) replace( message, 127 , "$kn", killer )

View File

@ -301,20 +301,20 @@ public cmdPlugin(id,level,cid) {
else if ( equal(cmds, "pause" ) ) { else if ( equal(cmds, "pause" ) ) {
new arg[32], a ,len = read_argv(2,arg,31) new arg[32], a ,len = read_argv(2,arg,31)
if ( len && ((a = findPluginByFile(arg,len)) != -1) && !isSystem( a ) && pause("ac",arg) ) if ( len && ((a = findPluginByFile(arg,len)) != -1) && !isSystem( a ) && pause("ac",arg) )
console_print(id,"%L",id,"PLUGIN_MATCH",arg,id,"PAUSED") console_print(id,"%L %L",id,"PLUGIN_MATCH",arg,id,"PAUSED")
else console_print(id,"%L",id,"COULDNT_FIND",arg) else console_print(id,"%L",id,"COULDNT_FIND",arg)
} }
else if ( equal(cmds, "enable" ) ) { else if ( equal(cmds, "enable" ) ) {
new arg[32], a , len = read_argv(2,arg,31) new arg[32], a , len = read_argv(2,arg,31)
if ( len && (a = findPluginByFile(arg,len)) != -1 && !isSystem( a ) && unpause("ac",arg) ) if ( len && (a = findPluginByFile(arg,len)) != -1 && !isSystem( a ) && unpause("ac",arg) )
console_print(id,"%L",id,"PLUGIN_MATCH",arg,id,"UNPAUSED") console_print(id,"%L %L",id,"PLUGIN_MATCH",arg,id,"UNPAUSED")
else console_print(id,"%L",id,"COULDNT_FIND",arg) else console_print(id,"%L",id,"COULDNT_FIND",arg)
} }
else if ( equal(cmds, "stop" ) ) { else if ( equal(cmds, "stop" ) ) {
new arg[32], a, len = read_argv(2,arg,31) new arg[32], a, len = read_argv(2,arg,31)
if ( len && (a = findPluginByFile(arg,len)) != -1 && !isSystem( a ) && pause("dc",arg)){ if ( len && (a = findPluginByFile(arg,len)) != -1 && !isSystem( a ) && pause("dc",arg)){
g_Modified = 1 g_Modified = 1
console_print(id,"%L",id,"PLUGIN_MATCH",arg,id,"STOPPED") console_print(id,"%L %L",id,"PLUGIN_MATCH",arg,id,"STOPPED")
} }
else console_print(id,"%L",id,"COULDNT_FIND",arg) else console_print(id,"%L",id,"COULDNT_FIND",arg)
} }

View File

@ -378,15 +378,15 @@ public cmdRest(id,level,cid) {
if (start >= MAXMENUPOS) start = MAXMENUPOS - 1 if (start >= MAXMENUPOS) start = MAXMENUPOS - 1
new end = start + 10 new end = start + 10
if (end > MAXMENUPOS) end = MAXMENUPOS if (end > MAXMENUPOS) end = MAXMENUPOS
new lName[16],lValue[16],lStatus[16],lOnOf[16] new lName[16],lValue[16],lStatus[16],lOnOff[16]
format(lName,15,"%L",id,"NAME") format(lName,15,"%L",id,"NAME")
format(lValue,15,"%L",id,"VALUE") format(lValue,15,"%L",id,"VALUE")
format(lStatus,15,"%L",id,"STATUS") format(lStatus,15,"%L",id,"STATUS")
format(lOnOff,15,"%L",id,positionBlocked(a) ? "ON" : "OFF")
console_print(id, "^n----- %L: -----", id, "WEAP_RES") console_print(id, "^n----- %L: -----", id, "WEAP_RES")
console_print(id, " %-32.31s %-10.9s %-9.8s",lName,lValue,lStatus) console_print(id, " %-32.31s %-10.9s %-9.8s",lName,lValue,lStatus)
if ( start != -1 ) { if ( start != -1 ) {
for (new a = start; a < end; ++a) { for (new a = start; a < end; ++a) {
format(lOnOff,15,"%L",id,positionBlocked(a) ? "ON" : "OFF")
console_print(id, "%3d: %-32.31s %-10.9s %-9.8s",a + 1, console_print(id, "%3d: %-32.31s %-10.9s %-9.8s",a + 1,
g_WeaponNames[a], g_Aliases[a], lOnOff) g_WeaponNames[a], g_Aliases[a], lOnOff)
} }
@ -590,11 +590,11 @@ public fn_setautobuy(id) {
for (new i = 1; i < argCount; i++) { // Start at parameter 1; parameter 0 is just "cl_setautobuy" for (new i = 1; i < argCount; i++) { // Start at parameter 1; parameter 0 is just "cl_setautobuy"
read_argv(i, arg, 127) read_argv(i, arg, 127)
// Add this parameter to user's autobuy prefs // Add this parameter to user's autobuy prefs
autobuyLen += format(g_Autobuy[id][autobuyLen], AUTOBUYLENGTH - autobuyLen, "%s", arg) autobuyLen += format(g_Autobuy[id][autobuyLen], AUTOBUYLENGTH - autobuyLen, "%s", arg)
// If we detect more parameters, add a space // If we detect more parameters, add a space
if (i + 1 < argCount) if (i + 1 < argCount)
autobuyLen += format(g_Autobuy[id][autobuyLen], AUTOBUYLENGTH - autobuyLen, " ") autobuyLen += format(g_Autobuy[id][autobuyLen], AUTOBUYLENGTH - autobuyLen, " ")
} }
// Strip any blocked items // Strip any blocked items

View File

@ -98,7 +98,7 @@ public setMessage() {
server_print("%L",LANG_SERVER,"MIN_FREQ",minimal) server_print("%L",LANG_SERVER,"MIN_FREQ",minimal)
g_Frequency = minimal g_Frequency = minimal
} }
server_print("%L",LANG_SERVER,"MSG_FREQ") server_print("%L",LANG_SERVER,"MSG_FREQ",
g_Frequency/60,g_Frequency%60) g_Frequency/60,g_Frequency%60)
set_task(float(g_Frequency),"msgInit",123,"",0,"b") set_task(float(g_Frequency),"msgInit",123,"",0,"b")
} }

View File

@ -43,7 +43,9 @@ public plugin_init() {
} }
public client_disconnect(id) { public client_disconnect(id) {
if ( is_user_bot(id) ) return PLUGIN_CONTINUE if ( is_user_bot(id) ) {
return
}
remove_task(id) remove_task(id)
new szTeam[16],szName[32],szAuthid[32], iStats[8], iHits[8], szWeapon[24] new szTeam[16],szName[32],szAuthid[32], iStats[8], iHits[8], szWeapon[24]
new iUserid = get_user_userid( id ) new iUserid = get_user_userid( id )