AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Unstoppable Plugin Help (https://forums.alliedmods.net/showthread.php?t=28211)

SweatyBanana 05-09-2006 17:21

Unstoppable Plugin Help
 
Hey all...Just started putting this together...Can someone help me with this??

What I need added:
  • Unlimited Ammo 4 all guns
    No reload
    Unlimited nades

Code:
#include <amxmodx>   #include <amxmisc>   #include <fun>   #include <engine> #include <cstrike> #define PLUGIN "Unstopable"   #define VERSION "1.0"   #define AUTHOR "SweatyBanana" public plugin_init()   {       register_plugin(PLUGIN, VERSION, AUTHOR)           register_clcmd("amx_unstoppable", "cmd_unstop")     register_clcmd("amx_stopme", "cmd_stop") } public cmd_unstop(id, level, cid) {     if (!cmd_access(id, level, cid, 1))             return PLUGIN_HANDLED                 set_user_footsteps (id, 1)     cs_set_user_armor (id, 500, CsArmorType:2)     set_user_health(id, 500)     set_user_gravity (id, 0.25)     set_user_maxspeed (id, -2.0)     set_user_rendering(id,kRenderFxNone,0,0,0,kRenderTransAdd,0) }

Hawk552 05-09-2006 18:34

It appears you are already very far.

If I were you, I'd go look up the plugins that are capable of this and then simply integrate them into your plugin.

SweatyBanana 05-09-2006 18:39

OK...I just wasnt sure what to do cause I looked at v3x's plugin..it confused me lol.

nightscreem 05-09-2006 18:45

it's to late to code something but i'll give you a tip
use the CurWeapon event to get weaponid & ammo
and if ammo = 1 you can set that he get max ammo again
just thinking because i don't know the no reload, you can look in the hero punisher maybe i hope this will help you a little further

sry but didn't want to code

SweatyBanana 05-09-2006 19:20

OK...Ill do that in a few mins, but can someone help me with this??

Code:

/home/users/amxmodx/tmp3/phpjh9jqs.sma(29) : warning 209: function "cmd_unstop" should return a value
/home/users/amxmodx/tmp3/phpjh9jqs.sma(42) : warning 209: function "cmd_stop" should return a value

Code:
#include <amxmodx> #include <amxmisc> #include <fun> #include <cstrike> #define PLUGIN "Unstopable" #define VERSION "1.0" #define AUTHOR "SweatyBanana" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         register_clcmd("amx_unstoppable", "cmd_unstop")     register_clcmd("amx_stopme", "cmd_stop") } public cmd_unstop(id, level, cid) {     if (!cmd_access(id, level, cid, 1))     //Check if they have the required admin to do it.              return PLUGIN_HANDLED                 set_user_footsteps (id, 1)                  //Set Silent footsteps     cs_set_user_armor (id, 500, CsArmorType:2)              //500AP helm&vest armor.     set_user_health(id, 500)                    //Set 500 HP     set_user_gravity (id, 0.25)                     //Set gravity to 200     set_user_maxspeed (id, -2.0)                    //Set maxspeed to fast     set_user_rendering(id,kRenderFxNone,0,0,0,kRenderTransAdd,0)    //Set Invisible } public cmd_stop(id, level, cid) {     if (!cmd_access(id, level, cid, 1))     //Check if they have the required admin to do it.          return PLUGIN_HANDLED                     set_user_footsteps (id, 0)                  //Set regular footsteps     cs_set_user_armor (id, 100, CsArmorType:2)          // Set regular armor     set_user_health(id, 100)                    // Set regular health     set_user_gravity (id, 1.0)                  //Set 800 gravity     set_user_maxspeed (id, 0.0)                     //Set regular speed     set_user_rendering(id,kRenderFxNone,0,0,0,kRenderNormal,25)     //Set Visible }

Hawk552 05-09-2006 19:38

Add a return at the end. Preferably PLUGIN_HANDLED.

SweatyBanana 05-09-2006 19:41

Stupid me...thx...+karma.

VEN 05-10-2006 03:25

Unlimited ammo and no reload can be accomplished with setting weapon's entity ammo i.e. cs_set_weapon_ammo.

I posted code+comments in scripting help before, use it to get the idea.

SweatyBanana 05-10-2006 07:26

Thx...I might add it...but v3x moved my plugin to unaproved...


All times are GMT -4. The time now is 05:01.

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