Day of Defeat Plugins Community
This site is an archive — everything is readable and downloadable, nothing can be posted. Admin
Archive › Old Forum Threads › General › Requests for DoD Plugins › dod_goodies4score? 2 nades for a cap.
9 posts, 5 people · 3,603 views Thread Rating: ★★★★★
closeddod_goodies4score? 2 nades for a cap.
Started by etothep on 10-07-2006, 02:53 AM
E etothep
started this thread
Posts: 32
Threads: 5
Joined: Aug 2006
10-07-2006, 02:53 AM #1

it seems to have vanished off the face of the web. Anyone know anything about this plugin.rnrnThe only purpose I'm concerned with is giving a player 2 grenades for the capture of a flag.

{SR} *Raggy*
posted here
Posts: 370
Threads: 27
Joined: Apr 2006
10-07-2006, 08:57 AM #2

I only got the dod_scorerewards.sma....Sry

O Outlawpapa
posted here
Posts: 4
Threads: 0
Joined: Sep 2006
10-09-2006, 02:39 PM #3

Here is the sma for the plugin hope it helps....rnrn//rn// CVARs (for amxx.cfg):rn// =====================rn//rn// gfs_enabled <1/0> = enable/disable pluginrn// gfs_resetondeath <1/0> = reset flagcounters onrn// death on/offrn// gfs_healthflags <amount> = amount of flag caps torn// get health refilledrn// gfs_nadeflags <amount> = amount of flag caps torn// get set amount of nadesrn// gfs_deathflags <amount> = amount of flag caps torn// decrease set amount of deathsrn//rn// gfs_removedeaths <amount> = sets amount of deaths to decreasern// gfs_givenades <amount> = sets amount of grenades to givern//rn//rn// NOTES:rn// ======rn//rn// - the counters for health, nades and deaths are independent fromrn// each other, so it can happen that people get more than one goodiern// after some flagcaps as the single counters are reset to zero afterrn// a goodie was received.rn//rn// - the grenades feature isn't working for the Brits, so that wholern// feature is automatically disabled when a map with Brits insteadrn// of americans is played. health and deaths features stay enabled.rn//rnrn#include <amxmodx>rn#include <dodx>rn#include <dodfun>rn#include <fun>rnrnnew zHealth[33]rnnew zGrenade[33]rnnew zDeath[33]rnrnpublic plugin_init(){rn register_plugin("DoD Goodies4Score","requested","[RST] FireStorm")rn register_statsfwd(XMF_SCORE)rn register_cvar("gfs_enabled","1")rn register_cvar("gfs_resetondeath","1")rn register_cvar("gfs_healthflags","2")rn register_cvar("gfs_nadeflags","3")rn register_cvar("gfs_deathflags","5")rn register_cvar("gfs_removedeaths","2")rn register_cvar("gfs_givenades","2")rn register_event("ResetHUD","reset_flagcount","be")rn}rnrnpublic plugin_modules(){rn require_module("fun")rn require_module("dodx")rn require_module("dodfun")rn}rnrnpublic client_authorized(id){rn zHealth[id] = 0rn zGrenade[id] = 0rn zDeath[id] = 0rn}rnrnpublic reset_flagcount(id){rn new zgfsEnabled = get_cvar_num("gfs_enabled")rn new zDeathReset = get_cvar_num("gfs_resetondeath")rn if(zgfsEnabled == 1 && zDeathReset == 1){rn zHealth[id] = 0rn zGrenade[id] = 0rn zDeath[id] = 0rn }rn}rnrnpublic client_score(index,score,total){rn new zgfsEnabled = get_cvar_num("gfs_enabled")rn if(zgfsEnabled == 1){rn zHealth[index] ++rn zGrenade[index] ++rn zDeath[index] ++rn check_score(index)rn }rn}rnrnpublic check_score(index){rn if(is_user_alive(index) == 1){rn new zHealthFlags = get_cvar_num("gfs_healthflags")rn new zNadeFlags = get_cvar_num("gfs_nadeflags")rn new zDeathFlags = get_cvar_num("gfs_deathflags")rn if(zHealth[index] == zHealthFlags){rn new plHealth = get_user_health(index)rn if(plHealth < 100){rn set_user_health(index,100)rn client_print(index,print_chat,"[DoD Goodies4Score] Your health has been refilled!")rn }rn zHealth[index] = 0rn }rn if(zGrenade[index] == zNadeFlags){rn zGrenade[index] = 0rn new zGrenAmmo = get_cvar_num("gfs_givenades")rn if(get_user_team(index) == AXIS){rn new CurrNades = dod_get_user_ammo(index,DODW_STICKGRENADE)rn if(CurrNades == 0){rn give_item(index,"weapon_stickgrenade")rn }rn dod_set_user_ammo(index,DODW_STICKGRENADE,(CurrNades + zGrenAmmo))rn }rn else if(get_user_team(index) == ALLIES){rn new CurrNades = dod_get_user_ammo(index,DODW_HANDGRENADE)rn if(CurrNades == 0){rn give_item(index,"weapon_handgrenade")rn }rn dod_set_user_ammo(index,DODW_HANDGRENADE,(CurrNades + zGrenAmmo))rn }rn client_print(index,print_chat,"[DoD Goodies4Score] You have been given %d grenades!",zGrenAmmo)rn }rn if(zDeath[index] == zDeathFlags){rn new zDeaths = dod_get_pl_deaths(index)rn new zRemove = get_cvar_num("gfs_removedeaths")rn if(zDeaths > 0){rn dod_set_pl_deaths(index,(zDeaths -= zRemove))rn client_print(index,print_chat,"[DoD Goodies4Score] Your deaths have been decreased by %d!",zRemove)rn }rn zDeath[index] = 0rn }rn }rn return PLUGIN_CONTINUErn}

