Hi friends!
If I try to compile this plugin an error appears, can you help me?
Or does someone have a plugin that at the beginning of the round shows the teammates money in the chat?
Plugin:
Code:
#include <amxmodx>
#include <cstrike>
#define MAX_ROWS 5
public plugin_init()
{
register_plugin("Show Team Money", "1.0", "OciXCrom")
register_logevent("OnRoundStart", 2, "1=Round_Start")
}
public OnRoundStart()
{
new szMoneyT[MAX_ROWS][128], szMoneyCT[MAX_ROWS][128], iPlayers[32], iPnum
get_players(iPlayers, iPnum)
for(new i, c, t, iPlayer, szName[32]; i < iPnum; i++)
{
iPlayer = iPlayers[i]
switch(cs_get_user_team(iPlayer))
{
case CS_TEAM_T:
{
if(t >= MAX_ROWS - 1)
continue
get_user_name(iPlayer, szName, charsmax(szName))
formatex(szMoneyT[t], charsmax(szMoneyT[]), "* Your teammate %s has got %i$", szName, cs_get_user_money(iPlayer))
t++
}
case CS_TEAM_CT:
{
if(c >= MAX_ROWS - 1)
continue
get_user_name(iPlayer, szName, charsmax(szName))
formatex(szMoneyCT[c], charsmax(szMoneyCT[]), "* Your teammate %s has got %i$", szName, cs_get_user_money(iPlayer))
c++
}
}
}
for(new i; i < iPnum; i++)
{
switch(cs_get_user_team(iPlayers[i])
{
case CS_TEAM_T:
{
for(new t; t < MAX_ROWS - 1; t++)
client_print(iPlayers[i], print_chat, szMoneyT[t])
}
case CS_TEAM_CT:
{
for(new c; c < MAX_ROWS - 1; c++)
client_print(iPlayers[i], print_chat, szMoneyCT[c])
}
}
}
}
Error:
Your plugin failed to compile! Read the errors below:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team
/tmp/textr13btR.sma(47) : error 001: expected token: ")", but found "{"
1 Error.
Could not locate output file /home/groups/amxmodx/public_html/websc3/textr13btR.amx (compile failed).