Quote:
Originally Posted by ComedyShotsGamer
|
Nope, this one it's not ok.
Got autojoin ...
Code:
#include <amxmodx>
#define PLUGIN "Team winner"
#define VERSION "1.0"
#define AUTHOR "EFFx"
new iScore[2] // 0 T, 1 CT
new GoldValue
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
GoldValue = register_cvar("team_winner_gold","25")
register_event("TeamScore", "EventTeamScore", "a")
}
public EventTeamScore()
{
new iTeam[32];
read_data(1,iTeam,31);
if (equal(iTeam,"CT"))
{
iScore[ 1 ] = read_data(2);
}
else if (equal(iTeam,"TERRORIST"))
{
iScore[ 0 ] = read_data(2);
}
if(iScore[0] == 15)
{
server_cmd("amx_givegold @T %d",get_pcvar_num(GoldValue))
}
if(iScore[1] == 15)
{
server_cmd("amx_givegold @CT %d",get_pcvar_num(GoldValue))
}
}
This is the plugin.
__________________