Raised This Month: $32 Target: $400
 8% 

[Plugin Help] - *Unlimited Nades*


Post New Thread Reply   
 
Thread Tools Display Modes
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 09-29-2011 , 01:04   Re: [Plugin Help] - *Unlimited Nades*
Reply With Quote #11

Ops, replace cmd_target with cmd_access
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
forid786
BANNED
Join Date: May 2011
Location: U.K
Old 10-01-2011 , 07:50   Re: [Plugin Help] - *Unlimited Nades*
Reply With Quote #12

I seem to be not able to Compile the plugin can you compile it for me then post it here ConnorMcLeod
forid786 is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 10-01-2011 , 08:22   Re: [Plugin Help] - *Unlimited Nades*
Reply With Quote #13

Quote:
Originally Posted by forid786 View Post
I seem to be not able to Compile the plugin can you compile it for me then post it here ConnorMcLeod
Amxmodx's webcompiler.

www.amxmodx.org
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
forid786
BANNED
Join Date: May 2011
Location: U.K
Old 10-02-2011 , 19:19   Re: [Plugin Help] - *Unlimited Nades*
Reply With Quote #14

Quote:
Originally Posted by Napoleon_be View Post
Amxmodx's webcompiler.

www.amxmodx.org

yep i've tried the web one and the program one but get an error can you please compile it for me and post it here
thanks
forid786 is offline
enjoi.
Veteran Member
Join Date: Mar 2011
Old 10-02-2011 , 19:24   Re: [Plugin Help] - *Unlimited Nades*
Reply With Quote #15

compile it locally or whats the error when you compile.
__________________
Block Maker v6.0 []
Point Slay v3.0 []
Contact [ PM ]
enjoi. is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 10-02-2011 , 19:27   Re: [Plugin Help] - *Unlimited Nades*
Reply With Quote #16

Yeah we cant help you unless you give the error that the compiler is telling you.
Doc-Holiday is offline
e12harry
Member
Join Date: Apr 2010
Old 10-03-2011 , 02:57   Re: [Plugin Help] - *Unlimited Nades*
Reply With Quote #17

I have modiffied your plugin a bit
It compiles, but don't know if it works
If you like it please check spelling of console messages.
(Only players with ADMIN_KICK flag can use amx_nade and amx_unnade commands):

PHP Code:
//////////////////////////////////////////
//Unlimited Nades                       //
//Ported By Sp4rt4n                     //
//Ported March 16, 2005                 //
//This code may not be used or copied   //
//without Sp4rt4n's personal permission.//
//////////////////////////////////////////

//Origionally coded by Freecode.
//The fun module is required.
//This plugin allows an admin to give someone, a whole team, or everyone unlimited nades.
//
//Commands:
//amx_nade <name/id/@CT/@TERRORIST/*(all)> 
//amx_unnade <name/id/@CT/@TERRORIST/*(all)>


#include <amxmodx>
#include <amxmisc>
#include <fun>
//-------------------------------------------------------------------

#define TASK_NADE_TEAM 1
#define TASK_NADE_ALL 5
#define TASK_NADE_USER 6

