AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   problem with if (https://forums.alliedmods.net/showthread.php?t=174200)

lqlqlq 12-16-2011 19:43

problem with if
 
here is the code
Code:

public client_putinserver(id) {
if(!get_pcvar_num(is_it_on) || !is_user_connected(id) || is_user_bot(id))
return PLUGIN_HANDLED
if(!access(id, ADMIN)) {
set_task(1.0, "EnableAntiCheat")

set_task(5.0, "input", id)
}
return PLUGIN_HANDLED
}

When im with nick "vvvv" - the anticheat kick me when not have immunity access, but when i change name and wait 1.0 seconds - anticheat kick me again.
Whats wrong ? How to check name change and recheck if when name is changed.
Thanks!

kramesa 12-16-2011 22:15

Re: problem with if
 
Try:

Change de is_it_on to pCvar_is_it_on

Napoleon_be 12-16-2011 22:24

Re: problem with if
 
Quote:

Originally Posted by kramesa (Post 1614533)
Try:

Change de is_it_on to pCvar_is_it_on

How can you even know how he called his pcvar?

kramesa 12-16-2011 22:37

Re: problem with if
 
Try:

PHP Code:

public client_putinserver(id
{
    if(!
get_pcvar_num(pcvar_is_it_on) || !is_user_connected(id) || is_user_bot(id))
    {
        return 
PLUGIN_HANDLED
    
}
    
    if(!
access(idADMIN)) 
    {
        
set_task(1.0"EnableAntiCheat")
        
        
set_task(5.0"input"id)
    }
    return 
PLUGIN_HANDLED


OBS: Change is_it_on to pcvar_is_it_on

fysiks 12-17-2011 01:32

Re: problem with if
 
Quote:

Originally Posted by kramesa (Post 1614539)
OBS: Change is_it_on to pcvar_is_it_on

That won't change anything.

fysiks 12-17-2011 03:20

Re: problem with if
 
You do realize that that 1) that binding keys is not allowed here and 2) is the WORST "anti-cheat" ever created right?

lqlqlq 12-17-2011 03:26

Re: problem with if
 
Ok, thats is slowhack, but can you realize with menu to "yes" or "no" for choose to players ?
I'm newbie with pawn.
Its simple anticheat :D Im not finished yet, it takes some time to add some checks for cvar and more..

Devil259 12-17-2011 04:29

Re: problem with if
 
Quote:

Originally Posted by lqlqlq (Post 1614490)
How to check name change and recheck if when name is changed.

FM_ClientUserInfoChanged.

fysiks 12-17-2011 15:32

Re: problem with if
 
Quote:

Originally Posted by lqlqlq (Post 1614615)
Its simple anticheat :D

It's not an anticheat at all. Slowhacking is not allowed on these forums regardless of your intentions.

I have every single one of those buttons bound/used for something and I don't cheat. You plugin would "detect" me as a "cheater".


All times are GMT -4. The time now is 20:59.

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