Quote:
Originally Posted by Ex3cuTioN
I saw on a respawn server, i could kill my team and +1 frags.
On that server i could kill everyone i saw, ct's and t's.
How ? can you give/make the plugin
|
This is the scripting help forum so I'm gonna guess you know how to script, if not, go to suggestions/requests.
You can use ham sandwich and cstrike and fun for this.
Ham Sandwich - For registering Ham_Killed and call an event on death.
Cstrike - Much more simple when retrieving teams (just my thought)
Fun - Setting user frags.
PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <cstrike>
#include <fun>
#define PLUGIN "Team Killing"
#define AUTHOR "Shadow"
#define VERSION "1.0"
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam( Ham_Killed, "player", "Death", 1 )
}
public Death(iVictim, iAttacker)
{
if( iVictim == iAttacker )
{
return PLUGIN_HANDLED;
}
if( cs_get_user_team(iVictim) == CS_TEAM_T && cs_get_user_team(iAttacker) == CS_TEAM_T )
{
new frags = get_user_frags(iAttacker)
set_user_frags(iAttacker, frags + 2)
return PLUGIN_HANDLED;
}
if( cs_get_user_team(iVictim) == CS_TEAM_CT && cs_get_user_team(iAttacker) == CS_TEAM_CT )
{
new frags = get_user_frags(iAttacker)
set_user_frags(iAttacker, frags + 2)
return PLUGIN_HANDLED;
}
return PLUGIN_HANDLED;
}
Probably not the best method.
__________________