Raised This Month: $ Target: $400
 0% 

Boost Moving Speed in Water(swimming)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mlk27
Veteran Member
Join Date: May 2008
Old 01-07-2009 , 18:30   Boost Moving Speed in Water(swimming)
Reply With Quote #1

how do we make player moves or swims faster when he's in water and give him longer breath when he's diving..
Mlk27 is offline
Old 01-07-2009, 19:06
plasmo
This message has been deleted by plasmo. Reason: check exolents code below :D
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 01-07-2009 , 20:21   Re: Boost Moving Speed in Water(swimming)
Reply With Quote #2

I got the water speed to work, but I couldn't figure out how to change the delay before the drowning starts.
At the top, you will see my notes.


Code:
// look down

EDIT:

Actually, I did figure everything out.
This code allows you to change just about everything with water damage.
It also allows you to change a player's water speed.
To customize it, just change the #define's at the top to your values.

Code:
// look below

EDIT:

Code is now a full plugin, here: http://forums.alliedmods.net/showthread.php?p=741366
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!

Last edited by Exolent[jNr]; 01-09-2009 at 23:49.
Exolent[jNr] is offline
Bad_Bud
Senior Member
Join Date: Oct 2006
Location: The internet
Old 01-07-2009 , 22:28   Re: Boost Moving Speed in Water(swimming)
Reply With Quote #3

Wow, you kicked this topic's ass. You should post this somewhere for reference.
__________________
Bad_Bud is offline
plasmo
Member
Join Date: Aug 2006
Location: Melbourne, Australia
Old 01-07-2009 , 22:36   Re: Boost Moving Speed in Water(swimming)
Reply With Quote #4

should be added to the snippets lol
plasmo is offline
Send a message via MSN to plasmo
Mlk27
Veteran Member
Join Date: May 2008
Old 01-07-2009 , 23:40   Re: Boost Moving Speed in Water(swimming)
Reply With Quote #5

sweet..thanks alot

and why you're using both to set client's max speed:

Code:
engfunc(EngFunc_SetClientMaxspeed, client, maxspeed);
set_pev(client, pev_maxspeed, maxspeed);
i thought any of them will do the job

and as for longer breath, any different if i use pev_air_finished?
Mlk27 is offline
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 01-07-2009 , 23:49   Re: Boost Moving Speed in Water(swimming)
Reply With Quote #6

Quote:
Originally Posted by Mlk27 View Post
sweet..thanks alot

and why you're using both to set client's max speed:

Code:
engfunc(EngFunc_SetClientMaxspeed, client, maxspeed);
set_pev(client, pev_maxspeed, maxspeed);
i thought any of them will do the job

and as for longer breath, any different if i use pev_air_finished?
One of them notifies the engine of the change, and the other stores the value if any other code tries to read it.
__________________

Community / No support through PM
danielkza is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 01-08-2009 , 07:18   Re: Boost Moving Speed in Water(swimming)
Reply With Quote #7

pev_air_finished is the amount of time in seconds that player has spent not in water.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Bad_Bud
Senior Member
Join Date: Oct 2006
Location: The internet
Old 01-08-2009 , 14:45   Re: Boost Moving Speed in Water(swimming)
Reply With Quote #8

lol, using ham... you could have someone gib when they drown. That would be hillarious.
__________________
Bad_Bud is offline
Mlk27
Veteran Member
Join Date: May 2008
Old 01-09-2009 , 20:55   Re: Boost Moving Speed in Water(swimming)
Reply With Quote #9

Exolent, why the drown player's health is regenerated when he comes out of water?
Mlk27 is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 01-09-2009 , 20:56   Re: Boost Moving Speed in Water(swimming)
Reply With Quote #10

That is part of the game.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Reply



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 09:13.


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