Quote:
Originally Posted by HamletEagle
Pass the string size as a param.
|
Did you mean this:
PHP Code:
new team[32];
get_opposite_team(idattacker, team, charsmax(team));
stock get_opposite_team(index, team[], len)
{
new CsTeams:team = cs_get_user_team(index);
if(team == CS_TEAM_T)
{
copy(team, len, "TERRORIST"); // line 549;
}
else
{
copy(team, len, "CT"); // line 553;
}
return 0;
} // line 557;
If yes, still throws the same errors!
Quote:
Originally Posted by edon1337
?
Code:
if(equal(get_opposite_team(idattacker), "CT"))
// ... //
stock get_opposite_team(index)
{
new CsTeams:team_player = cs_get_user_team(index);
new team[32];
if(team_player == CS_TEAM_T)
{
copy(team, charsmax(team), "TERRORIST"); // line 549;
}
else if(team_player == CS_TEAM_CT)
{
copy(team, charsmax(team), "CT"); // line 553;
}
return team;
}
|
If I wanted to do it like that, I would, but this doesn't help me!