This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Deathmatch kills counter on NMRIH


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
lobo_arg
Junior Member
Join Date: Mar 2017
Old 04-02-2017 , 13:43   Deathmatch kills counter on NMRIH
Reply With Quote #1

Hello! I am new to the community.
I'm looking for help with this plugin I got here.
The counter only counts the zombies that kill the players and not the deaths of other players.
This plugin was made for counter strike.
I would like it to work in No more room in hell. Any ideas?

Code:
#include <sourcemod>
#include <sdktools>

public Plugin myinfo =
{
    name = "Deathmatch",
    author = "Verideth",
    description = "Deathmatch gamemode for CSS",
    version = "1.0",
    url = ""
};
 
public Action PlayerDeath(Event event, const char[] name, bool dontBroadcast)
{
    //Get ids
    int client = GetClientOfUserId(event.GetInt("userid"));
    int attacker = GetClientOfUserId(event.GetInt("attacker"));
       
    //kill count
    if (attacker > 0 && IsClientInGame(attacker) && GetClientFrags(attacker) >= 5) // if having 20 kills then continue.
    {
        PrintToChatAll("**********\x03¡%N \x04ES EL GANADOR!**********", attacker);
        CreateTimer(8.0, ForceLevel);
    }
         
    return Plugin_Continue;
}
 
public Action ForceLevel(Handle timer)
{
    decl String:maps[][] = 
    {
        "nms_favela",
        "nms_chinatown",
        "nms_flooded",
        "nms_isolated",
        "nms_genex",
        "nms_campfire",
        "nms_operation_halloween",
    }

    ForceChangeLevel(maps[GetRandomInt(0, 6)], "Changing because the winner has won the game!");
}
 
public OnPluginStart()
{
    HookEvent("player_death", PlayerDeath);
}

Last edited by lobo_arg; 04-02-2017 at 13:45. Reason: error
lobo_arg is offline
sdz
Senior Member
Join Date: Feb 2012
Old 04-03-2017 , 03:29   Re: Deathmatch kills counter on NMRIH
Reply With Quote #2

sm_dump_netprops netprops.txt in server console
I'd look for things like m_iScore, m_iFrags.
Could try:
PHP Code:
SetEntProp(attackerProp_Data"m_iFrags"GetClientFrags(attacker) + 1);
//or
SetEntProp(attackerProp_Data"m_iScore"GetClientFrags(attacker) + 1); 

Last edited by sdz; 04-03-2017 at 03:29.
sdz is offline
lobo_arg
Junior Member
Join Date: Mar 2017
Old 04-04-2017 , 11:04   Re: Deathmatch kills counter on NMRIH
Reply With Quote #3

Quote:
Originally Posted by EasSidezz View Post
sm_dump_netprops netprops.txt in server console
I'd look for things like m_iScore, m_iFrags.
Could try:
PHP Code:
SetEntProp(attackerProp_Data"m_iFrags"GetClientFrags(attacker) + 1);
//or
SetEntProp(attackerProp_Data"m_iScore"GetClientFrags(attacker) + 1); 
Those commands do not have the game. I did not see any of them.
lobo_arg 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 16:07.


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