Raised This Month: $ Target: $400
 0% 

Player Out Of Range


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
shine771
Senior Member
Join Date: Jun 2007
Old 06-10-2007 , 15:49   Re: Player Out Of Range
Reply With Quote #4

Ok i fixed that...
Now i can't slay anything

Code:
] amx_slayer T
Usage:  amx_slayer  <@CT @T @ALL>
] amx_slayer CT
Usage:  amx_slayer  <@CT @T @ALL>
] amx_slayer @ALL
Usage:  amx_slayer  <@CT @
Nothing happens
Here's my code:
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>

#define PLUGIN "Team Slayer"
#define VERSION "1.0"
#define AUTHOR "Sh!nE*"

new slayed_tslayed_ctslayed_all

new g_max_players

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_concmd("amx_slayer""slay_cmd"ADMIN_SLAY" <@CT @T @ALL>")
    
g_max_players get_maxplayers()
    
}

public 
slay_cmd(idlevelcid)
{
    if( 
id || id g_max_players)
    return 
PLUGIN_CONTINUE

    
if (!cmd_access(idlevelcid3))
        return 
PLUGIN_HANDLED
    
    
new Arg1[5]
    
    
read_argv(1Arg14)
    
    if (
Arg1[0] == '@')
    {
        new 
Team 0
        
if (equali(Arg1[1], "CT"))
        {
            
Team 2
        

        else if (
equali(Arg1[1], "T"))
        {
            
Team 1
        
}
        else if (
equali(Arg1[1], "ALL"))
        {
            
Team 3
            
new players[32], num
            get_players
(playersnum)
            new 
i
            
for (i=0i<numi++)
            {
                if (
Team == 1)
                {
                    
slayed_t 1
                    check_slay
(id)
                }
                else if(
Team == 2)
                {
                    
slayed_ct 1
                    check_slay
(id)
                }
                else if(
Team == 3)
                {
                    
slayed_all 1
                    check_slay
(id)
                }
            }
        }
    }
    return 
PLUGIN_HANDLED
}

public 
check_slay(id)
{    
    new 
CsTeams:team cs_get_user_team(id)
    
    if(
slayed_t == 1)
    {
        if(
team == CS_TEAM_T)
        {
            
user_slap(id99990)
            
slayed_t 0
            
return PLUGIN_CONTINUE
        
}
    }
    
    if(
slayed_ct == 1)
    {
        if(
team == CS_TEAM_CT)
        {
            
user_slap(id99990)
            
slayed_ct 0
            
return PLUGIN_CONTINUE
        
}
    }
    
    if(
slayed_all == 1)
    {
        
user_slap(id99990)
        
slayed_all 0
        
return PLUGIN_CONTINUE
    
}
    return 
PLUGIN_CONTINUE

Maybe this is stupid.. but im new.
Can you please help me?
shine771 is offline
 



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


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