Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <sourcemod>
- #include <sdktools>
- #include <cstrike>
- #include <colorvariables>
- #pragma newdecls required
- #pragma semicolon 1
- public Plugin myinfo =
- {
- name = "widok hp",
- author = "katujemy.eu",
- description = "Pokazuje kogo atakujesz, ile zostało tej osobie hp",
- version = "1.1",
- url = "katujemy.eu"
- };
- public void OnPluginStart()
- {
- HookEvent("player_hurt", event_PlayerHurt, EventHookMode_Post);
- }
- public Action event_PlayerHurt(Handle event, const char[] name, bool dontBroadcast)
- {
- int userid = GetEventInt(event, "userid");
- int client = GetClientOfUserId(userid);
- if(client > 0 && IsClientConnected(client) && IsClientInGame(client))
- {
- int attacker = GetClientOfUserId(GetEventInt(event, "attacker"));
- if(IsPlayerVIP(attacker)==true)
- {
- if(attacker > 0 && IsClientConnected(attacker) && IsClientInGame(attacker))
- {
- {
- int i_health = GetEventInt(event, "health");
- char text[100];
- if(IsValidPlayer(attacker) && GetClientTeam(attacker) == CS_TEAM_CT)
- {
- Format(text, 100, "%N | %i HP", client, i_health);
- SetHudTextParams(0.2, 0.8, 3.0, 0, 215, 255, 255, 0, 0.25, 0.5, 0.5);
- ShowHudText(attacker, 2, text);
- }
- }
- }
- }
- }
- }
- stock bool IsPlayerVIP(int client)
- {
- if(GetUserFlagBits(client) & ADMFLAG_CUSTOM2)
- return true;
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement