mirror of
https://github.com/Jackzmc/sourcemod-plugins.git
synced 2025-05-06 02:03:21 +00:00
Fix finale time triggering multiple times supposedly
This commit is contained in:
parent
63107d13f5
commit
4b9dd06256
2 changed files with 12 additions and 7 deletions
Binary file not shown.
|
@ -86,15 +86,20 @@ public void Event_FinaleStart(Event event, const char[] name, bool dontBroadcast
|
|||
}
|
||||
public void Event_FinaleEnd(Event event, const char[] name, bool dontBroadcast) {
|
||||
if(hFinaleTimer.IntValue != 0) {
|
||||
int difference = GetTime() - iFinaleStartTime;
|
||||
|
||||
char time[32];
|
||||
FormatSeconds(difference, time, sizeof(time));
|
||||
PrintToChatAll("Finale took %s to complete", time);
|
||||
iFinaleStartTime = 0;
|
||||
|
||||
if(iFinaleStartTime != 0) {
|
||||
int difference = GetTime() - iFinaleStartTime;
|
||||
|
||||
char time[32];
|
||||
FormatSeconds(difference, time, sizeof(time));
|
||||
PrintToChatAll("Finale took %s to complete", time);
|
||||
iFinaleStartTime = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
public void Event_CarAlarmTriggered(Event event, const char[] name, bool dontBroadcast) {
|
||||
int userID = GetClientOfUserId(event.GetInt("userid"));
|
||||
PrintToChatAll("%N activated a car alarm!", userID);
|
||||
}
|
||||
/**
|
||||
* Prints human readable duration from milliseconds
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue