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);
}
}
logevent_dound_end there is no "id" parameter, so you need to use get_players and loop all players and then use the id
PHP Code:
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);
}
}
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!");
}
}
PHP Code:
if(g_PostTeam[id] == g_PreTeam[id])
else if(g_PostTeam[id] != g_PreTeam[id])
__________________