Howdy,
I've been writing a plugin for L4D2, and I'm trying to come up with a solution for a plugin that is loaded late (ie after a round has started let's say in survival). However, it seems that GameRules_GetRoundState() doesn't work for L4D2.
The server console gives me a "m_iRoundState" not found on the gamerules proxy error.
Am I doing something wrong here, or is there an alternative method for obtaining the state of a round?
Code:
public APLRes:AskPluginLoad2(Handle:myself, bool:late, String:error[], err_max) {
loadLate = late;
return APLRes_Success;
}
public OnPluginStart() {
// check if plugin was loaded late
if (loadLate) {
// do some stuff
...
if (GameRules_GetRoundState() == RoundState_RoundRunning) {
// do some other stuff
..
}
}
}