Raised This Month: $ Target: $400
 0% 

Time limit on script


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 04-26-2012 , 11:55   Re: Time limit on script
Reply With Quote #7

Actually, a variable won't be useful here, so it's better to use one of the fuser private entity data.

Go to CreateBlock function:

Find this:

PHP Code:
    entity_set_vector(entEV_VEC_anglesangles); 
    
entity_set_size(entsize_minsize_max); 
    
entity_set_int(entEV_INT_bodyblock_type); 
Add after:

PHP Code:
entity_set_float(ent,EV_FL_fuser1,-360.0); 
Go to ActionXPBlock function.

Make it like this:

PHP Code:
ActionXPBlock(ident

    if ( 
cs_get_user_team(id) == CS_TEAM_T 
    { 
     if((
get_gametime() - entity_get_float(ent,EV_FL_fuser1)) > 360.0)
 {
      new 
property[5]; 
      
GetProperty(ent1property); 
      
hnsxp_add_user_xp(idstr_to_num(property)); 
      
g_xpblock_used[id] = true
 
      
set_hudmessage(025500.010.1800.01.00.250.252); 
      
show_hudmessage(id"You got %i more XP!"str_to_num(property)); 
 
      
entity_set_float(ent,EV_FL_fuser1,get_gametime());
 }
    } else { 
            
set_hudmessage(025500.010.1800.01.00.250.252); 
            
show_hudmessage(id"Only Terrorists can take XP Block!"); 
    } 

I haven't tested it, but it should work.
__________________

Last edited by <VeCo>; 04-26-2012 at 13:05.
<VeCo> 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 07:49.


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