AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Armor [REQ] (https://forums.alliedmods.net/showthread.php?t=331724)

HowToRuski 04-04-2021 10:02

Armor [REQ]
 
Hello, i decided to ask if someone could make a simple plugin (if you have a free time), for CTs. If a CT kills T they get armor +1 for each kill. But it wont work for Ts. Hope you understood what i said. Thanks in advance!

raizo11 04-04-2021 10:59

Re: Armor [REQ]
 
Code:

#include <amxmodx>
#include <hamsandwich>
#include <cstrike>
#include <fun>

public plugin_init()
{
    RegisterHam(Ham_Killed, "player", "fw_PlayerKilled", 1)
}

public fw_PlayerKilled(iVictim, iKiller) 
{
    if (iVictim == iKiller || !is_user_alive(iKiller))
        return
   
    if(cs_get_user_team(iKiller) == CS_TEAM_CT)
    {
        set_user_armor(iKiller,get_user_armor(iKiller) + 1)
    }
}


HowToRuski 04-04-2021 11:06

Re: Armor [REQ]
 
Quote:

Originally Posted by raizo11 (Post 2742974)
Code:

#include <amxmodx>
#include <hamsandwich>
#include <cstrike>
#include <fun>

public plugin_init()
{
    RegisterHam(Ham_Killed, "player", "fw_PlayerKilled", 1)
}

public fw_PlayerKilled(iVictim, iKiller) 
{
    if (iVictim == iKiller || !is_user_alive(iKiller))
        return
   
    if(cs_get_user_team(iKiller) == CS_TEAM_CT)
    {
        set_user_armor(iKiller,get_user_armor(iKiller) + 1)
    }
}


So i tested it with podbots, doesnt seem to work when they are killing zombies. Im not getting any armor myself from their kills

Napoleon_be 04-04-2021 20:35

Re: Armor [REQ]
 
Quote:

Originally Posted by HowToRuski (Post 2742975)
So i tested it with podbots, doesnt seem to work when they are killing zombies. Im not getting any armor myself from their kills

test it with players.


All times are GMT -4. The time now is 19:53.

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