Raised This Month: $ Target: $400
 0% 

NS Admin Weapons [Help Needed]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
XunTric
BANNED
Join Date: Jan 2005
Location: Norway/Norge
Old 10-14-2005 , 13:48  
Reply With Quote #1

But its wrong weapon names...
But ill still try.
XunTric is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 10-14-2005 , 13:52  
Reply With Quote #2

Quote:
Originally Posted by funcwiki
Weapon Constants

enum {
WEAPON_NONE = 0,
WEAPON_CLAWS,
WEAPON_SPIT,
WEAPON_SPORES,
WEAPON_SPIKE,
WEAPON_BITE,
WEAPON_BITE2,
WEAPON_SWIPE,
WEAPON_WEBSPINNER,
WEAPON_METABOLIZE,
WEAPON_PARASITE,
WEAPON_BLINK,
WEAPON_DIVINEWIND,
WEAPON_KNIFE,
WEAPON_PISTOL,
WEAPON_LMG,
WEAPON_SHOTGUN,
WEAPON_HMG,
WEAPON_WELDER,
WEAPON_MINE,
WEAPON_GRENADE_GUN,
WEAPON_LEAP,
WEAPON_CHARGE,
WEAPON_UMBRA,
WEAPON_PRIMALSCREAM,
WEAPON_BILEBOMB,
WEAPON_ACIDROCKET,
WEAPON_HEALINGSPRAY,
WEAPON_GRENADE,
WEAPON_STOMP,
WEAPON_DEVOUR,
WEAPON_MAX
}
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
XunTric
BANNED
Join Date: Jan 2005
Location: Norway/Norge
Old 10-14-2005 , 13:56  
Reply With Quote #3

Quote:
Originally Posted by XunTric
You know what?
I saw in one of my other old ns plugins which gives jetpack and heavy armor, that you have to use normall "weapon_" names...
Like:
Code:
ns_give_item(id, "weapon_heavymachinegun")
instead of
Code:
ns_give_item(id, WEAPON_HMG)

But where can I find all those names?
Did you even read that post?

Well, as I thought, it didnt work.

I noticed another small problem too.
"amx_weapon list" needs 2 args...

"amx_weapon list" - wont work
"amx_weapon list omfglol" - works
XunTric is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 10-14-2005 , 14:00  
Reply With Quote #4

Quote:
Originally Posted by XunTric
Quote:
Originally Posted by XunTric
You know what?
I saw in one of my other old ns plugins which gives jetpack and heavy armor, that you have to use normall "weapon_" names...
Like:
Code:
ns_give_item(id, "weapon_heavymachinegun")
instead of
Code:
ns_give_item(id, WEAPON_HMG)

But where can I find all those names?
Did you even read that post?

Well, as I thought, it didnt work.

I noticed another small problem too.
"amx_weapon list" needs 2 args...

"amx_weapon list" - wont work
"amx_weapon list omfglol" - works
Of course it only works with 2 args

Code:
if(!cmd_access(id, level, cid, 3))           return PLUGIN_HANDLED

makes sure of that
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
XunTric
BANNED
Join Date: Jan 2005
Location: Norway/Norge
Old 10-14-2005 , 14:02  
Reply With Quote #5

Oh, I thought that was to protect non admins for all args.
Well I supose it has to be 1 then?
XunTric is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 10-14-2005 , 16:58  
Reply With Quote #6

How about this:

Code:
new arg[32]; // get player read_argv(1,arg,31); new player = cmd_target(id,arg); if(!player)    return PLUGIN_HANDLED; // get weapon read_argv(2,arg,31); new weapon[48]; format(weapon,47,"weapon_%s",arg); give_item(player,weapon); return PLUGIN_HANDLED;

?
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
XunTric
BANNED
Join Date: Jan 2005
Location: Norway/Norge
Old 10-14-2005 , 19:47  
Reply With Quote #7

Some weapon names are long and hard.
like "weapon_heavymachinegun"
so then you would have to run "amx_weapon xuntric heavymachinegun"

But the plugin should be working just that I need "weapon_name" instead of WEAPON_NAME.
(Ex: "weapon_heavymachinegun" instead of "WEAPON_HMG")
But I dont know where to get those names...
XunTric is offline
Reply



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 23:38.


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