Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int heal[MAXPLAYERS+1] = 100;
- public OnMapStart()
- {
- HookEvent("map_transition", hTransition)
- CreateTimer(5.0, SetHealth, _, TIMER_FLAG_NO_MAPCHANGE)
- }
- public Action:hTransition(Handle:event, const String:s_Name[], bool:b_DontBroadcast)
- {
- for(int i = 1; i <= MaxClients; ++i)
- {
- new Health = GetClientHealth(i)
- heal[i] = Health;
- }
- }
- public Action SetHealth(Handle timer, any fuck)
- {
- for(int i = 1; i <= MaxClients; ++i)
- {
- if(bIsSurvivor(i))
- {
- SetEntityHealth(heal[i], i);
- }
- }
- }
- stock bool bIsSurvivor(int client)
- {
- return client > 0 && client <= MaxClients && IsClientInGame(client) && GetClientTeam(client) == 2 && !IsClientInKickQueue(client) && IsPlayerAlive(client);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement