forked from ugurbayraktarr/Plugins-for-CSGO-Servers
-
Notifications
You must be signed in to change notification settings - Fork 3
/
damageGosterici.sp
45 lines (40 loc) · 1.01 KB
/
damageGosterici.sp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#pragma semicolon 1
#include <sourcemod>
#include <sdktools>
#include <sdkhooks>
#include <cstrike>
public Plugin:myinfo =
{
name = "Damage Gösterici",
author = "ImPossibLe`",
description = "DrK # GaminG",
version = "1.0",
};
public OnPluginStart()
{
}
public OnClientPostAdminCheck(iClient)
{
SDKHook(iClient, SDKHook_OnTakeDamage, OnTakeDamage);
}
public Action:OnTakeDamage(victim, &attacker, &inflictor, &Float:damage, &damagetype)
{
new iAttacker;
if(attacker>64)
iAttacker = GetClientOfUserId(attacker);
else
iAttacker = attacker;
if(iAttacker > 0)
{
new hp = GetClientHealth(victim);
if(hp - damage > 0)
{
PrintCenterText(attacker, "Hasar: <font color='#FF0000'>%.0f</font> \nKalan: <font color='#00FF00'>%.0f</font> \nHedef: <font color='#FFFF00'>%N</font>", damage, hp - damage + 1, victim);
}
else
{
PrintCenterText(attacker, " <font color='#FF0000'>%N</font> \n <font color='#00FFFF'>Kişisini öldürdün!</font>", victim);
}
}
return Plugin_Continue;
}