Raised This Month: $ Target: $400
 0% 

Plugin thinks i'm bot


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 03-05-2010 , 04:00   Plugin thinks i'm bot
Reply With Quote #1

Hi, i'm working on a xp mod by using fxfighters tutorial.
And for some reason my rank won't upgrade at lvl 10.
After a long hard search i used client_print to find the error.
Now the plugin thinks i'm a bot??
I was killing a bot and playing on a listen server.

here's the deathmsg,
PHP Code:
public PlayerDeath(id ,attacker
{
    
    new 
attacker read_data(1);
    new 
headshot read_data(3);
    new 
clipammoweapon get_user_weapon(attackerclipammo);

    
    
playerxp[attacker] += get_pcvar_num(xp_kill);

    if(
headshot)
        
playerxp[attacker] += get_pcvar_num(xp_hs);

    if(
weapon == CSW_KNIFE)
        
playerxp[attacker] += get_pcvar_num(xp_knife);
            
    while(
playerxp[attacker] >= LEVELS[playerlevel[attacker]]) 
    {
        
playerlevel[attacker] += 1;
        
client_print(attackerprint_chat"Congratulations! You are a level %i %s!",playerlevel[attacker], RANKS[playerrank[attacker]]);
    }
    
    if(
playerlevel[attacker] == 10
    {
        if(!
is_user_connected(attacker))
        {
            
client_print(0print_chat"Not Connected")
        }
            
        if(!
is_user_bot(attacker))
        {
            
client_print(0print_chat"i'm a bot.")
        }
        
client_print(0print_chat"lvl check works.")
        
updaterank(id)
    }
    
showhud(attacker);
    
savedata(attacker);

__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
DarkGod
SourceMod DarkCrab
Join Date: Jul 2007
Location: Sweden
Old 03-05-2010 , 04:12   Re: Plugin thinks i'm bot
Reply With Quote #2

if(!is_user_bot(attacker))
{
client_print(0, print_chat, "i'm a bot.")
}

! = not

Meaning that you're checking if user is not a bot.
__________________
DarkGod is offline
Send a message via AIM to DarkGod Send a message via MSN to DarkGod
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 03-05-2010 , 04:53   Re: Plugin thinks i'm bot
Reply With Quote #3

Ow, missed that one, tnx and sorry
I'm so used to writing that.
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
lazarev
Veteran Member
Join Date: Sep 2008
Old 03-05-2010 , 05:58   Re: Plugin thinks i'm bot
Reply With Quote #4

btw you have posted in the frong section ^^
lazarev is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 03-05-2010 , 06:05   Re: Plugin thinks i'm bot
Reply With Quote #5

ow sorry, did'nt get much sleep this night.
hard to concentrate.

If admin sees this, you may delete this thread
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
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 08:37.


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