Quote:
Originally Posted by Natsheh
You are hooking teams win incorrectly, use get_players then loop through players array indexes.
|
Is this what you mean? I'm having trouble understanding how to use get_players, this doesn't compile.
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fakemeta>
#define TIMETOWAIT 4.7
new g_iMaxPlayers
public plugin_init()
{
register_logevent("LogEvent_CTs_Win", 6, "0=Team", "1=CT", "3=CTs_Win")
register_logevent("LogEvent_Ts_Win", 3, "0=Team", "1=CT", "3=CTs_Win")
g_iMaxPlayers = get_maxplayers()
}
public LogEvent_CTs_win()
{
set_task(TIMETOWAIT, "GiveTmoney")
}
public LogEvent_Ts_win()
{
set_task(TIMETOWAIT, "GiveCTmoney")
}
public GiveTmoney()
{
new players[32] , num;
get_players(players, num "be", "T")
for (new i = 1; i <= num; i++)
cs_set_user_money(players(i), 800)
}
public GiveCTmoney()
{
new players[32] , num;
get_players(players, num "be", "CT")
for (new i = 1; i <= num; i++)
cs_set_user_money(players(i), 800)
}