Raised This Month: $ Target: $400
 0% 

Changing bool value.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
lolzin123
Member
Join Date: Apr 2009
Old 08-09-2009 , 18:39   Re: Changing bool value.
Reply With Quote #8

How i make a bool to block and unblock the value of the honey block... like in a menu ... turn on the honey at the player and turn off.

The Code:
PHP Code:
actionHoney(id)
{
    new 
taskid TASK_HONEY id;
    
    
//make player feel like they're stuck in honey by lowering their maxspeed
    
set_user_maxspeed(id50.0);
    
    
//remove any existing 'in honey' task
    
if (task_exists(taskid))
    {
        
remove_task(taskid);
    }
    else
    {
        
//half the players velocity the first time they touch it
        
new Float:vVelocity[3];
        
entity_get_vector(idEV_VEC_velocityvVelocity);
        
vVelocity[0] = vVelocity[0] / 2.0;
        
vVelocity[1] = vVelocity[1] / 2.0;
        
entity_set_vector(idEV_VEC_velocityvVelocity);
    }
    
    
//set task to remove 'in honey' effect very soon (task replaced if player is still in honey before task time reached)
    
set_task(0.1"taskNotInHoney"taskid);

lolzin123 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 18:26.


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