Raised This Month: $ Target: $400
 0% 

Help with this plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Eldest_Sith
Junior Member
Join Date: Apr 2007
Location: A-Town,Texas
Old 04-07-2007 , 19:39   Help with this plugin
Reply With Quote #1

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 017undefined symbol "cmd_target"
/home/groups/amxmodx/tmp3/textZOX9cJ.sma(39) : warning 217loose indentation
/home/groups/amxmodx/tmp3/textZOX9cJ.sma(42) : warning 217loose indentation
/home/groups/amxmodx/tmp3/textZOX9cJ.sma(51) : error 017undefined symbol "cmd_target"
/home/groups/amxmodx/tmp3/textZOX9cJ.sma(55) : warning 225unreachable code
/home/groups/amxmodx/tmp3/textZOX9cJ.sma(55) : warning 217loose 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
Eldest_Sith is offline
Send a message via AIM to Eldest_Sith
 



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 06:34.


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