It's for EVM and i'm trying to make it so i can make a target a "God" in every sence of the word... Here Is my code
PHP Code:
/*
Copyright (C) 2007 Eldest_Sith
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <amxmodx>
#include <fun>
public plugin_init()
{
register_plugin("godmode","testing","Eldest_Sith")
register_concmd("amx_god","become_god",ADMIN_KICK,"Transforms the target into a god.")
register_concmd("amx_ungod","quit_god",ADMIN_KICK,"Removes the god abilities from a target.")
}
public become_god(id) {
if (read_argc() == 0) {
console_print(id,"[AMXX] You must specify a mortal")
return PLUGIN_HANDLED
}
new arg[32]
read_argv(1,arg,31)
new tid = cmd_target(id,arg,0)
if (tid == 0) {
console_print(id,"[AMXX] Invalid Mortal ID")
set_user_godmode(id,1)
return PLUGIN_HANDLED
}
return PLUGIN_HANDLED
}
public quit_god(id) {
if (read_argc() == 0) {
console_print(id,"[AMXX] You must specify a mortal")
return PLUGIN_HANDLED
}
new arg[32]
read_argv(1,arg,31)
new tid = cmd_target(id,arg,0)
if (tid == 0) {
console_print(id,"[AMXX] Invalid Mortal ID")
return PLUGIN_HANDLED
set_user_godmode(id,0)
return PLUGIN_HANDLED
}
return PLUGIN_HANDLED
}
I'm also coming up with this error-
PHP Code:
/home/groups/amxmodx/tmp3/textZOX9cJ.sma(36) : error 017: undefined symbol "cmd_target"
/home/groups/amxmodx/tmp3/textZOX9cJ.sma(39) : warning 217: loose indentation
/home/groups/amxmodx/tmp3/textZOX9cJ.sma(42) : warning 217: loose indentation
/home/groups/amxmodx/tmp3/textZOX9cJ.sma(51) : error 017: undefined symbol "cmd_target"
/home/groups/amxmodx/tmp3/textZOX9cJ.sma(55) : warning 225: unreachable code
/home/groups/amxmodx/tmp3/textZOX9cJ.sma(55) : warning 217: loose indentation
/home/groups/amxmodx/tmp3/textZOX9cJ.sma(5

: warning 217: loose indentation
__________________
There are some people who live in a dream world, and there are some who face reality; and then there are those who turn one into the other.
-Douglas Everett