PDA

View Full Version : unlimited bazooka/pschrek ammo


[SOL] Psycho
05-04-2008, 12:38 PM
Does anyone have a simple plugin for unlimited ammo for zook classes? I am try running some of my maps zook/pschrek only but run out of ammo untill you die.

I found thishttp://www.dodplugins.net/forums/showthread.php?t=1044&highlight=unlinited+ammo
But cant get Wilson's script to compile, I tried as he suggested with the includes. Also found some other suggestions but they seem to complicated for what I am trying to accomplish.
Thanks in advance

diamond-optic
05-04-2008, 08:50 PM
try this

#include <amxmodx>
#include <dodx>
#include <dodfun>

#define VERSION "1.0"
#define SVERSION "v1.0 - by diamond-optic (www.AvaMods.com)"

new p_plugin

public plugin_init()
{
register_plugin("DoD Rocket Ammo",VERSION,"AMXX DoD Team")
register_cvar("dod_rocketammo_stats",SVERSION,FCVAR_SERVER|FCVAR_SPONLY)

p_plugin = register_cvar("dod_rocketammo","1")

//Temp fix for spawning
register_message(get_user_msgid("PStatus"),"msg_PStatus")
}

public msg_PStatus(msgid,msgdest,id)
{
new player = get_msg_arg_int(1)
new status = get_msg_arg_int(2)

if(is_user_connected(player) && status == 0)
set_task(Float:0.5,"spawn_forward",player)
}

public spawn_forward(id)
{
if(get_pcvar_num(p_plugin) && is_user_connected(id) && is_user_alive(id))
{
new class = dod_get_user_class(id)

if(class == DODC_PIAT || class == DODC_BAZOOKA || class == DODC_PANZERJAGER)
{
new zGun = dod_get_user_weapon(id)

dod_set_user_ammo(id,zGun,999)
}
}
}

cvar dod_rocketammo enables/disables the plugin

[SOL] Psycho
05-04-2008, 09:10 PM
Thank you d-o, Compiled and installed. Exactly what I was looking for.