Raised This Month: $51 Target: $400
 12% 

[HELP] Print Fall Damage Plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
xantis
Junior Member
Join Date: Feb 2019
Old 08-14-2019 , 10:42   [HELP] Print Fall Damage Plugin
Reply With Quote #1

Hello, i found a plugin from this thread:
https://forums.alliedmods.net/showthread.php?t=287004

and i want to edit this plugin for print fall and vehicle damage to chat for my hns server.

for example:
[TAG] (player) took (number) fall damage.

Code:
#pragma semicolon 1

#define DEBUG

#define PLUGIN_AUTHOR "boomix && Grey83"
#define PLUGIN_VERSION "1.00"

#include <sourcemod>
#include <sdkhooks>

#define LoopAllPlayers(%1) for(int %1=1;%1<=MaxClients;++%1)\
if(IsClientInGame(%1))

public Plugin myinfo = 
{
	name = "Warning: shooting others",
	author = PLUGIN_AUTHOR,
	description = "Warns in chat, that player is shooting others",
	version = PLUGIN_VERSION,
	url = "http://forums.alliedmods.net"
};

public void OnPluginStart()
{
	LoopAllPlayers(i)
		SDKHook(i, SDKHook_OnTakeDamage, Event_OnTakeDamage);
	
}

public void OnClientPutInServer(int client)
{
	SDKHook(client, SDKHook_OnTakeDamage, Event_OnTakeDamage);
}

public Action Event_OnTakeDamage(victim, &attacker, &inflictor, &Float:damage, &damagetype) 
{
	
    if(damagetype & DMG_FALL || damagetype & DMG_VEHICLE)
    {
    	PrintToChatAll("\x1 \x2 Warning:\x1 Player\x3 %N\x1 is shooting others!", attacker);
    	return Plugin_Handled; 
    }
    
    return Plugin_Continue;
}
im stuck in here.
xantis is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:14.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode