Raised This Month: $51 Target: $400
 12% 

Don't touch the water [1.4]


Post New Thread Reply   
 
Thread Tools Display Modes
Firippu
Senior Member
Join Date: Jan 2007
Old 12-09-2009 , 16:46   Re: Don't touch the water [1.4]
Reply With Quote #11

A few changes I would suggest.

//////////////////////////////////////////////////////////////////////////

Remove
PHP Code:
#include <fakemeta>
register_forward(FM_PlayerPreThink"fw_PlayerPreThink"
//////////////////////////////////////////////////////////////////////////

Change
PHP Code:
public fw_PlayerPreThink(id)

to
PHP Code:
public client_PreThink(id)

//////////////////////////////////////////////////////////////////////////

Change
PHP Code:
{
    new 
Float:flVelocity[3], Float:push_power get_pcvar_float(water_push)
    if(
get_entity_flags(id) & FL_INWATER)
    {
        switch(
get_pcvar_num(cvar_watermode))
        {
            case 
1:
            {
                
get_user_velocity(idflVelocity)
                
flVelocity[2] += get_pcvar_float(water_push
to
PHP Code:
{
    if(
get_entity_flags(id) & FL_INWATER)
    {
        switch(
get_pcvar_num(cvar_watermode))
        {
            case 
1:
            {
                static 
Float:flVelocity[3]
                
get_user_velocity(idflVelocity)
                
flVelocity[2] += get_pcvar_float(water_push
//////////////////////////////////////////////////////////////////////////

Change
PHP Code:
flVelocity[2] += push_power 
to
PHP Code:
flVelocity[2] += get_pcvar_float(water_push
__________________

Last edited by Firippu; 12-09-2009 at 17:15.
Firippu is offline
Raddish
BANNED
Join Date: Jul 2008
Location: Argentina
Old 12-09-2009 , 16:50   Re: Don't touch the water [1.4]
Reply With Quote #12

Fixed, Thanks Firippu ;)
Raddish is offline
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 12-09-2009 , 17:05   Re: Don't touch the water [1.4]
Reply With Quote #13

This plugin really sucks. There are more entities that control water, not just one.
__________________
DruGzOG is offline
Send a message via AIM to DruGzOG
Raddish
BANNED
Join Date: Jul 2008
Location: Argentina
Old 12-09-2009 , 17:11   Re: Don't touch the water [1.4]
Reply With Quote #14

Quote:
Originally Posted by DruGzOG View Post
This plugin really sucks. There are more entities that control water, not just one.
entities name?
Raddish is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-10-2009 , 00:29   Re: Don't touch the water [1.4]
Reply With Quote #15

Why are you using PlayerPreThink ? Why not using PlayerPostThink instead ?

Code:
    RegisterHam(Ham_Player_PostThink, "player", "CBasePlayer_PostThink")

Code:
public CBasePlayer_PostThink(id) {     if(pev(id, pev_watertype) == CONTENTS_WATER)     {         switch(get_pcvar_num(cvar_watermode))         {             case 1:             {                 new Float:flVelocity[3]                 pev(id, pev_velocity, flVelocity)                 flVelocity[2] += get_pcvar_float(water_push)                 set_pev(id, pev_velocity, flVelocity)             }             case 2: user_kill(id, 0)             case 3:             {                 new szMessage[64]                 get_pcvar_string(cvar_kickmessage, szMessage, charsmax(szMessage))                                 message_begin(MSG_ONE, SVC_DISCONNECT, _, id)                 write_string(szMessage)                 message_end()             }         }     } }
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 12-10-2009 at 00:36.
ConnorMcLeod is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 12-10-2009 , 07:07   Re: Don't touch the water [1.4]
Reply With Quote #16

Slay/kick for touching water? worst plugin evuh.
__________________
xPaw is offline
#8 SickneSS
BANNED
Join Date: Sep 2008
Location: Here
Old 12-10-2009 , 07:15   Re: Don't touch the water [1.4]
Reply With Quote #17

Quote:
Originally Posted by xPaw View Post
Slay/kick for touching water? worst plugin evuh.
Maybe he hate the swiming(?
#8 SickneSS is offline
Send a message via MSN to #8 SickneSS Send a message via Skype™ to #8 SickneSS
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 12-10-2009 , 07:32   Re: Don't touch the water [1.4]
Reply With Quote #18

Quote:
Originally Posted by #8 SickneSS View Post
Maybe he hate the swiming(?
Or he can't [?]
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
floatman
Senior Member
Join Date: Oct 2009
Location: nowhere.
Old 12-10-2009 , 09:14   Re: Don't touch the water [1.4]
Reply With Quote #19

This user is banned, maybe the thread should be trashed?

Anyway, a code observation: at line 37, the bracket should be under if... lol.
__________________


Last edited by floatman; 12-10-2009 at 09:16.
floatman is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-10-2009 , 09:17   Re: Don't touch the water [1.4]
Reply With Quote #20

Quote:
Location: BANNED
__________________
Arkshine 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 08:21.


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