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

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


Post New Thread Reply   
 
Thread Tools Display Modes
Fry!
Veteran Member
Join Date: Apr 2008
Location: Latvia
Old 11-21-2008 , 07:19   Re: [ZP] Extra Item : Speed Boost || Updated v1.1.2
Reply With Quote #21

sure I will make another version only for humans...
__________________
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 11-23-2008 , 09:34   Re: [ZP] Extra Item : Speed Boost || Updated v1.1.2
Reply With Quote #22

Here this version of Speed boost will be for humans only!
Attached Files
File Type: rar zp_extra_speed_boost_humans_only v1.0.rar (7.9 KB, 438 views)
__________________
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
ideamake
Junior Member
Join Date: Sep 2008
Old 01-04-2009 , 02:11   Re: [ZP] Extra Item : Speed Boost || Updated v1.1.2
Reply With Quote #23

g_sb_admin_only it's wrong

g_sb_all_player_buy it's right
ideamake is offline
Fry!
Veteran Member
Join Date: Apr 2008
Location: Latvia
Old 01-04-2009 , 04:36   Re: [ZP] Extra Item : Speed Boost || Updated v1.1.2
Reply With Quote #24

Thanks... I will look into it...
__________________
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
ideamake
Junior Member
Join Date: Sep 2008
Old 01-04-2009 , 06:28   Re: [ZP] Extra Item : Speed Boost || Updated v1.1.2
Reply With Quote #25

fix some bug...
remove zp_sb_time(because log error)

zp_sb_admin <1|0> - If you want that admins only can buy this ability, default is 0
change to
zp_sb_all_player_buy <1|0> - If you want that all player can buy this ability, default is 1

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_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_boostg_sb_toggleg_sb_all_player_buyg_sb_costg_sb_maxspeed
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_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_boost 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_boost)
    {
        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))
        
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))
    
client_print(idprint_chat"[ZP] You've purchased Speed Booster")
    
    return 
1
}

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 }
*/ 
ideamake is offline
Fry!
Veteran Member
Join Date: Apr 2008
Location: Latvia
Old 01-04-2009 , 06:43   Re: [ZP] Extra Item : Speed Boost || Updated v1.1.2
Reply With Quote #26

I will fix them but not remove them... -.-"
__________________
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
ideamake
Junior Member
Join Date: Sep 2008
Old 01-04-2009 , 06:52   Re: [ZP] Extra Item : Speed Boost || Updated v1.1.2
Reply With Quote #27

u can see the log
some error of the zp_sb_time
^^
ideamake is offline
Fry!
Veteran Member
Join Date: Apr 2008
Location: Latvia
Old 01-04-2009 , 07:05   Re: [ZP] Extra Item : Speed Boost || Updated v1.1.2
Reply With Quote #28

lol? How can I see? Please post them maybe?
__________________
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
ideamake
Junior Member
Join Date: Sep 2008
Old 01-04-2009 , 07:08   Re: [ZP] Extra Item : Speed Boost || Updated v1.1.2
Reply With Quote #29

debug mode...
when u buy the Speed Boost
Quote:
L 01/04/2009 - 20:069: Start of error session.
L 01/04/2009 - 20:069: Info (map "de_aztec") (file "addons/amxmodx/logs/error_20090104.log")
L 01/04/2009 - 20:069: Function is not present (function "boost_over") (plugin "zp_extra_speed_boost.amxx")
L 01/04/2009 - 20:069: [AMXX] Displaying debug trace (plugin "zp_extra_speed_boost.amxx")
L 01/04/2009 - 20:069: [AMXX] Run time error 10: native error (native "set_task")
L 01/04/2009 - 20:069: [AMXX] [0] zp_extra_speed_boost.sma::zp_extra_item_selec ted (line 122)
ideamake is offline
Fry!
Veteran Member
Join Date: Apr 2008
Location: Latvia
Old 01-04-2009 , 07:10   Re: [ZP] Extra Item : Speed Boost || Updated v1.1.2
Reply With Quote #30

Ok, thank you.
__________________
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 20:59.


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