E etothep
started this thread
Posts: 32
Threads: 5
Joined: Aug 2006
10-13-2006, 04:54 AM #4

wow everything i need right there (cvars included). thanks a sh*tload.

O Outlawpapa
posted here
Posts: 4
Threads: 0
Joined: Sep 2006
10-14-2006, 03:40 PM #5

Happy i can help. :cool:

E etothep
started this thread
Posts: 32
Threads: 5
Joined: Aug 2006
11-27-2006, 07:24 PM #6

couple of compile errors having to do with the currNades spelled wrong in a couple places lol. heres the fix.nnn//n// CVARs (for amxx.cfg):n// =====================n//n// gfs_enabled <1/0> = enable/disable pluginn// gfs_resetondeath <1/0> = reset flagcounters onn// death on/offn// gfs_healthflags <amount> = amount of flag caps ton// get health refilledn// gfs_nadeflags <amount> = amount of flag caps ton// get set amount of nadesn// gfs_deathflags <amount> = amount of flag caps ton// decrease set amount of deathsn//n// gfs_removedeaths <amount> = sets amount of deaths to decreasen// gfs_givenades <amount> = sets amount of grenades to given//n//n// NOTES:n// ======n//n// - the counters for health, nades and deaths are independent fromn// each other, so it can happen that people get more than one goodien// after some flagcaps as the single counters are reset to zero aftern// a goodie was received.n//n// - the grenades feature isn't working for the Brits, so that wholen// feature is automatically disabled when a map with Brits insteadn// of americans is played. health and deaths features stay enabled.n//nn#include <amxmodx>n#include <dodx>n#include <dodfun>n#include <fun>nnnew zHealth[33]nnew zGrenade[33]nnew zDeath[33]nnpublic plugin_init(){nregister_plugin("DoD Goodies4Score","requested","[RST] FireStorm")nregister_statsfwd(XMF_SCORE)nregister_cvar("gfs_enabled","1")nregister_cvar("gfs_resetondeath","1")nregister_cvar("gfs_healthflags","2")nregister_cvar("gfs_nadeflags","3")nregister_cvar("gfs_deathflags","5")nregister_cvar("gfs_removedeaths","2")nregister_cvar("gfs_givenades","2")nregister_event("ResetHUD","reset_flagcount","be")n}nnpublic plugin_modules(){nrequire_module("fun")nrequire_module("dodx")nrequire_module("dodfun")n}nnpublic client_authorized(id){nzHealth[id] = 0nzGrenade[id] = 0nzDeath[id] = 0n}nnpublic reset_flagcount(id){nnew zgfsEnabled = get_cvar_num("gfs_enabled")nnew zDeathReset = get_cvar_num("gfs_resetondeath")nif(zgfsEnabled == 1 && zDeathReset == 1){nzHealth[id] = 0nzGrenade[id] = 0nzDeath[id] = 0n}n}nnpublic client_score(index,score,total){nnew zgfsEnabled = get_cvar_num("gfs_enabled")nif(zgfsEnabled == 1){nzHealth[index] ++nzGrenade[index] ++nzDeath[index] ++ncheck_score(index)n}n}nnpublic check_score(index){nif(is_user_alive(index) == 1){nnew zHealthFlags = get_cvar_num("gfs_healthflags")nnew zNadeFlags = get_cvar_num("gfs_nadeflags")nnew zDeathFlags = get_cvar_num("gfs_deathflags")nif(zHealth[index] == zHealthFlags){nnew plHealth = get_user_health(index)nif(plHealth < 100){nset_user_health(index,100)nclient_print(index,print_chat,"[DoD Goodies4Score] Your health has been refilled!")n}nzHealth[index] = 0n}nif(zGrenade[index] == zNadeFlags){nzGrenade[index] = 0nnew zGrenAmmo = get_cvar_num("gfs_givenades")nif(get_user_team(index) == AXIS){nnew CurrNades = dod_get_user_ammo(index,DODW_STICKGRENADE)nif(CurrNades == 0){ngive_item(index,"weapon_stickgrenade")n}ndod_set_user_ammo(index,DODW_STICKGRENADE,(CurrNades + zGrenAmmo))n}nelse if(get_user_team(index) == ALLIES){nnew CurrNades = dod_get_user_ammo(index,DODW_HANDGRENADE)nif(CurrNades == 0){ngive_item(index,"weapon_handgrenade")n}ndod_set_user_ammo(index,DODW_HANDGRENADE,(CurrNades + zGrenAmmo))n}nclient_print(index,print_chat,"[DoD Goodies4Score] You have been given %d grenades!",zGrenAmmo)n}nif(zDeath[index] == zDeathFlags){nnew zDeaths = dod_get_pl_deaths(index)nnew zRemove = get_cvar_num("gfs_removedeaths")nif(zDeaths > 0){ndod_set_pl_deaths(index,(zDeaths -= zRemove))nclient_print(index,print_chat,"[DoD Goodies4Score] Your deaths have been decreased by %d!",zRemove)n}nzDeath[index] = 0n}n}

tegu
posted here
Posts: 191
Threads: 11
Joined: Aug 2006
11-28-2006, 08:28 PM #7

Would love it if this would compile for me. I have tried the amxmodx compiler and the online compiler... neither works. :mad:

Zor
posted here
Posts: 688
Threads: 75
Joined: Jun 2006
11-29-2006, 02:11 AM #8

I believe your looking for this:nnhttps://www.dodplugins.net/forums/showthread.php?t=39&highlight=scorennSearch works!nnCheers!

tegu
posted here
Posts: 191
Threads: 11
Joined: Aug 2006
11-29-2006, 10:40 AM #9

YES INDEED!! Thank you Zor! U da man!! :cool: :cool:

Archive › Old Forum Threads › General › Requests for DoD Plugins › dod_goodies4score? 2 nades for a cap.
DoD Plugins Archive · Repository · Old Forum Threads · Maps · Admin · built 14 Sep 2026 00:34 UTC