Raised This Month: $ Target: $400
 0% 

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


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
cikjam
Senior Member
Join Date: Feb 2009
Location: Australia
Old 06-27-2009 , 11:30   Blockmaker - New Mad Water Block |H |E |L |P - Is this possible? Any help? +karma
Reply With Quote #1

Hey,

I was just thinking of a water block, like in some maps where there is water and u hold space to water strafe in it.

But i want this in blockmaker with no fall damage as well like usual. I want to replace the original NoFallDamage block with this. I don't want this to be a solid block I want you to be able to fall straight through it like normal water.

Thankyou,
Any help will be greatly appreciated and
+karma
__________________
R.I.P Aziz 'Zyzz' Sergeyevich Shavershian

Last edited by cikjam; 06-28-2009 at 05:37.
cikjam is offline
cikjam
Senior Member
Join Date: Feb 2009
Location: Australia
Old 06-28-2009 , 02:17   Re: Blockmaker - Water Block |H |E |L |P
Reply With Quote #2

Is this possible? Any help?
__________________
R.I.P Aziz 'Zyzz' Sergeyevich Shavershian
cikjam is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 06-28-2009 , 08:31   Re: Blockmaker - Water Block |H |E |L |P
Reply With Quote #3

set_pev( ent, pev_contents, CONTENTS_WATER );
__________________
xPaw is offline
cikjam
Senior Member
Join Date: Feb 2009
Location: Australia
Old 06-28-2009 , 11:02   Re: Blockmaker - Water Block |H |E |L |P
Reply With Quote #4

Ok cool, so thats the action id?

And do i need to do something to make it not solid? Could you tell me that please, I'm only use to adding solid stuff. And like this has to be always not solid.
__________________
R.I.P Aziz 'Zyzz' Sergeyevich Shavershian
cikjam is offline
cikjam
Senior Member
Join Date: Feb 2009
Location: Australia
Old 06-29-2009 , 00:19   Re: Blockmaker - Water Block |H |E |L |P
Reply With Quote #5

I tried putting it as action id, that didn't work, then i tried putting where bhop and make it not solid or wateva and that didn't work.
I got no clue, what else do i have to do?
__________________
R.I.P Aziz 'Zyzz' Sergeyevich Shavershian
cikjam is offline
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
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 06-29-2009 , 02:14   Re: Blockmaker - Water Block |H |E |L |P
Reply With Quote #7

I though making block not solid and contents water, but you could not grab it, and maybe swim in it too =D
__________________
xPaw is offline
cikjam
Senior Member
Join Date: Feb 2009
Location: Australia
Old 06-29-2009 , 02:36   Re: Blockmaker - Water Block |H |E |L |P
Reply With Quote #8

Xpaw could you tell me what do I add and on which lines? Please

I tried what mickey said,
I tried
PHP Code:
       else if (blockType == BM_WATER)
       {
            
//water
            
set_pev(entpev_contentsCONTENTS_WATER); 
and i tried
PHP Code:
       else if (blockType == BM_WATER)
       {
            
//water
             
set_task(0"taskSolidNot"TASK_BHOPSOLIDNOT ent);
             
set_pev(entpev_contentsCONTENTS_WATER); 
I dont even know what I am doing, i get like 26 errors and stuff.
__________________
R.I.P Aziz 'Zyzz' Sergeyevich Shavershian

Last edited by cikjam; 06-29-2009 at 02:39. Reason: EDITING: because it didnt place in correct lines.
cikjam is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 06-29-2009 , 02:39   Re: Blockmaker - Water Block |H |E |L |P
Reply With Quote #9

Just stop coding.
__________________
xPaw is offline
cikjam
Senior Member
Join Date: Feb 2009
Location: Australia
Old 06-29-2009 , 02:40   Re: Blockmaker - Water Block |H |E |L |P
Reply With Quote #10

I want this water block =[
I dont know how to code, i just trying to add blocks, no one tells me where to put stuff
__________________
R.I.P Aziz 'Zyzz' Sergeyevich Shavershian
cikjam is offline
Old 06-30-2009, 12:40
cikjam
This message has been deleted by Exolent[jNr]. Reason: Don't bump until 2 weeks have passed since last post.
Reply


Thread Tools
Display Modes

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