AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help with this plugin (https://forums.alliedmods.net/showthread.php?t=53627)

Eldest_Sith 04-07-2007 19:39

Help with this plugin
 
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(58) : warning 217: loose indentation

Nican 04-07-2007 19:53

Re: Help with this plugin
 
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



Eldest_Sith 04-07-2007 22:56

Re: Help with this plugin
 
Well it helped to a point, but now that I got that working (most of the time), How can i get inf ki?

Nican 04-07-2007 22:59

Re: Help with this plugin
 
Huh?
Can you rephrase that?

Eldest_Sith 04-08-2007 22:46

Re: Help with this plugin
 
well how can i make it so i have inf pl?

Drak 04-09-2007 00:14

Re: Help with this plugin
 
What the hell is "inf pl"

Eldest_Sith 04-09-2007 17:56

Re: Help with this plugin
 
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


All times are GMT -4. The time now is 06:34.

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