Raised This Month: $ Target: $400
 0% 

[ZP] Extra Item : Speed Boost || Updated v1.2 [28/06/2009]


Post New Thread Reply   
 
Thread Tools Display Modes
ideamake
Junior Member
Join Date: Sep 2008
Old 01-04-2009 , 07:44   Re: [ZP] Extra Item : Speed Boost || Updated v1.1.2
Reply With Quote #31

ok
i know what r u want
add this

PHP Code:
public boost_over(id)
{
    
g_hasSpeedBoost[id] = false
    fm_set_rendering
(idkRenderFxGlowShell000kRenderNormal0)
    
client_print(idprint_chat"[ZP] Speed Booster is Over")

PHP Code:
/* ======================================================================================
/
/
/                [ZP] Extra Item : Speed Boost
/                  ( ability for Humans and Zombies )
/
/                    by The_Thing
/
/
/
/    Description :
/
/            This is Speed Boost ability for both teams, that if you want to run away from enemy.
/            Ability is only for 1 round, so in new round you must buy it again.
/
/
/
/    Cvars :
/
/            zp_speed_boost <1|0>         - To turn on or turn off this plugin, default is 1
/            zp_sb_all_player_buy <1|0>    - If you want that all player can buy this ability, default is 1
/            zp_sb_cost "8"                 - How much Speed Boost will cost
/            zp_sb_maxspeed "325.0"        - This will be maxspeed, but you can change it what ever number you want.
/            zp_sb_time "25.0"        - How long you can run before boost are over.
/            zp_sb_red_color "150"        - Amount of red color.
/            zp_sb_green_color "0"        - Amount of green color.
/            zp_sb_blue_color "100"        - Amount of blue color.            
/
/
/
/    Commands :
/
/            You can buy it through chat commands too.
/
/            say /sboost or say_team /sboost - to buy Speed Boost
/
/
/
/    Changelog :
/
/            14/11/2008 - v1.0 - First release
/            15/11/2008 - v1.1 - fixed some mistakes, added cvar how long you can use maxspeed.
/            18/11/2008 - v1.1.2 - added glow effect when you buy speed booster with cvars, added reset after infection or kill.
/
/

*/

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

#define PLUGIN "[ZP] Extra : Speed Boost"
#define VERSION "1.1.2"
#define AUTHOR "The_Thing"

#define BUY_SBOOST ADMIN_LEVEL_B

new g_item_name[] = { "Speed Boost" }
new 
g_itemid_speedg_sb_toggleg_sb_all_player_buyg_sb_costg_sb_maxspeedg_sb_time
new g_sb_redg_sb_greeng_sb_blue
new bool:g_hasSpeedBoost[33]

public 
plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
g_sb_toggle register_cvar("zp_speed_boost""1")
    
g_sb_all_player_buy register_cvar("zp_sb_all_player_buy""1")
    
g_sb_cost register_cvar("zp_sb_cost""8")
    
g_sb_maxspeed register_cvar("zp_sb_maxspeed""325.0")
    
g_sb_time register_cvar("zp_sb_time""25.0")
    
g_sb_red register_cvar("zp_sb_red_color""150")
    
g_sb_green register_cvar("zp_sb_green_color""0")
    
g_sb_blue register_cvar("zp_sb_blue_color""100")
    
    
g_itemid_speed zp_register_extra_item(g_item_nameget_pcvar_num(g_sb_cost), 0)
    
    
register_clcmd("say /sboost""buy_sboost"ADMIN_ALL)
    
register_clcmd("say_team /sboost""buy_sboost"ADMIN_ALL)
    
    
register_forward(FM_PlayerPreThink"fw_PlayerPreThink")
    
    
register_event("HLTV""event_round_start""a""1=0""2=0")
    
register_event("DeathMsg""death""a")
}

public 
client_connect(id)
{
    
g_hasSpeedBoost[id] = false
}

public 
client_disconnect(id)
{
    
g_hasSpeedBoost[id] = false
}


public 
death()
{
    
g_hasSpeedBoost[read_data(2)] = false // will be reset after infection or kill
}

public 
event_round_start()
{
    for (new 
1<= 32i++)
        
g_hasSpeedBoost[i] = false
}

