I am creating a script for CS:GO and there is two functional things I can not work out.
1) Is there a way to detect how many players are still alive during a round? And if there is, is there a way to hook an event or a function to the amount of remaining players? In example, if there are ten players - when two are remaining I want to do something special. Is this possible and if so how?
2) Is there a way to reveal the radar after it has been hidden? In my code I am using
Code:
#define HIDEHUD_RADAR 1 << 12
public OnClientPutInServer(client) {
SDKHook(client, SDKHook_Spawn, OnPlayerSpawn);
}
public Action:OnPlayerSpawn(client) {
// Hide the players radar
CreateTimer(0.0, RemoveHUDElements, client);
}
// Remove hud elements
public Action:HideRadar(Handle:timer, any:client) {
// Radar
SetEntProp(client, Prop_Send, "m_iHideHUD", HIDEHUD_RADAR);
}
I want to be able to trigger the radar to re-appear when a function is called to do so. How might I go about doing that?
Thanks for any help in advanced, I really appreciate it. Im new to sourcepawn and I am unsure where documentation is for me to find things like this. Thanks!