public givenade(idlevelcid)
{
    if(!
cmd_access(idlevelcid2)) 
    {
        return 
PLUGIN_HANDLED;
    }
    new 
arg[32];
    
read_argv(1arg31) ;
    
    if(
arg[0] == '@')
    { 
        new 
team 0;
        if(
equali(arg"@CT"))
            
team 1;
        else if ( 
equali(arg"@TERRORIST") || equali(arg"@T"))
            
team 2;
            
        if(
team
        {
            if(!
task_exists(TASK_NADE_TEAM team))
            {
                
set_task(0.2,"nadet",TASK_NADE_TEAM+team,_,_,"b");
                
console_print(id"%s Team will get unlimited nades in a sec.."arg);
            } 
            else
            {
                
console_print(id"%s Team already have unlimited nades."arg);
            }
        } 
        else 
        {
            
console_print(id"Incorrect team %s"arg);
        }
    }
    else if(
arg[0] == '*')
    {
        if(!
task_exists(TASK_NADE_ALL))
        {
            
set_task(0.2,"nadeall",TASK_NADE_ALL,_,_,"b");
            
console_print(id,"Everyone will get unlimited nades in a sec..");
        }
        else 
        {
            
console_print(id,"Everyone already has unlimited nades.");
        }
    }
    else
    {
        new 
uid cmd_target(idarg0
        if(!
uid)  
        {
            return 
PLUGIN_HANDLED;
        }
        new 
name[32];
        
get_user_name(uidnamecharsmax(name));
        if(!
task_exists(TASK_NADE_USER uid))
        {
            
set_task(0.2,"nade",TASK_NADE_USER uid,_,_,"b");
            
console_print(id,"%s will get unlimited nades in a sec..",name);
        }
        else
        {
            
console_print(id,"%s already have unlimited nades.",name);
        }
    } 
    return 
PLUGIN_HANDLED ;
}
//-------------------------------------------------------------------
public unnade(idlevelcid)
{
    if(!
cmd_access(idlevelcid2)) 
    {
        return 
PLUGIN_HANDLED;
    }
    new 
arg[32];
    
read_argv(1arg31) ;
    
    if(
arg[0] == '@')
    { 
        new 
team 0;
        if(
equali(arg"@CT"))
            
team 1;
        else if ( 
equali(arg"@TERRORIST") || equali(arg"@T"))
            
team 2;
            
        if(
team
        {
            if(
task_exists(TASK_NADE_TEAM team))
            {
                
remove_task(TASK_NADE_TEAM team);
                
console_print(id"%s Team stoped getting unlimited nades."arg);
            } 
            else
            {
                
console_print(id"%s Team doesn't have unlimited nades."arg);
            }
        } 
        else 
        {
            
console_print(id"Incorrect team %s"arg);
        }
    }
    else if(
arg[0] == '*')
    {
        if(
task_exists(TASK_NADE_ALL))
        {
            
remove_task(TASK_NADE_ALL);
            
console_print(id,"Everyone stoped getting unlimited nades.");
        }
        else 
        {
            
console_print(id,"Everyone hasn't got unlimited nades.");
        }
    }
    else
    {
        new 
uid cmd_target(idarg0
        if(!
uid)  
        {
            return 
PLUGIN_HANDLED;
        }
        new 
name[32];
        
get_user_name(uidnamecharsmax(name));
        if(
task_exists(TASK_NADE_USER uid))
        {
            
remove_task(TASK_NADE_USER uid);
            
console_print(id,"%s stoped getting unlimited nades.",name);
        }
        else
        {
            
console_print(id,"%s do not have unlimited nades.",name);
        }
    } 
    return 
PLUGIN_HANDLED 
}
//-------------------------------------------------------------------
public nadeall()
{
    new 
players[32], inumplayer;
    
get_players(players,inum"a");

    for(new 
a=0;a<inum;++a)
    {  
        
player players[a];
        if(!
user_has_weapon(playerCSW_HEGRENADE))
            
give_item(players[a],"weapon_hegrenade");
        if(!
user_has_weapon(playerCSW_SMOKEGRENADE))
            
give_item(players[a],"weapon_smokegrenade");
        if(!
user_has_weapon(playerCSW_FLASHBANG))
            
give_item(players[a],"weapon_flashbang");
    }
    return 
PLUGIN_HANDLED;
}
//-------------------------------------------------------------------
public nade(taskId)
{
    new 
player taskId TASK_NADE_USER;
    if(
is_user_alive(player))
    {
        if(!
user_has_weapon(playerCSW_HEGRENADE))
            
give_item(player,"weapon_hegrenade");
        if(!
user_has_weapon(playerCSW_SMOKEGRENADE))
            
give_item(player,"weapon_smokegrenade");
        if(!
user_has_weapon(playerCSW_FLASHBANG))
            
give_item(player,"weapon_flashbang");
    }
}
//-------------------------------------------------------------------
public nadet(taskId)
{
    new 
team taskId TASK_NADE_TEAM;
    
    new 
players[32], inumplayer;
    
get_players(players,inum"ae", (team==1?"CT":"TERRORIST"));

    for(new 
a=0;a<inum;++a)
    {  
        
player players[a];
        if(!
user_has_weapon(playerCSW_HEGRENADE))
            
give_item(player,"weapon_hegrenade");
        if(!
user_has_weapon(playerCSW_SMOKEGRENADE))
            
give_item(player,"weapon_smokegrenade");
        if(!
user_has_weapon(playerCSW_FLASHBANG))
            
give_item(player,"weapon_flashbang");
    }
    return 
PLUGIN_HANDLED;
}
//-------------------------------------------------------------------
public plugin_init()
{
    
register_plugin("Unlimited Nades","1.0","Sp4rt4n");
    
register_clcmd("amx_nade","givenade",ADMIN_KICK,"<name/@TEAM/*(all)>");
    
register_clcmd("amx_unnade","unnade",ADMIN_KICK,"<name/@TEAM/*(all)>");


Last edited by e12harry; 10-03-2011 at 03:44.
e12harry is offline
forid786
BANNED
Join Date: May 2011
Location: U.K
Old 10-04-2011 , 12:48   Re: [Plugin Help] - *Unlimited Nades*
Reply With Quote #18

Can you make it so that only admins with the H flag can use it


Thanks for you're help il test the one with admin kick flag now
forid786 is offline
forid786
BANNED
Join Date: May 2011
Location: U.K
Old 10-04-2011 , 12:58   Re: [Plugin Help] - *Unlimited Nades*
Reply With Quote #19

E12 harry i've tested it but it has 2 problems

when i chuck a grenade it takes time for another one to come i want it to come instantly like the original and also when you chuck a grenade it changes to a gun or another weapon i want it to stay at the grenande you chucked and also can you make it access flag H

Thanks
forid786 is offline
Fatality1andonly
Junior Member
Join Date: Jul 2011
Location: Serbia
Old 10-04-2011 , 13:03   Re: [Plugin Help] - *Unlimited Nades*
Reply With Quote #20

i compiled it fine.do you want to I upload it to Megaupload?

Last edited by Fatality1andonly; 10-04-2011 at 13:09. Reason: changing of thinking
Fatality1andonly is offline
Send a message via MSN to Fatality1andonly Send a message via Skype™ to Fatality1andonly
Reply


Thread Tools
Display Modes

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 03:10.


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