Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <sourcemod>
- #include <sdktools>
- #include sdkhooks
- public OnClientPutInServer(client)
- {
- SDKHook(client, SDKHook_OnTakeDamage, OnTakeDamage);
- }
- public OnClientDisconnect(client)
- {
- SDKUnhook(client, SDKHook_OnTakeDamage, OnTakeDamage);
- }
- public Action:OnTakeDamage(victim, &attacker, &inflictor, &Float:damage, &damagetype)
- {
- if(IsValidClient(victim) && damagetype & DMG_BLAST)
- {
- damage = 0.0
- return Plugin_Changed;
- }
- return Plugin_Continue;
- }
- stock bool IsValidClient(int client)
- {
- if ( client < 1 || client > MaxClients ) return false;
- if( !IsClientInGame(client)) return false;
- if ( !IsPlayerAlive( client )) return false;
- if(GetClientTeam(client) != 3) return false;
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment