Skip to content

Commit

Permalink
非三方图不在给过关和救援分
Browse files Browse the repository at this point in the history
防止利用快速重启方式刷分
  • Loading branch information
fantasylidong committed Apr 16, 2024
1 parent ea2d9ef commit 928752c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Binary file modified addons/sourcemod/plugins/extend/l4d_stats.smx
Binary file not shown.
12 changes: 12 additions & 0 deletions addons/sourcemod/scripting/extend/l4d_stats.sp
Original file line number Diff line number Diff line change
Expand Up @@ -4395,6 +4395,8 @@ public Action:event_CampaignWin(Handle:event, const String:name[], bool:dontBroa
Score = RoundToFloor(1.5 * Score);
}

if(!CheckIsOfficalMap())return;

new maxplayers = MaxClients;
for (new i = 1; i <= maxplayers; i++)
{
Expand Down Expand Up @@ -9866,6 +9868,8 @@ public CheckSurvivorsWin()
Score *= 1.5;
}

if(!CheckIsOfficalMap())return;

new String:All4Safe[64] = "";
if (Deaths == 0)
Format(All4Safe, sizeof(All4Safe), ", award_allinsafehouse = award_allinsafehouse + 1");
Expand Down Expand Up @@ -11992,3 +11996,11 @@ stock bool IsThisRoundValid()
}
return true;
}

stock bool CheckIsOfficalMap(){
char mapname[256];
GetCurrentMap(mapname,sizeof(mapname));
if(( (mapname[0]=='c') && (mapname[2]=='m') &&(mapname[4]=='_'))||((mapname[0]=='c')&&(mapname[3]=='m')&&(mapname[5]=='_')))
return true;
return false;
}

0 comments on commit 928752c

Please sign in to comment.