Raised This Month: $ Target: $400
 0% 

amx_SLAM!


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
DarlD
Senior Member
Join Date: Aug 2004
Old 12-26-2005 , 19:35   amx_SLAM!
Reply With Quote #1

okay, i've created a plugin (more like an amxx addon) called amx_SLAM!


Code:
#include <amxmodx> #include <amxmisc> #include <fun> new s_name[32],s_target[32],s_name2[32],s_times[101],arg[32], arg1[32],arg2[32],s_damage public plugin_init() {     register_plugin("amx_SLAM!", "1.0", "DarlD")     register_clcmd("SLAM!","func_slam",ADMIN_SLAY,"SLAM! <Target> <Damage> <Times>") } public func_slam(id, level, cid) {         get_user_name(id,s_name,31)         if (!cmd_access(id, level, cid, 2))         return PLUGIN_HANDLED         s_target = cmd_target(id,arg,5)         get_user_name(s_target,s_name2,31)         read_argv(2,arg1,31)     read_argv(3,arg2,31)         slam(s_target,arg1,arg2)         client_print(id ,print_console,"[AMXX] %s used SLAM! on %s",s_name,s_name2)     client_print(0, print_chat,"[AMXX] %s used SLAM! on %s",s_name,s_name2)         log_amx("ADMIN %s used SLAM! cmd on %s",s_name,s_name2)         return PLUGIN_CONTINUE } public slam(s_target,arg1,arg2) {         new origin[3],old_origin[3];new i = 0         get_user_origin(s_target, old_origin, 0)     get_user_origin(s_target, origin, 0)         if (old_origin[2] == origin[2])         return PLUGIN_CONTINUE             origin[2] = origin[2] + 50         set_user_origin(s_target, origin)         s_damage = read_argv(2, arg1, 31)     s_times = read_argv(3,arg2,31)         user_slap(s_target, s_damage, 1)         for (i < s_times; i++)         return PLUGIN_CONTINUE     }

i get these errors when i compile:

Code:

/home/users/amxmodx/tmp3/phpg7aoed.sma(19 -- 21) : error 033: array must be indexed (variable "s_target")
/home/users/amxmodx/tmp3/phpg7aoed.sma(21) : error 035: argument type mismatch (argument 1)
/home/users/amxmodx/tmp3/phpg7aoed.sma(26) : error 035: argument type mismatch (argument 1)
/home/users/amxmodx/tmp3/phpg7aoed.sma(50) : error 035: argument type mismatch (argument 2)
/home/users/amxmodx/tmp3/phpg7aoed.sma(51) : error 035: argument type mismatch (argument 2)
/home/users/amxmodx/tmp3/phpg7aoed.sma(51 -- 53) : error 033: array must be indexed (variable "s_times")
/home/users/amxmodx/tmp3/phpg7aoed.sma(55) : error 033: array must be indexed (variable "s_times")
/home/users/amxmodx/tmp3/phpg7aoed.sma(59) : warning 209: function "slam" should return a value
__________________
DarlD is offline
Send a message via MSN to DarlD
 



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 15:59.


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