Raised This Month: $ Target: $400
 0% 

Deathmatch kills counter on NMRIH


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
lobo_arg
Junior Member
Join Date: Mar 2017
Old 03-31-2017 , 13:03   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);
}
lobo_arg 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 18:05.


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