public 
zp_extra_item_selected(playeritemid)
{
    if ( 
itemid == g_itemid_speed )
    {
        if (!
get_pcvar_num(g_sb_all_player_buy) && (!access(playerADMIN_LEVEL_B)))
            return 
PLUGIN_HANDLED
        
        g_hasSpeedBoost
[player] = true
        
        fm_set_rendering
(playerkRenderFxGlowShellget_pcvar_num(g_sb_red), get_pcvar_num(g_sb_green), get_pcvar_num(g_sb_blue), kRenderNormal255)
        
set_pev(playerpev_maxspeedget_pcvar_float(g_sb_maxspeed))
        
set_task(get_pcvar_float(g_sb_time), "boost_over"player)
        
client_print(playerprint_chat"[ZP] You've purchased Speed Booster")
    }
    return 
PLUGIN_CONTINUE
}

public 
buy_sboost(id)
{
    if (!
get_pcvar_num(g_sb_toggle))
        return 
PLUGIN_HANDLED
        
    
if (!get_pcvar_num(g_sb_all_player_buy) && (!access(idADMIN_LEVEL_B)))
        return 
PLUGIN_HANDLED
            
    
new money zp_get_user_ammo_packs(id)
    new 
cost get_pcvar_num(g_sb_cost)
    
    if (!
is_user_alive(id))
    {
        
client_print(idprint_chat"[ZP] Dead people can't purchase Speed Boost")
        return 
PLUGIN_HANDLED
    
}
    
    if (
g_hasSpeedBoost[id])
    {
        
client_print(idprint_chat"[ZP] You already purchased Speed Boost")
        return 
PLUGIN_HANDLED
    
}
    
    if (
money cost)
    {
        
client_print(idprint_chat"[ZP] You don't have enough ammo packs to buy Speed Boost"get_pcvar_num(g_sb_cost))
        return 
PLUGIN_HANDLED
    
}
    
    
zp_set_user_ammo_packs(idmoney cost)
    
    
g_hasSpeedBoost[id] = true

    fm_set_rendering
(idkRenderFxGlowShellget_pcvar_num(g_sb_red), get_pcvar_num(g_sb_green), get_pcvar_num(g_sb_blue), kRenderNormal255)
    
set_pev(idpev_maxspeedget_pcvar_float(g_sb_maxspeed))
    
set_task(get_pcvar_float(g_sb_time), "boost_over"id)
    
client_print(idprint_chat"[ZP] You've purchased Speed Booster")
    
    return 
1
}

public 
boost_over(id)
{
    
g_hasSpeedBoost[id] = false
    fm_set_rendering
(idkRenderFxGlowShell000kRenderNormal0)
    
client_print(idprint_chat"[ZP] Speed Booster is Over")
}

public 
fw_PlayerPreThink(id)
{
    if (!
is_user_alive(id))
        return 
FMRES_IGNORED
        
    
if (g_hasSpeedBoost[id])
    {
        
fm_set_rendering(idkRenderFxGlowShellget_pcvar_num(g_sb_red), get_pcvar_num(g_sb_green), get_pcvar_num(g_sb_blue), kRenderNormal255)
        
set_pev(idpev_maxspeedget_pcvar_float(g_sb_maxspeed))        
    }
    return 
PLUGIN_CONTINUE
}
    
