Raised This Month: $32 Target: $400
 8% 

Subplugin Submission [CS] First Blood Reward v5.3 (ZP compatible/ 13 Rewards)


Post New Thread Reply   
 
Thread Tools Display Modes
H.RED.ZONE
Veteran Member
Join Date: Sep 2011
Location: Serbia, Belgrade
Old 07-27-2014 , 10:37   Re: [ZP] First Blood Reward v2.1
Reply With Quote #21

This error gave me an idea, if human makes first blood all humans get upgrade, if zombies get first blood they evolve (: And seperate plugins zp4.3 and zp5.0 some people don't use zp compability.
__________________
H.RED.ZONE is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 07-27-2014 , 11:08   Re: [ZP] First Blood Reward v2.1
Reply With Quote #22

Quote:
If human makes first blood all humans get upgrade, if zombies get first blood they evolve.
So, epic. I love the idea.

What kind of upgrade that you think should be given to human and zombie?
zmd94 is offline
H.RED.ZONE
Veteran Member
Join Date: Sep 2011
Location: Serbia, Belgrade
Old 07-27-2014 , 11:58   Re: [ZP] First Blood Reward v2.1
Reply With Quote #23

You can pick what you like here are some idea's armor, health, ammopacks, damage, speed, regeneration, gravity, grenades, glow, frag, immunity...
__________________
H.RED.ZONE is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 07-27-2014 , 19:16   Re: [ZP] First Blood Reward v2.1
Reply With Quote #24

@ H.RED.ZONE, thank you for the suggestion.
zmd94 is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 07-29-2014 , 00:00   Re: [ZP] First Blood Reward v2.1
Reply With Quote #25

New update!
Quote:
I have released new version of First Blood Reward v2.

Now, the hud messages will tell who is the first killer and how many ammo packs reward that he get for killing.
If you want this plugin, just download the first_blood_bonus_v2.sma file.
zmd94 is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 07-30-2014 , 02:26   Re: [ZP] First Blood Reward v2.1
Reply With Quote #26

New update!
Quote:
v1.0.2 - [FIXED] The hud message will be displayed to all players
Credit:
Quote:
FN_Productions for testing.

Last edited by zmd94; 07-30-2014 at 09:59.
zmd94 is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 07-30-2014 , 09:58   Re: [ZP] First Blood Reward v2.1
Reply With Quote #27

New update!
Quote:
v1.0.3 - [FIXED] The hud message will only be displayed if real player killed a victim
To do list:
Quote:
If human makes first blood all humans get upgrade, if zombies get first blood they evolve.
If you have any suggestions, feel free to share it with me.

Last edited by zmd94; 07-30-2014 at 10:00.
zmd94 is offline
Catastrophe
Veteran Member
Join Date: Jul 2012
Location: somewhere between narnia
Old 08-01-2014 , 10:50   Re: [ZP] First Blood Reward v2.1
Reply With Quote #28

Just for the note here. @zmd94 Emit sound is used to emit sound from a players origin (even though you pass id, itll do it through origin), emit sound will emit a sound that will be heard in a specific pre-decided radius so as someone said earlier using emitsound here will create a lot of noise with many players...
__________________
You will find everything u need :-
Catastrophe is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 08-01-2014 , 12:12   Re: [ZP] First Blood Reward v2.1
Reply With Quote #29

Quote:
Originally Posted by Catastrophe View Post
Just for the note here.
Thank you for the information.

New update!
Quote:
v3.0 (Beta) - [FIXED] Fully recoded and optimized both of the plugin first_blood_bonus.sma and first_blood_bonus_v2.sma
The code have been fully recoded. Now, it is using RegisterHam(Ham_Killed, "player", "fw_PlayerKilled") to detect the first kill.

Credits:
Quote:
1. H.RED.ZONE for code helping.
2. FN_Productions for testing.

Last edited by zmd94; 08-01-2014 at 12:12.
zmd94 is offline
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 08-01-2014 , 15:33   Re: [ZP] First Blood Reward (Beta 3.0)
Reply With Quote #30

Seriously your code arrangement is damn horrible, i suggest you to use AmxModX Studio http://sourceforge.net/project/downl....4.3_final.zip

I use this since 2009, or you can use PawnStudio, but i prefer Amxmodx Studio, because i rarely code for SourceMod.

better code to prevent error
PHP Code:
#include <amxmodx>
#include <zombieplague>
#include <hamsandwich>
#include <fakemeta>

#define SoundFirstBlood "misc/firstblood.wav"

//Uncomment this if you are using new amxmodx 183 that support register ham for csbot/bot from CZ.
//#define Use_New_Amxx_183

const Float:HUD_MODE_X = -1.0
const Float:HUD_MODE_Y 0.20
new bool:bFirstBloodg_SyncHudcvar_b_healthcvar_b_armorcvar_apamount

public plugin_init() 
{
    
register_plugin("[ZP] First Blood Bonus v2 (Beta 3.0)""3.0""zmd94"// no need to define since you are using once only.
    
    #if defined Use_New_Amxx_183
    
RegisterHam(Ham_Killed"player""fw_PlayerKilled"0true)
    
#else
    
RegisterHam(Ham_Killed"player""fw_PlayerKilled"//you need to registerhambot if you are using csbot/bot from CZ.
    #endif
    
    
register_event("HLTV""event_new_round""a""1=0""2=0")
    
    
cvar_b_health register_cvar("zp_health_bonus""50")  // The values of health bonus for killing.
    
cvar_b_armor register_cvar("zp_armor_bonus""25"// The values of armor bonus for killing.
    
cvar_apamount register_cvar("zp_ammo_packs_reward""50"// The values of ammo packs given for killing.
    
g_SyncHud CreateHudSyncObj()
}

public 
plugin_precache() precache_sound(SoundFirstBlood);

public 
event_new_round() bFirstBlood false;

public 
fw_PlayerKilled(victimattacker)  
{
    
//already do firstblood
    
if(bFirstBlood) return;
    
    
//selfkill/suicide, no need to reward
    
if(victim == attacker) return;
    
    
//attacker is not connected/non-player
    
if(!is_user_connected(attacker)) return;
    
    
//ok set firstblood event
    
bFirstBlood true
    set_pev
(attackerpev_healthpev(attackerpev_health)+get_pcvar_float(cvar_b_health))
    
set_pev(attackerpev_armorvaluepev(attackerpev_armorvalue)+get_pcvar_float(cvar_b_armor))
    new 
iRewardAP get_pcvar_num(cvar_apamount)
    
zp_set_user_ammo_packs(attackerzp_get_user_ammo_packs(attacker)+iRewardAP)
    
    new 
szName[32], iColor[3]
    
get_user_name(attackerszName31)
    
    
//static colors are suck! do it moreeee fancy
    
iColor[0] = random_num(10,255)
    
iColor[1] = random(256)
    
iColor[2] = random(256)
    
set_hudmessage(iColor[0], iColor[1], iColor[2], HUD_MODE_XHUD_MODE_Y06.012.00.00.0, -1)
    
ShowSyncHudMsg(0g_SyncHud"%s drew a firstblood..^nReward %d ammopacks to him/her"szNameiRewardAP)
    
client_cmd(0"spk %s"SoundFirstBlood)

__________________
Team-MMG CS1.6 Servers:
✅ MultiMod -- 103.179.44.152:27016
✅ Zombie Plague -- 103.179.44.152:27015
✅ Zombie Escape -- 103.179.44.152:27017
✅ Klassik Kombat -- 103.179.44.152:27018
✅ Boss-Battle -- 103.179.44.152:27019

Last edited by yokomo; 08-01-2014 at 15:38. Reason: jom jom inai
yokomo 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:40.


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