Quote:
Originally Posted by grimvh2
PHP Code:
new allow[33]
new delay
// In plugin init
delay = register_cvar("amx_timedelay", "120") // in seconds
// at your cmd when you start the map
set_task(get_pcvar_float(delay), "timecheck",id)
public timecheck(id)
allow[id]++
public fwd_FM_CmdStart_pre(id, uc_handle)
{
for(new i; i<g_iZonesNum; i++)
{
if( is_user_in_zone(id, i) && allow[id])
{
/* User is in zone */
}
}
return FMRES_IGNORED;
}
|
I tried it with your plugin like that:
PHP Code:
public fwd_FM_CmdStart_pre(id, uc_handle)
{
for(new i; i<g_iZonesNum; i++)
{
if( is_user_in_zone(id, i) && allow[id])
{
/* User is in zone */
client_print(id,print_center,"w00t, You just touched a zone!")
set_task(get_pcvar_float(delay), "timecheck",id)
}
}
return FMRES_IGNORED;
}
Didn't work for me.. :sad: