Raised This Month: $ Target: $400
 0% 

Jailbreak Coder


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bunneh
New Member
Join Date: Apr 2014
Old 04-29-2014 , 21:11   Jailbreak Coder
Reply With Quote #1

Hello,

I'm looking for a Coder to make me a custom mod. I want a shot mod, what would this shot mod be you ask? Well, the shot mod would tell you who shot who (Example: CT shot T and did x amount of damage). I'm looking for something that will stop a lot of the Jailbreak freekills and will alert the admins that a freekill has happened. I have no idea if there is already another mod like this? If so please link it to me because I can not find one anywhere.

If you can code something like this please let me know so we can work out the full details together. Thanks
Bunneh is offline
Oshizu
Veteran Member
Join Date: Nov 2012
Location: Warsaw
Old 05-10-2014 , 12:40   Re: Jailbreak Coder
Reply With Quote #2

This might work:
PHP Code:
#include <sdkhooks>

public OnClientPutInServer(client)
{
    
SDKHook(clientSDKHook_OnTakeDamageOnTakeDamage);
}

public 
Action:OnTakeDamage(victim, &attacker, &inflictor, &Float:damage, &damagetype, &weaponFloat:damageForce[3], Float:damagePosition[3], damagecustom)
{
    if(
IsValidClient(attacker))
    {
        
decl String:steamid_victim[32];
        
GetClientAuthString(victimsteamid_victimsizeof(steamid_victim))
        
        
decl String:steamid_attacker[32];
        
GetClientAuthString(attackersteamid_attackersizeof(steamid_attacker))
        
        new 
String:path[128];
        
BuildPath(Path_SMpathsizeof(path), "logs/damagelogs.txt");
        
        
LogToFile(path"Player %N (%s) from %i team has been hurt by %N (%s) from from team %i with %f damage"victimsteamid_victimGetClientTeam(victim), attackersteamid_attackerGetClientTeam(attacker), damage)
    }
    return 
Plugin_Continue;
}

stock bool:IsValidClient(client)
{
    if ( !( 
<= client <= MaxClients ) || !IsClientInGame(client) )
        return 
false;
    
    return 
true;

It should print detailed data to sourcmeod/logs/damagelogs.txt
__________________
...

Last edited by Oshizu; 05-10-2014 at 12:43.
Oshizu is offline
Bunneh
New Member
Join Date: Apr 2014
Old 05-11-2014 , 11:10   Re: Jailbreak Coder
Reply With Quote #3

I'll try it out and see how it works. Thanks!
Bunneh is offline
Reply



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 17:15.


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