Raised This Month: $ Target: $400
 0% 

weapon as items


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
tetsoma
Member
Join Date: May 2006
Location: somewhere in my head
Old 06-10-2006 , 20:49   weapon as items
Reply With Quote #1

im useing 1.7

Code:
#include <amxmodx> #include <amxmisc> #include <engine> #include <tsfun> new PLUGIN[]="WEAPONS" new AUTHOR[]="Siddhartha" new VERSION[]="2.00" public plugin_init() {      register_plugin(PLUGIN, VERSION, AUTHOR)      register_srvcmd("item_gun","item_gun") } public item_gun(id) {     new arg[32], arg2[32], arg3[32], wepid, ammo, spwnflg     read_argv(1,arg,31)     read_argv(2,arg2,31)     read_argv(3,arg3,31)        wepid = str_to_num(arg)     ammo = str_to_num(arg2)     spwnflg = str_to_num(arg3)         if(wepid == 0) {         return PLUGIN_HANDLED     }     ts_giveweapon (id,wepid,ammo,spwnflg)     return PLUGIN_HANDLED }

it compiles yes but then i try and use the item in the game it gives me

run time error 10: native error (native "ts_giveweapon")
[0] weaponasitems.sma: :item_gun ( line 32 )
__________________


Tetsoma's RP
http://thespecialistsrp.com
i_hate_iburg
tetsoma is offline
Send a message via AIM to tetsoma Send a message via Yahoo to tetsoma
Drak
Veteran Member
Join Date: Jul 2005
Old 06-10-2006 , 21:30  
Reply With Quote #2

Try compiling it without "#include <tsxaddon>"
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
tetsoma
Member
Join Date: May 2006
Location: somewhere in my head
Old 06-10-2006 , 21:34  
Reply With Quote #3

same thing happened
__________________


Tetsoma's RP
http://thespecialistsrp.com
i_hate_iburg
tetsoma is offline
Send a message via AIM to tetsoma Send a message via Yahoo to tetsoma
Drak
Veteran Member
Join Date: Jul 2005
Old 06-10-2006 , 21:36  
Reply With Quote #4

Are you trying to get the weapon ID out of the SQL DB?
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
tetsoma
Member
Join Date: May 2006
Location: somewhere in my head
Old 06-10-2006 , 21:37  
Reply With Quote #5

yes

like item_gun <id> "21" "88" "21"
__________________


Tetsoma's RP
http://thespecialistsrp.com
i_hate_iburg
tetsoma is offline
Send a message via AIM to tetsoma Send a message via Yahoo to tetsoma
tetsoma
Member
Join Date: May 2006
Location: somewhere in my head
Old 06-11-2006 , 15:07  
Reply With Quote #6

ok so no one can fix this
__________________


Tetsoma's RP
http://thespecialistsrp.com
i_hate_iburg
tetsoma is offline
Send a message via AIM to tetsoma Send a message via Yahoo to tetsoma
wonsae
Senior Member
Join Date: Jan 2006
Location: Behind you >:D
Old 06-11-2006 , 15:25  
Reply With Quote #7

You don't need all those includes...
wonsae is offline
tetsoma
Member
Join Date: May 2006
Location: somewhere in my head
Old 06-11-2006 , 15:34  
Reply With Quote #8

i took out the useless ones and its still giving me those errors
__________________


Tetsoma's RP
http://thespecialistsrp.com
i_hate_iburg
tetsoma is offline
Send a message via AIM to tetsoma Send a message via Yahoo to tetsoma
wonsae
Senior Member
Join Date: Jan 2006
Location: Behind you >:D
Old 06-11-2006 , 15:44  
Reply With Quote #9

I never said it was going to fix it, I just said it's dumb to have all those if you don't even need half of them
wonsae is offline
Charr
Senior Member
Join Date: Jul 2005
Location: Long Island, New York, U
Old 06-11-2006 , 18:05  
Reply With Quote #10

You passed id through item_gun's header, which it is not used. You need to re-do which args are being used.
__________________
Charr is offline
Send a message via AIM to Charr Send a message via MSN to Charr
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 08:05.


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