AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Deathmatch kills counter on NMRIH (https://forums.alliedmods.net/showthread.php?t=295630)

lobo_arg 03-31-2017 13:03

Deathmatch kills counter on NMRIH
 
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);
}


EFFx 03-31-2017 13:07

Re: Deathmatch kills counter on NMRIH
 
Buy new glasses.

Natsheh 03-31-2017 16:34

Re: Deathmatch kills counter on NMRIH
 
go to sourcemod section for counter strike source & above...


All times are GMT -4. The time now is 18:05.

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