Raised This Month: $ Target: $400
 0% 

help with fixing my fisrt plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
unkkut
Junior Member
Join Date: Apr 2006
Old 04-03-2006 , 19:03   help with fixing my fisrt plugin
Reply With Quote #1

would someone help with this for my first plugin. i already posted it and everything but iwanted to fix a problem with it. the whole point of the plugin was to give a person a deagle with out the trouble of remebering a guns index number but see when i was making the plugin i could change the name of the index number of even make it so that all i had to do was type amx_deagle <authID, name, @team, @all>. the original command is amx_deagle <authID, name, @team, @all> 11 you would have to tpye 11 because of the guns index number and see thats the problem i just want to make it so that i don't have to add the index number will somebody please help and amxx newbie out ?
__________________
kensai and unkkut are currently working on a plugin. ask me or kensai for mor info.
unkkut is offline
Send a message via AIM to unkkut Send a message via MSN to unkkut
Kensai
Veteran Member
Join Date: Aug 2005
Location: San Diego, California
Old 04-03-2006 , 19:24  
Reply With Quote #2

Instead of using the number.

Just register the command with 2 args, without the 11.

Then say,
Code:
give_item(target, "weapon_deagle") give_item(target, "ammo_50ae")
Kensai is offline
Send a message via AIM to Kensai Send a message via MSN to Kensai
unkkut
Junior Member
Join Date: Apr 2006
Old 04-03-2006 , 19:38  
Reply With Quote #3

thanks i will try it out ^^ thanks for all the help kensai
__________________
kensai and unkkut are currently working on a plugin. ask me or kensai for mor info.
unkkut is offline
Send a message via AIM to unkkut Send a message via MSN to unkkut
unkkut
Junior Member
Join Date: Apr 2006
Old 04-03-2006 , 19:45  
Reply With Quote #4

i got rid of the 11 and got rid of that one part with the give_item and when i compiled it
/home/users/amxmodx/tmp3/php5YYmjS.sma(8 : error 029: invalid expression, assumed zero
/home/users/amxmodx/tmp3/php5YYmjS.sma(89) : error 017: undefined symbol "target"
/home/users/amxmodx/tmp3/php5YYmjS.sma(89) : warning 215: expression has no effect
/home/users/amxmodx/tmp3/php5YYmjS.sma(89) : error 001: expected token: ";", but found ")"
/home/users/amxmodx/tmp3/php5YYmjS.sma(89) : error 029: invalid expression, assumed zero
/home/users/amxmodx/tmp3/php5YYmjS.sma(89) : fatal error 107: too many error messages on one line

Compilation aborted.
5 Errors.
Could not locate output file /home/groups/amxmodx/public_html/websc3/php5YYmjS.amx (compile failed).


comes up :\ (oh yeh and if a made a really stupid mistake blame uh... ADHD)
__________________
kensai and unkkut are currently working on a plugin. ask me or kensai for mor info.
unkkut is offline
Send a message via AIM to unkkut Send a message via MSN to unkkut
FatalisDK
Senior Member
Join Date: Mar 2006
Location: bacon
Old 04-03-2006 , 19:56  
Reply With Quote #5

This should work.
You also might wanna give some credit to whoever made the original plugin. O.o
Attached Files
File Type: sma Get Plugin or Get Source (amx_deagle.sma - 714 views - 2.3 KB)
__________________
FatalisDK is offline
unkkut
Junior Member
Join Date: Apr 2006
Old 04-03-2006 , 20:04  
Reply With Quote #6

fatalisDK.... i love you! how did you get it working ? (oh yeah and i will give you credit for helping me even though it wouldn't get approved... unless i add on to it )
__________________
kensai and unkkut are currently working on a plugin. ask me or kensai for mor info.
unkkut is offline
Send a message via AIM to unkkut Send a message via MSN to unkkut
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 16:41.


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