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

Weapon Money Reward(Similar)


Post New Thread Reply   
 
Thread Tools Display Modes
jay7
Senior Member
Join Date: Jun 2004
Old 09-27-2005 , 19:04  
Reply With Quote #21

this plugin stopped registering respawn money and rewards on the latest version of amxx. can someone look into it?
jay7 is offline
bmann_420
AMX_Super Pooper
Join Date: Jan 2005
Location: [SuperCentral.co]
Old 10-06-2005 , 15:05  
Reply With Quote #22

So no one is bothering with this plubin anymore?
I have everything enalbed for this plugin, amxx 1.60 and I get his error With cstrike enabled.
Code:
L 10/05/2005 - 23:55:49: [AMXX] Displaying debug trace (plugin "weaponmoney.amxx")
L 10/05/2005 - 23:55:49: [AMXX] Run time error 10: native error (native "cs_get_user_money")
L 10/05/2005 - 23:55:49: [AMXX]    [0] weaponmoney.sma::player_death (line 77)
Can anybody help at all?
__________________
bmann_420 is offline
jay7
Senior Member
Join Date: Jun 2004
Old 10-18-2005 , 16:57  
Reply With Quote #23

Quote:
Originally Posted by bmann_420
So no one is bothering with this plubin anymore?
I have everything enalbed for this plugin, amxx 1.60 and I get his error With cstrike enabled.
Code:
L 10/05/2005 - 23:55:49: [AMXX] Displaying debug trace (plugin "weaponmoney.amxx")
L 10/05/2005 - 23:55:49: [AMXX] Run time error 10: native error (native "cs_get_user_money")
L 10/05/2005 - 23:55:49: [AMXX]    [0] weaponmoney.sma::player_death (line 77)
Can anybody help at all?
Yea. Please do.
jay7 is offline
bmann_420
AMX_Super Pooper
Join Date: Jan 2005
Location: [SuperCentral.co]
Old 10-18-2005 , 18:11  
Reply With Quote #24

I paged hawk about it, but i guess he got busy and forgot.
__________________
bmann_420 is offline
jay7
Senior Member
Join Date: Jun 2004
Old 10-19-2005 , 11:01  
Reply With Quote #25

if anybody is going to work on this, please consider adding weapon money for foreign weapons like war3 and superhero powers that arent registered as 1.6 weapons.
jay7 is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 10-19-2005 , 19:26  
Reply With Quote #26

Yeah, I'll try and get this going. I tried a while ago but I didn't see anything wrong with it. Maybe I'll be able to get it this time.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
bmann_420
AMX_Super Pooper
Join Date: Jan 2005
Location: [SuperCentral.co]
Old 10-19-2005 , 20:30  
Reply With Quote #27

Awesome, thankx
__________________
bmann_420 is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 10-23-2005 , 20:58  
Reply With Quote #28

After actually looking at it, I realized there's no problems with it. It just gives the money after the player respawns / goes back to the spawn. If you guys want I can make one that doesn't do this, and instead gives it on the spot.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 10-25-2005 , 17:46  
Reply With Quote #29

Not sure whether this works or not, I sent it to bmann and he never said whether it worked or not (although he said thanks).

Changes:

- No more index out of bounds error
- Gives money on the spot rather than waiting until next round

