PDA

View Full Version : dod_nadenblade


Garion
09-20-2006, 01:08 AM
Ok, I can't seem to find it here, so I guess ztoolz never posted it on the new forums but does anyone have the sma for the dod_nadenblade plugin?

Wilson [29th ID]
09-20-2006, 02:06 AM
You can do it with Dod Custom Supply (Developers Plugins Section)

TooLz
09-28-2006, 05:39 PM
Okay, I can't seem to find my SMA - but I was the maker of this plugin. Here is the AMXX, I'll post the SMA if I find it soon.

TooLz
09-28-2006, 05:55 PM
ok i've searched my 3 HD's and cannot find it, I only found the amxx because it was on my server. Zor may have it, or diamond-optic.. Not sure, but I'd like to get ahold of it again too because I was going to use it for refrence on another plugin I am thinking about making.

Cya

Garion
09-29-2006, 01:07 AM
ok, if you find it or someone else has it that would be great cuz I still have the amxx on my server just wanted to re compile it when I compile the rest of my plugins into 1.76

diamond-optic
09-29-2006, 09:48 PM
sorry i dont have it :(

Outlawpapa
10-05-2006, 06:27 AM
I have the sma for this plugin pm me and i will pass it along.

Garion
10-05-2006, 02:34 PM
why not just post it if you have it?

Outlawpapa
10-05-2006, 06:46 PM
Sorry for the delay here you go.....


//
// CVARs (for amxx.cfg):
// =====================
//
// amx_nadenblade <1/0> = enable/disable plugin
//
// nnb_nades <amount> = sets amount of grenades to give
//
//
// NOTES:
// ======
//
// - This plugin is based off of the Sniper Blade mod by FireStorm,
// few things were changed for this to be Nade N Blade..

new g_newplayer[33]

#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fun>
#include <dodfun>
#include <dodx>

public plugin_init() {
register_plugin("Nade N Blade","1.0","zH-[zTooLz]")
register_cvar("dod_nadenblade","0")
set_cvar_num("dod_nadenblade",0)
register_concmd("amx_nadenblade","admin_nadenblade",ADMIN_KICK,"<enable/disable NadeNBlade Mode>")
register_event("ResetHUD","respawn","be")
register_event("CurWeapon","check_nadenblade","b","1=1")
register_cvar("nnb_nades","6")
}

public plugin_modules(){
require_module("engine")
require_module("fun")
require_module("dodx")
require_module("dodfun")
}

public client_authorized(id){
g_newplayer[id] = 1
}

public check_nadenblade(id){
if(get_cvar_num("dod_nadenblade") == 0){
return PLUGIN_CONTINUE
}
if(get_cvar_num("dod_nadenblade") == 1){
new ammo, clip, zGun = dod_get_user_weapon(id,clip,ammo)
if(zGun != DODW_AMERKNIFE && zGun != DODW_BRITKNIFE && zGun != DODW_SPADE && zGun != DODW_GERKNIFE && zGun != DODW_STICKGRENADE && zGun != DODW_HANDGRENADE){
set_task(0.1,"give_nadenblade",id)
return PLUGIN_CONTINUE
}
}
return PLUGIN_CONTINUE
}

public admin_nadenblade(id,level,cid){
if (!cmd_access(id,level,cid,2))
return PLUGIN_HANDLED
new nadenblade_s[2]
read_argv(1,nadenblade_s,2)
new nadenblade = str_to_num(nadenblade_s)

if(nadenblade == 1) {
if (get_cvar_num("dod_nadenblade") == 1){
console_print(id,"[AMXX] Nade N Blade Mode is already running.....")
client_print(id,print_chat,"[AMXX] Nade N Blade Mode is already running.....")
}
else if (get_cvar_num("dod_nadenblade") == 0){
set_cvar_num("dod_nadenblade",1)
new plist[32],pnum
get_players(plist, pnum)
for(new i=0; i<pnum; i++){
g_newplayer[plist[i]] = 1
if(is_user_alive(plist[i]) == 1){
dod_user_kill(plist[i])
}
}
set_hudmessage(0, 255, 0, -1.0, -1.0, 0, 6.0, 11.0, 0.1, 0.2, 4)
show_hudmessage(0,"Nade N Blade Mode Enabled!")
console_print(id,"Nade N Blade Mode Enabled!")
client_print(id,print_chat,"[AMXX] Nade N Blade Mode Enabled!")
}
}

else if(nadenblade == 0) {
if (get_cvar_num("dod_nadenblade") == 0){
console_print(id,"[AMXX] Nade N Blade Mode is already disabled.....")
client_print(id,print_chat,"[AMXX] Nade N Blade Mode is already disabled.....")
}
else if (get_cvar_num("dod_nadenblade") == 1){
set_cvar_num("dod_nadenblade",0)
new plist[32],pnum
get_players(plist, pnum)
for(new i=0; i<pnum; i++){
if(is_user_alive(plist[i]) == 1){
dod_user_kill(plist[i])
}
}
set_hudmessage(255, 0, 0, -1.0, -1.0, 0, 6.0, 11.0, 0.1, 0.2, 4)
show_hudmessage(0,"Nade N Blade Mode Disabled!")
console_print(id,"Nade N Blade Mode Disabled!")
client_print(id,print_chat,"[AMXX] Nade N Blade Mode Disabled!")
}
}
return PLUGIN_HANDLED
}

public announce(id){
if(g_newplayer[id] == 1){
set_hudmessage(255, 153, 1, -1.0, -1.0, 0, 6.0, 10.0, 0.1, 0.2, 4)
show_hudmessage(id,"Nade N Blade Mode is Enabled!^nGrenades and blades only!!")
g_newplayer[id] = 0
}
}

public respawn(id){
if (get_cvar_num("dod_nadenblade") == 1){
set_task(0.1,"give_nadenblade",id)
announce(id)
}
return PLUGIN_CONTINUE
}

public give_nadenblade(id){
strip_user_weapons(id)
new ammo, clip, zGun = dod_get_user_weapon(id,clip,ammo)
new zGrenAmmo = get_cvar_num("nnb_nades")
new zWeapon[24]
new zWeapon2[24]
new gunnameA[32] = "spade"
new gunnameB[32] = "gerknife"
new gunnameC[32] = "amerknife"
new gunnameD[32] = "stickgrenade"
new gunnameE[32] = "handgrenade"
if(get_user_team(id) == 2){
if(dod_get_map_info(MI_AXIS_PARAS) == 1){
format(zWeapon,23,"weapon_%s",gunnameB)
format(zWeapon2,23,"weapon_%s",gunnameD)
give_item(id,zWeapon)
give_item(id,zWeapon2)
dod_set_user_ammo(id,DODW_STICKGRENADE,zGrenAmmo)
}
else if(dod_get_map_info(MI_AXIS_PARAS) == 0){
format(zWeapon,23,"weapon_%s",gunnameA)
format(zWeapon2,23,"weapon_%s",gunnameD)
give_item(id,zWeapon)
give_item(id,zWeapon2)
dod_set_user_ammo(id,DODW_STICKGRENADE,zGrenAmmo)
}
}
else if(get_user_team(id) == 1){
if(dod_get_map_info(MI_ALLIES_TEAM) == 1){
format(zWeapon,23,"weapon_%s",gunnameC)
format(zWeapon2,23,"weapon_%s",gunnameE)
give_item(id,zWeapon)
give_item(id,zWeapon2)
dod_set_user_ammo(id,DODW_HANDGRENADE,zGrenAmmo)
}
else if(dod_get_map_info(MI_ALLIES_TEAM) == 0){
format(zWeapon,23,"weapon_%s",gunnameC)
format(zWeapon2,23,"weapon_%s",gunnameE)
give_item(id,zWeapon)
give_item(id,zWeapon2)
dod_set_user_ammo(id,DODW_HANDGRENADE,zGrenAmmo)
}
}
}

Garion
10-06-2006, 02:44 PM
thanks, now i can upgrade my server and compile all plugins again

TooLz
10-06-2006, 10:55 PM
Hey everyone,

I'd like to thank Outlaw for putting that up. Now there is one problem with this mod if anyone can fix it - I can't seem to find out how to allow it to prime nades.. Thats something I'd definently like to be able to do if anyone can try to fix that

Thanks!

Garion
10-07-2006, 12:43 AM
I got some errors compiling this:

//// dod_nadenblade.sma
// E:\AMX1.76\addons\amxmodx\scripting\dod_nadenblade .sma<1> : error 055: start of function body without function header
// E:\AMX1.76\addons\amxmodx\scripting\dod_nadenblade .sma<16> : error 010: invalid function or declaration
// E:\AMX1.76\addons\amxmodx\scripting\dod_nadenblade .sma<17> : error 001: expected toker: ";", but found "\"
// E:\AMX1.76\addons\amxmodx\scripting\dod_nadenblade .sma<19> : error 038: extra characters on line
// E:\AMX1.76\addons\amxmodx\scripting\dod_nadenblade .sma<20> : error 038: extra characters on line
// E:\AMX1.76\addons\amxmodx\scripting\dod_nadenblade .sma<21> : error 038: extra characters on line
// E:\AMX1.76\addons\amxmodx\scripting\dod_nadenblade .sma<22> : error 038: extra characters on line
// E:\AMX1.76\addons\amxmodx\scripting\dod_nadenblade .sma<23> : error 038: extra characters on line
// E:\AMX1.76\addons\amxmodx\scripting\dod_nadenblade .sma<24> : error 038: extra characters on line
// E:\AMX1.76\addons\amxmodx\scripting\dod_nadenblade .sma<25> : error 010: invalid function or declaration
// E:\AMX1.76\addons\amxmodx\scripting\dod_nadenblade .sma<26> : error 029: invalid expression, assumed zero
// E:\AMX1.76\addons\amxmodx\scripting\dod_nadenblade .sma<36> : error 29: invalid expression, assumed zero
// E:\AMX1.76\addons\amxmodx\scripting\dod_nadenblade .sma<43> : error 029: invalid expression, assumed zero
// E:\AMX1.76\addons\amxmodx\scripting\dod_nadenblade .sma<47> : error 029: invalid expression, assumed zero
// E:\AMX1.76\addons\amxmodx\scripting\dod_nadenblade .sma<48> : error 010: invalid function or declaration
// E:\AMX1.76\addons\amxmodx\scripting\dod_nadenblade .sma<49> : error 010: invalid function or declaration
// E:\AMX1.76\addons\amxmodx\scripting\dod_nadenblade .sma<51> : error 010: invalid function or declaration
// E:\AMX1.76\addons\amxmodx\scripting\dod_nadenblade .sma<52> : error 001: expected token: ";", but found "\"
// E:\AMX1.76\addons\amxmodx\scripting\dod_nadenblade .sma<53> : error 010: invalid function or declaration
// E:\AMX1.76\addons\amxmodx\scripting\dod_nadenblade .sma<55> : error 010: invalid function or declaration
// E:\AMX1.76\addons\amxmodx\scripting\dod_nadenblade .sma<58> : error 010: invalid function or declaration
// E:\AMX1.76\addons\amxmodx\scripting\dod_nadenblade .sma<61> : error 029: invalid expression, asummed zero
// E:\AMX1.76\addons\amxmodx\scripting\dod_nadenblade .sma<62> : error 010: invalid function or declaration
// E:\AMX1.76\addons\amxmodx\scripting\dod_nadenblade .sma<63> : error 010: invalid function or declaration
// E:\AMX1.76\addons\amxmodx\scripting\dod_nadenblade .sma<64> : error 001: expected token: ";", but found "\"
// E:\AMX1.76\addons\amxmodx\scripting\dod_nadenblade .sma<66> : error 001: expected token: ";", but found "\"
//
// Compilation aborted.
// 26 Errors.
// Could not locate output file E:\AMX1.76\amxmodx\scripting\compiled\dod_nadenbla de.amx <compile failed>.
//
// Compilation Time: 0.45 sec
// ----------------------------------