AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Remove the speed when spawn(surf) (https://forums.alliedmods.net/showthread.php?t=156162)

biscuit628 05-01-2011 18:05

Remove the speed when spawn(surf)
 
ok,i know my english is f**king bad,sry about that

here is a youtube video
http://www.youtube.com/watch?v=yen4h...eature=related 0:03
http://www.youtube.com/watch?v=OLyAj2THDkk 0:16

when player touch that place ,his speed will become faster

if player touch there,at the same time they use the respawn function
the speed is still become faster when they spawn

biscuit628 05-02-2011 00:31

Re: Remove the speed when spawn(surf)
 
Quote:

Originally Posted by kNowo (Post 1461772)
are you sure? AFAIK, it will only make player move faster

PHP Code:

#include <amxmodx>
#include <engine>

public plugin_init()
{
    new 
mapname[32]
    
get_mapname(mapnamecharsmax(mapname))

    if(
equali(mapname"surf_water_run"))
        
remove_entity(find_ent_by_model(-1"trigger_push""*3"))


"trigger_push" is the enity's classname.
"*3" is the model number. every entity has a unique model number so they wont mixed up.
You can use BSP Viewer to view those stuff

is that any other way to solve that except remove the class?

ConnorMcLeod 05-02-2011 01:58

Re: Remove the speed when spawn(surf)
 
I thought you had some video of that bug.
May be you should reset velocity when you respawn the player, also which respawn plugin are you using ?

PHP Code:

    RegisterHam(Ham_Spawn"player""CBasePlayer_Spawn_Post"true)
}

public 
CBasePlayer_Spawn_Postid )
{
    if( 
is_user_alive(id) )
    {
        new 
iFlags pev(idpev_flags)
        if( 
iFlags FL_BASEVELOCITY )
        {
            
set_pev(idpev_flagsiFlags & ~FL_BASEVELOCITY)
        }
        
set_pev(idpev_velocity0)
        
set_pev(idpev_basevelocity0)
    }



kNowo 05-02-2011 03:02

Re: Remove the speed when spawn(surf)
 
i dont get it...is this "bug" exists? explain to me

SonicSonedit 05-02-2011 03:54

Re: Remove the speed when spawn(surf)
 
biscuit628
Do you need to reset player speed after he touched trigger_push or you want to create permanent speed boost for player?

jimaway 05-02-2011 04:20

Re: Remove the speed when spawn(surf)
 
Quote:

Originally Posted by kNowo (Post 1461840)
i dont get it...is this "bug" exists? explain to me

yes it exists, ive seen it myself, when you're in trigger_push right before round ends you get to fly off from your spawn :mrgreen: doesent happen too often tho

matsi 05-02-2011 10:12

Re: Remove the speed when spawn(surf)
 
I just tested ConnorMcLeod's code and it works. :wink:

kNowo 05-02-2011 21:30

Re: Remove the speed when spawn(surf)
 
Quote:

Originally Posted by jimaway (Post 1461877)
yes it exists, ive seen it myself, when you're in trigger_push right before round ends you get to fly off from your spawn :mrgreen: doesent happen too often tho

oh my bad. never happens to me and i doesn't really understand first post.


All times are GMT -4. The time now is 04:18.

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