Raised This Month: $ Target: $400
 0% 

Unstoppable Plugin Help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 05-09-2006 , 17:21   Unstoppable Plugin Help
Reply With Quote #1

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) }
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 05-09-2006 , 18:34  
Reply With Quote #2

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.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 05-09-2006 , 18:39  
Reply With Quote #3

OK...I just wasnt sure what to do cause I looked at v3x's plugin..it confused me lol.
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
nightscreem
Veteran Member
Join Date: Jul 2004
Location: Belgium
Old 05-09-2006 , 18:45  
Reply With Quote #4

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
__________________
- Bye bye!
nightscreem is offline
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 05-09-2006 , 19:20  
Reply With Quote #5

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 }
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 05-09-2006 , 19:38  
Reply With Quote #6

Add a return at the end. Preferably PLUGIN_HANDLED.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 05-09-2006 , 19:41  
Reply With Quote #7

Stupid me...thx...+karma.
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
VEN
Veteran Member
Join Date: Jan 2005
Old 05-10-2006 , 03:25  
Reply With Quote #8

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.
VEN is offline
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 05-10-2006 , 07:26  
Reply With Quote #9

Thx...I might add it...but v3x moved my plugin to unaproved...
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
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 05:01.


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