stock fm_set_user_maxspeed(indexFloat:speed = -1.0
{
    
engfunc(EngFunc_SetClientMaxspeedindexspeed);
    
set_pev(indexpev_maxspeedspeed);

    return 
1;
}        

stock fm_set_rendering(entityfx kRenderFxNone255255255render kRenderNormalamount 16
{
    new 
Float:RenderColor[3];
    
RenderColor[0] = float(r);
    
RenderColor[1] = float(g);
    
RenderColor[2] = float(b);

    
set_pev(entitypev_renderfxfx);
    
set_pev(entitypev_rendercolorRenderColor);
    
set_pev(entitypev_rendermoderender);
    
set_pev(entitypev_renderamtfloat(amount));

    return 
1;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/ 

Last edited by ideamake; 01-04-2009 at 08:49.
ideamake is offline
Fry!
Veteran Member
Join Date: Apr 2008
Location: Latvia
Old 01-04-2009 , 09:30   Re: [ZP] Extra Item : Speed Boost || Updated v1.1.2
Reply With Quote #32

dude I know how to fix plugins... ^^
__________________
Quote:
Originally Posted by wisam187
why all the great scriptors..... always.... leave and let their works go into oblivion ???
i miss your way in making outstanding plugins...
this forum needs lots of the likes of you..... and less of the idiots that spread right now.
Fry! is offline
Fry!
Veteran Member
Join Date: Apr 2008
Location: Latvia
Old 01-04-2009 , 10:55   Re: [ZP] Extra Item : Speed Boost || Updated v1.1.5
Reply With Quote #33

New fixed release (Updated to v1.1.5), for more info check main post!
__________________
Quote:
Originally Posted by wisam187
why all the great scriptors..... always.... leave and let their works go into oblivion ???
i miss your way in making outstanding plugins...
this forum needs lots of the likes of you..... and less of the idiots that spread right now.
Fry! is offline
Fry!
Veteran Member
Join Date: Apr 2008
Location: Latvia
Old 06-28-2009 , 13:29   Re: [ZP] Extra Item : Speed Boost || Updated v1.2 [28/06/2009]
Reply With Quote #34

New release v1.2, for more info check main post.
__________________
Quote:
Originally Posted by wisam187
why all the great scriptors..... always.... leave and let their works go into oblivion ???
i miss your way in making outstanding plugins...
this forum needs lots of the likes of you..... and less of the idiots that spread right now.
Fry! is offline
FRee StyLeR | SteeL
Junior Member
Join Date: Jul 2009
Old 07-03-2009 , 09:45   Re: [ZP] Extra Item : Speed Boost || Updated v1.2 [28/06/2009]
Reply With Quote #35

Thanks ... very nice .. like .. vo use in my next addon ..
FRee StyLeR | SteeL is offline
Fry!
Veteran Member
Join Date: Apr 2008
Location: Latvia
Old 07-03-2009 , 11:02   Re: [ZP] Extra Item : Speed Boost || Updated v1.2 [28/06/2009]
Reply With Quote #36

What do you mean? What is that addon?
__________________
Quote:
Originally Posted by wisam187
why all the great scriptors..... always.... leave and let their works go into oblivion ???
i miss your way in making outstanding plugins...
this forum needs lots of the likes of you..... and less of the idiots that spread right now.
Fry! is offline
FRee StyLeR | SteeL
Junior Member
Join Date: Jul 2009
Old 07-03-2009 , 13:28   Re: [ZP] Extra Item : Speed Boost || Updated v1.2 [28/06/2009]
Reply With Quote #37

addon is a set of plugins with settings, sounds, models and much more ...
FRee StyLeR | SteeL is offline
Fry!
Veteran Member
Join Date: Apr 2008
Location: Latvia
Old 07-03-2009 , 14:04   Re: [ZP] Extra Item : Speed Boost || Updated v1.2 [28/06/2009]
Reply With Quote #38

You will use my plugin on your addon???
__________________
Quote:
Originally Posted by wisam187
why all the great scriptors..... always.... leave and let their works go into oblivion ???
i miss your way in making outstanding plugins...
this forum needs lots of the likes of you..... and less of the idiots that spread right now.
Fry! is offline
FRee StyLeR | SteeL
Junior Member
Join Date: Jul 2009
Old 07-03-2009 , 15:29   Re: [ZP] Extra Item : Speed Boost || Updated v1.2 [28/06/2009]
Reply With Quote #39

Yes, I can?
FRee StyLeR | SteeL is offline
Fry!
Veteran Member
Join Date: Apr 2008
Location: Latvia
Old 07-03-2009 , 15:39   Re: [ZP] Extra Item : Speed Boost || Updated v1.2 [28/06/2009]
Reply With Quote #40

And what you gonna do with that addon?? You will upload somewhere (share with others?)...
__________________
Quote:
Originally Posted by wisam187
why all the great scriptors..... always.... leave and let their works go into oblivion ???
i miss your way in making outstanding plugins...
this forum needs lots of the likes of you..... and less of the idiots that spread right now.
Fry! 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 07:32.


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