Unfortunately, no success.
The function now looks like this:
PHP Code:
public fwButtonUsed(idcaller) {
if(IsFreeRun == true && cs_get_user_team(idcaller) == CS_TEAM_T) {
return HAM_SUPERCEDE;
}
if(IsFreeRun == true && cs_get_user_team(idcaller) == CS_TEAM_CT) {
return HAM_IGNORED;
}
return HAM_IGNORED;
}
(Yes, the second IF is probably not needed)
Server's console returns this error (although, the plugin completes fine) :
Code:
L 06/14/2010 - 20:22:17: [AMXX] [0] sample.sma::fwButtonUsed (line 79)
L 06/14/2010 - 20:22:17: [CSTRIKE] Player out of range (97)
L 06/14/2010 - 20:22:17: [AMXX] Displaying debug trace (plugin "sample.amxx")
L 06/14/2010 - 20:22:17: [AMXX] Run time error 10: native error (native "cs_get_
user_team")
The 79th line is:
PHP Code:
if(IsFreeRun == true && cs_get_user_team(idcaller) == CS_TEAM_T) {
I guess I don't use cs_get_user_team properly ?