Hey, so I did this:
PHP Code:
new CsTeams:g_PreTeam[33]
new CsTeams:g_PostTeam[33]
and it fixed g_PreTeam, but now I get this 2 messages:
Code:
// D:\Games\srw\cstrike\addons\amxmodx\scripting\Moji PLOVI\adminmodel.sma(58) : error 033: array must be indexed (variable "g_PostTeam")
// D:\Games\srw\cstrike\addons\amxmodx\scripting\Moji PLOVI\adminmodel.sma(62) : error 033: array must be indexed (variable "g_PostTeam")
My code looks like this:
PHP Code:
public logevent_round_end(id)
{
if (get_user_flags(id) & ADMIN_LEVEL_H)
{
g_PreTeam[id] = cs_get_user_team(id);
}
}
public OnPlayerSpawn(id)
{
if (get_user_flags(id) & ADMIN_LEVEL_H)
{
g_PostTeam[id] = cs_get_user_team(id)
set_task(0.5, "CheckModel", id);
}
}
PHP Code:
public CheckModel(id)
{
if(g_PostTeam == g_PreTeam)
{
CC_SendMessage(id, "!n>> !gYour model was set, no need for change!");
}
else if(g_PostTeam != g_PreTeam)
{
cs_reset_user_model(id)
CC_SendMessage(id, "!n>> !gModel reset applied, change your model!");
}
}
__________________