yet another fix

This commit is contained in:
Felix Geyer 2004-08-03 23:59:05 +00:00
parent fdbcb8b9df
commit 525f13662e

View File

@ -87,7 +87,7 @@ public cmdCancelVote(id,level,cid) {
console_print(id, "%L", id, "VOTING_CANC" )
client_print(0,print_chat,"%L",LANG_PLAYER,"VOTING_CANC")
remove_task( 99889988 , 1 )
set_cvar_float( "amx_last_voting" , get_gametime() )
set_cvar_float( "amx_last_voting" , get_gametime() )
}
else
console_print(id, "%L", id, "NO_VOTE_CANC" )
@ -105,7 +105,7 @@ public autoRefuse() {
public actionResult(id,key) {
remove_task( 4545454 )
switch (key){
switch (key) {
case 0: {
set_task(2.0,"delayedExec",0,g_Execute,g_execLen)
log_amx("Vote: %L","en","RES_ACCEPTED")
@ -133,17 +133,17 @@ public checkVotes() {
for (i=0;i<pnum;i++) {
format(lVotingFailed,63,"%L",players[i],"VOTING_FAILED")
if (g_yesNoVote)
client_print(0,print_chat,"%L",players[i],"VOTING_RES_1",
client_print(players[i],print_chat,"%L",players[i],"VOTING_RES_1",
lVotingFailed,g_voteCount[0],g_voteCount[1],iRatio)
else
client_print(0,print_chat,"%L",players[i],"VOTING_RES_2",lVotingFailed,iResult,iRatio )
client_print(players[i],print_chat,"%L",players[i],"VOTING_RES_2",lVotingFailed,iResult,iRatio )
}
format(lVotingFailed,63,"%L","en","VOTING_FAILED")
log_amx("Vote: %s (got ^"%d^") (needed ^"%d^")",lVotingFailed,iResult,iRatio)
return PLUGIN_CONTINUE
}
g_execLen = format(g_Execute,255,g_Answer,g_optionName[best]) + 1
if (g_execResult){
if (g_execResult) {
g_execResult = false
if ( is_user_connected(g_voteCaller) ) {
new menuBody[512],lTheResult[32],lYes[16],lNo[16]
@ -164,7 +164,7 @@ public checkVotes() {
new lVotingSuccess[32]
for (i=0;i<pnum;i++) {
format(lVotingSuccess,31,"%L",players[i],"VOTING_SUCCESS")
client_print(0,print_chat,"%L",players[i],"VOTING_RES_3",lVotingSuccess,iResult,iRatio,g_Execute)
client_print(players[i],print_chat,"%L",players[i],"VOTING_RES_3",lVotingSuccess,iResult,iRatio,g_Execute)
}
format(lVotingSuccess,31,"%L","en","VOTING_SUCCESS")
log_amx("Vote: %s (got ^"%d^") (needed ^"%d^") (result ^"%s^")", lVotingSuccess, iResult , iRatio , g_Execute )
@ -206,7 +206,7 @@ public cmdVoteMap(id,level,cid) {
for (new i = 1; i < argc; ++i) {
read_argv(i,g_optionName[g_validMaps],31)
if (is_map_valid(g_optionName[g_validMaps]))
g_validMaps++;
g_validMaps++
}
if (g_validMaps == 0) {
new lMaps[16]
@ -220,7 +220,7 @@ public cmdVoteMap(id,level,cid) {
keys = MENU_KEY_0
format(menu_msg,255,g_coloredMenus ? "\y%L: \w^n^n" : "%L: ^n^n",LANG_SERVER,"CHOOSE_MAP")
new temp[128]
for(new a = 0; a < g_validMaps; ++a){
for(new a = 0; a < g_validMaps; ++a) {
format(temp,127,"%d. %s^n",a+1,g_optionName[a])
add(menu_msg,255,temp)
keys |= (1<<a)
@ -283,7 +283,7 @@ public cmdVote(id,level,cid) {
if (!cmd_access(id,level,cid,4))
return PLUGIN_HANDLED
new Float:voting = get_cvar_float("amx_last_voting")
if (voting > get_gametime()){
if (voting > get_gametime()) {
console_print(id, "%L", id, "ALREADY_VOTING")
return PLUGIN_HANDLED
}
@ -294,7 +294,8 @@ public cmdVote(id,level,cid) {
new quest[48]
read_argv(1,quest,47)
if ((contain(quest,"sv_password")!=-1)||(contain(quest,"rcon_password")!=-1)||
(contain(quest,"kick")!=-1)||(contain(quest,"addip")!=-1)||(contain(quest,"ban")!=-1)){
(contain(quest,"kick")!=-1)||(contain(quest,"addip")!=-1)||(contain(quest,"ban")!=-1))
{
console_print(id,"%L",id,"VOTING_FORBIDDEN")
return PLUGIN_HANDLED
}
@ -344,7 +345,7 @@ public cmdVoteKickBan(id,level,cid) {
if (!cmd_access(id,level,cid,2))
return PLUGIN_HANDLED
new Float:voting = get_cvar_float("amx_last_voting")
if (voting > get_gametime()){
if (voting > get_gametime()) {
console_print(id, "%L", id, "ALREADY_VOTING")
return PLUGIN_HANDLED
}