Code:
/* *      AMXMODX script. *   Weapon Money Reward v0.7 *      by Similar *  This file is provided as is.. *    (no warranties) * * Thanks to Kobri for the great idea ! :) * *  ******************************************************************************* *    *   Ported By KingPin( <a href="mailto:[email protected]">[email protected]</a> ). I take no responsibility *   for this file in any way. Use at your own risk. No warranties of any kind. * *  ******************************************************************************* * *   Version log *   .2 :   Maintained by Similar * *   .3 :   Maintained by KingPin (for now) *      Ported to AMXX * *   .4 :   Added 1.6 weapons *    *   .5 :   Made fully amxx compatible with get_basedir * *   .6 :    Made amxmodx .2 compatible with get_configsdir *           changed directory to /addons/amxmodx/configs/wp/ *           made more room for longer directory names * *       .7 :    Patched by Hawk552 to not give an error, as well as *               give the money on the spot rather than after spawning * * */ #include <amxmodx> #include <amxmisc> #include <cstrike> new hsBonus = 0 new rsBonus = 0 new vmBonus = 0 new pActive = 1 new wpnMoney[27] new plrReward[33] new wpnStr[27][10] = {     "",     "grenade","knife","glock18","deagle","usp",     "p228","fiveseven","m3","xm1014",     "mp5navy","tmp","p90","ump45",     "m4a1","aug","scout","awp","sg550",     "m249","elite","ak47","mac10",     "sg552","g3sg1","galil","famas" } public init(){     hsBonus = get_cvar_num("amx_headshot_bonus")     rsBonus = get_cvar_num("amx_respawn_money")     vmBonus = get_cvar_num("amx_victmoney_bonus")     pActive = get_cvar_num("amx_mreward_active")     new tmp[30]     for (new i = 0; i < 27; i++) {         tmp = "amx_"         add(tmp,30,wpnStr[i])         add(tmp,30,"_kill")         wpnMoney[i] = get_cvar_num(tmp)     }     return PLUGIN_CONTINUE } public player_death() {     if (pActive == 0) return PLUGIN_CONTINUE     new kWeapon[10]     read_data(4,kWeapon,10)     new killer = read_data(1)     new victim = read_data(2)     new hShot = read_data(3)     if (killer != victim && is_user_connected(killer) && is_user_connected(victim)) {         new kMoney = cs_get_user_money(killer)         new vMoney = cs_get_user_money(victim)         kMoney -= 300         cs_set_user_money(killer,kMoney,1)         new vmLost = 0         if (vmBonus > 0) vmLost = (vMoney * vmBonus) / 100         vMoney += (rsBonus - vmLost)         cs_set_user_money(victim,vMoney,1)         kMoney = 0         new mReward = 0         for (new i = 1; i < 27; i++) {             if (equal(kWeapon,wpnStr[i])) {                 mReward = wpnMoney[i]                 i = 26             }         }         new hsReward = 0         new mmsg[20]         if (hShot) {             if (hsBonus > 0) hsReward = (mReward * hsBonus) / 100             kMoney += hsReward         }         if (mReward > 0) kMoney += mReward         if (vmBonus > 0) kMoney += vmBonus         plrReward[killer] += kMoney         format(mmsg,30,"Kill: +$%i^nTotal: %i",kMoney,plrReward[killer])         set_hudmessage(100,230,0,0.80,0.65,2,0.02,4.0,0.01,3.0,2)         show_hudmessage(killer,mmsg)         cs_set_user_money(killer,cs_get_user_money(killer)+plrReward[killer],1);         plrReward[killer] = 0;     }     return PLUGIN_CONTINUE } public user_connect(id) {     plrReward[id] = 0     return PLUGIN_CONTINUE } public user_disconnect(id) {     plrReward[id] = 0     return PLUGIN_CONTINUE } public plugin_init() {     register_plugin("WeaponMoney","0.7","Similar")     register_event("DeathMsg","player_death","be")     register_cvar("amx_mreward_active","1")  // plugin is active     register_cvar("amx_knife_kill","2500")    // Knife     register_cvar("amx_grenade_kill","1500")    // HE Grenade     register_cvar("amx_glock18_kill","1250")    // Glock 18     register_cvar("amx_deagle_kill","1000")  // IMI Desert Eagle     register_cvar("amx_usp_kill","1000")        // Hechkler & Koch USP45     register_cvar("amx_p228_kill","950")        // Sig Sauer P-228     register_cvar("amx_fiveseven_kill","1200")  // Fabrique Nationale Five-Seven     register_cvar("amx_m3_kill","750")    // Benelli M3 Super 90     register_cvar("amx_xm1014_kill","750")    // Benelli XM1014     register_cvar("amx_mp5navy_kill","750")  // Heckler & Koch MP5/Navy     register_cvar("amx_tmp_kill","700")  // Steyr Tactical Mashine Pistol     register_cvar("amx_p90_kill","680")  // Fabrique Nationale P90     register_cvar("amx_ump45_kill","680")      // Heckler & Koch UMP45     register_cvar("amx_m4a1_kill","550")        // Colt M4A1     register_cvar("amx_aug_kill","500")  // Steyr AUG     register_cvar("amx_scout_kill","320")      // Steyr Scout     register_cvar("amx_awp_kill","150")  // Accuracy Int. Arctic Warfare/Magnum(AWM)     register_cvar("amx_sg550_kill","450")      // Sig SG550 Commando     register_cvar("amx_m249_kill","500")        // FN M249 Para     register_cvar("amx_elite_kill","900")      // Dual Beretta 96G Elites      register_cvar("amx_ak47_kill","500")        // aAutomat Kalashnikov AK47     register_cvar("amx_galil_kill","700")      // Galil     register_cvar("amx_famas_kill","800")      // Famas     register_cvar("amx_mac10_kill","600")      // Ingram MAC10     register_cvar("amx_sg552_kill","500")      // Sig SG-552 Commando     register_cvar("amx_g3sg1_kill","400")      // Heckler & Koch G3/SG-1     register_cvar("amx_headshot_bonus","50")    // as percent of money reward     register_cvar("amx_victmoney_bonus","10")   // as percent of victim money     register_cvar("amx_respawn_money","1000")   // + money when player respawn     new configsDir[84]     get_configsdir(configsDir, 83)     server_cmd("exec %s/wp/weaponmoney.cfg", configsDir)     set_task(1.0,"init",7512,"",0,"a") }
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
bmann_420
AMX_Super Pooper
Join Date: Jan 2005
Location: [SuperCentral.co]
Old 10-25-2005 , 20:48  
Reply With Quote #30

Sorry Hawk, im not in the server that much anymore with college eatin at my ass. But i will actually see now and get you back. And yes of course a thankx, especailly for the crazy votes, thats wonderfull, people need some fun in teh game.
__________________
bmann_420 is offline
Reply


Thread Tools
Display Modes

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 21:50.


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