Unlimited nades plugin
Hello! First of all, I don't know if this should be in the scripting forum or here, just move it if I placed it wrong. Ok, to the point.
I'm looking for a plugin where everyone on the server gets unlimited nades, the best would be if they are like if you got 2 (you can throw one then throw another directly, wont need to switch to it again.) I've tried v3x's(?) plugin and ConnorMcLeod's plugins, but those are not what I'm looking for. v3x's plugin didn't really work as it should, because I couldn't give the unlimited ammo to others so they got unlimited nades, and ConnorMcLeod's didn't support nades at all.
So if anyone got a plugin like that or knows how to make such a plugin I would be really really thankful.
Thanks in advance!
#include
#include
#include
#include
new const VERSION[] = "0.0.1"
#define ammo_flashbang 11
#define ammo_smokegrenade 13
#define XTRA_OFS_PLAYER 5
#define m_rgpPlayerItems_0 376
#define AmmoX_AmmoID 1
#define AmmoX_Ammount 2
public plugin_init()
{
register_plugin("Infinite Nades", VERSION, "ConnorMcLeod")
RegisterHam(Ham_Spawn, "player", "Ham_CBasePlayer_Spawn_Post", 1)
register_message(get_user_msgid("AmmoX"), "Message_AmmoX")
}
public Ham_CBasePlayer_Spawn_Post(id)
{
if( is_user_alive(id) )
{
give_item(id, "weapon_hegrenade")
give_item(id, "weapon_flashbang")
give_item(id, "weapon_smokegrenade")
}
}
public Message_AmmoX(iMsgId, iMsgDest, id)
{
if( is_user_alive(id)
&& get_msg_arg_int(AmmoX_Ammount) > 0 )
{
new iAmmoID = get_msg_arg_int(AmmoX_AmmoID)
if( ammo_flashbang <= iAmmoID <= ammo_smokegrenade )
{
set_msg_arg_int(AmmoX_Ammount, ARG_BYTE, 2)
set_pdata_int(id, m_rgpPlayerItems_0 + iAmmoID, 2, XTRA_OFS_PLAYER)
}
}
}Thanks! :D
Please log in to post replies.