Raised This Month: $ Target: $400
 0% 

Blockmaker - Water Block |H |E |L |P


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
micke1101
Veteran Member
Join Date: Jan 2008
Location: Banned-town
Old 06-29-2009 , 01:34   Re: Blockmaker - Water Block |H |E |L |P
Reply With Quote #6

Correct me if im wrong (which i probably have )
but i think here is where you have to add the code

Code:
public pfn_touch(ent, id)
{
    //if touch event involves a player
    if (id > 0 && id <= 32)
    {
        //if player is alive
        if (is_user_alive(id))
        {
            //if entity involved is a block
            if (isBlock(ent))
            {
                //get the blocktype
                new blockType = entity_get_int(ent, EV_INT_body);
                
                //if blocktype is a bunnyhop block or barrier
                if (blockType == BM_BHOP || blockType == BM_BARRIER_CT || blockType == BM_BARRIER_T || blockType == BM_BHOP_NOSLOW)
                {
                    //if task does not already exist for bunnyhop block
                    if (!task_exists(TASK_BHOPSOLIDNOT + ent) && !task_exists(TASK_BHOPSOLID + ent))
                    {
                        //get the players team
                        new CsTeams:team = cs_get_user_team(id);
                        
                        //if players team is different to barrier
                        if (blockType == BM_BARRIER_CT && team == CS_TEAM_T)
                        {
                            //make block SOLID_NOT without any delay
                            taskSolidNot(TASK_BHOPSOLIDNOT + ent);
                        }
                        else if (blockType == BM_BARRIER_T && team == CS_TEAM_CT)
                        {
                            //make block SOLID_NOT without any delay
                            taskSolidNot(TASK_BHOPSOLIDNOT + ent);
                        }
                        else if (blockType == BM_BHOP || blockType == BM_BHOP_NOSLOW)
                        {
                            //set bhop block to be SOLID_NOT after 0.1 seconds
                            set_task(0.1, "taskSolidNot", TASK_BHOPSOLIDNOT + ent);
                        }
                    }
                }
            }
        }
    }
    
    return PLUGIN_CONTINUE;
}
micke1101 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 15:30.


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