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);
}