Ok I changed almost all as you said for trying. A quick question,my server has a space of 12 slots, as user id, now I have 99 (so I suppose that id is the #number at left of name in status via game console). So could this number be higher than 13?
Also, tried to change get_maxplayers() to get_players() in:
PHP Code:
public timer_task() {
for(new i=1;i<=get_maxplayers();i++) {
if(is_user_alive(i) && timer_started[i]) {
new Float:sec = get_gametime() - timer[i], min
if((sec / 60.0) >= 1) {
min = floatround(sec / 60.0,floatround_floor)
sec -= min * 60
}
client_print(i, print_center , "%d : %f",min ,sec)
}
}
}
PHP Code:
public hamUse(ent, id) {
if(!(1 <= id <= get_maxplayers())) return HAM_IGNORED;
new szTarget[32];
pev(ent, pev_target, szTarget, 31);
if(equal(szTarget, "counter_off") || equal(szTarget, "clockstopbutton") || equal(szTarget, "clockstop") || equal(szTarget, "stop_counter")) {
stopcmd(id)
}
timer_started[id] = false;
return HAM_IGNORED;
}
But get the following error:
Quote:
Error: Number of arguments does not match definition on line 34
Error: Number of arguments does not match definition on line 68
|
So I checked this:
AmxModX API
And tried:
PHP Code:
get_players(players, num, "ae", "CT")
So player and i are not defined, tried to replace all i to player and all player to i. But as you see I'm not understanding the syntax of get_players()
Pd: Should I change szTarget[32] to 33 too?