Raised This Month: $ Target: $400
 0% 

Making a new zone


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
KadiR
Unnecessary Member
Join Date: Aug 2008
Location: Zürich / Switzerland
Old 03-19-2010 , 13:15   Re: Making a new zone
Reply With Quote #7

Quote:
Originally Posted by grimvh2 View Post
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(iduc_handle)
{        
    for(new 
ii<g_iZonesNumi++)
    {
        if( 
is_user_in_zone(idi) && allow[id])
        {
            
/* User is in zone */
        
}
    }
    return 
FMRES_IGNORED;

I tried it with your plugin like that:

PHP Code:
public fwd_FM_CmdStart_pre(iduc_handle)
{        
    for(new 
ii<g_iZonesNumi++)
    {
        if( 
is_user_in_zone(idi) && 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:
KadiR is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:32.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode