AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   adding speed to player (https://forums.alliedmods.net/showthread.php?t=86831)

rufee 03-03-2009 08:08

adding speed to player
 
How to add speed to player and remove it on the next round?

padilha007 03-03-2009 10:21

Re: adding speed to player
 
PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>

public plugin_init()
{
    
register_plugin("Speed Mananger""0.0.1""ProjetoCs | Yokil SpyWare")
    
    
register_concmd"amx_speed""speed"ADMIN_SLAY"- <target>" );
    
    
register_event"DeathMsg",    "eDeath",    "a");
}

public 
speedidlevelcid )
{
    if( !
cmd_accessidlevelcid) )
        return 
PLUGIN_HANDLED;
    
    new 
arg32 ];
    
read_argv1arg31 );
    
    new 
target cmd_targetidarg);
    if( !
target )
        return 
PLUGIN_HANDLED;

    
set_pev(targetpev_maxspeed320.0)
    
    return 
PLUGIN_HANDLED;
}

public 
eDeath()
{
    new 
iVictim read_data)
    
set_pev(iVictimpev_maxspeed250.0)



Exolent[jNr] 03-03-2009 12:02

Re: adding speed to player
 
Maxspeed is reset on spawn so there is no need to change it.

PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>

public plugin_init()
{
    
register_plugin("Speed Mananger""0.0.1""ProjetoCs | Yokil SpyWare")
    
    
register_concmd"amx_speed""speed"ADMIN_SLAY"- <target>" );
}

public 
speedidlevelcid )
{
    if( !
cmd_accessidlevelcid) )
        return 
PLUGIN_HANDLED;
    
    new 
arg32 ];
    
read_argv1arg31 );
    
    new 
target cmd_targetidarg);
    if( !
target )
        return 
PLUGIN_HANDLED;

    
set_pev(targetpev_maxspeed320.0)
    
    return 
PLUGIN_HANDLED;



padilha007 03-03-2009 12:22

Re: adding speed to player
 
Tnx Exolent

AntiBots 03-03-2009 13:17

Re: adding speed to player
 
The MaxSpeed dont is change when change your weapon?

Example: Scout 260 change to Usp 250. ??

ConnorMcLeod 03-03-2009 13:55

Re: adding speed to player
 
Quote:

Originally Posted by AntiBots (Post 773181)
The MaxSpeed dont is change when change your weapon?

Example: Scout 260 change to Usp 250. ??

Yes, maxspeed changes if you change your weapon.

xbatista 03-04-2009 02:45

Re: adding speed to player
 
Hmmm I've tryied it to do with Prethink and curweapon.Curweapon is buggy with speed :/ In Prethink it's normal ,but I don't wanna use Prethink,maybe someone can give good code to set speed without bugs?

anakin_cstrike 03-04-2009 08:38

Re: adding speed to player
 
In my virus smoke nade i'm setting maxspeed in curweapon and it works well.

AntiBots 03-04-2009 08:40

Re: adding speed to player
 
show the part of your code. So we can see what do you do wrong.

xbatista 03-04-2009 08:43

Re: adding speed to player
 
When I'm shooting Speed sets to incredible speed maybe 5000.0 in cur weapon.


All times are GMT -4. The time now is 17:06.

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