Raised This Month: $ Target: $400
 0% 

Help with this plugin


Post New Thread Reply   
 
Thread Tools Display Modes
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
Nican
Veteran Member
Join Date: Jan 2006
Location: NY
Old 04-07-2007 , 19:53   Re: Help with this plugin
Reply With Quote #2

you forgot to
#include <amxmisc>

i belice you want something like this:
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 <amxmisc>
#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")
    else
        
set_user_godmode(tid,1
 
    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"
    else
        
set_user_godmode(tid,0)
    return 
PLUGIN_HANDLED

__________________
http://www.nican132.com
I require reputation!
Nican is offline
Send a message via ICQ to Nican Send a message via MSN to Nican
Eldest_Sith
Junior Member
Join Date: Apr 2007
Location: A-Town,Texas
Old 04-07-2007 , 22:56   Re: Help with this plugin
Reply With Quote #3

Well it helped to a point, but now that I got that working (most of the time), How can i get inf ki?
__________________
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
Nican
Veteran Member
Join Date: Jan 2006
Location: NY
Old 04-07-2007 , 22:59   Re: Help with this plugin
Reply With Quote #4

Huh?
Can you rephrase that?
__________________
http://www.nican132.com
I require reputation!
Nican is offline
Send a message via ICQ to Nican Send a message via MSN to Nican
Eldest_Sith
Junior Member
Join Date: Apr 2007
Location: A-Town,Texas
Old 04-08-2007 , 22:46   Re: Help with this plugin
Reply With Quote #5

well how can i make it so i have inf pl?
__________________
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
Drak
Veteran Member
Join Date: Jul 2005
Old 04-09-2007 , 00:14   Re: Help with this plugin
Reply With Quote #6

What the hell is "inf pl"
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
Eldest_Sith
Junior Member
Join Date: Apr 2007
Location: A-Town,Texas
Old 04-09-2007 , 17:56   Re: Help with this plugin
Reply With Quote #7

inf power level... it's a plugin for esf (evm)... btw i came up with another problem which i don't know if i can post the question here or not but with this plugin, i can only use the latest version of amx but with that 1 for sum reason i can't transform past ssj... but with the 1 that came with evm i can transform but not use most of my plugins... help plz
[EDIT]
Well i figured out the no farther transformations but now when i do transform it just repeats the animation over and over again forever
__________________
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

Last edited by Eldest_Sith; 04-09-2007 at 22:43. Reason: fixed something
Eldest_Sith is offline
Send a message via AIM to Eldest_Sith
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 06:34.


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