Hi. I'm making a plugin for L4D versus, and I'm trying to find a way to call victory for the survivors. I've looked through
http://wiki.alliedmods.net/Left_4_Dead_Events
but I have little idea how to use them. I tried doing the following
PHP Code:
victory() {
new Handle:event = CreateEvent("finale_win")
if (event == INVALID_HANDLE)
{
PrintToChatAll("Event is an invalid handle! GASP");
return
}
new String:GameDifficulty[256];
new String:GameMap[256];
GetConVarString(FindConVar("z_difficulty"), GameDifficulty, sizeof(GameDifficulty));
GetCurrentMap(GameMap, sizeof(GameMap));
SetEventString(event, "map_name", GameMap)
SetEventString(event, "difficulty", GameDifficulty)
FireEvent(event)
PrintToChatAll("Event successfully fired!");
}
and it's being called correctly, but it doesn't actually start the victory screen or anything (only gave me an achievement fff)
Any help appreciated.