AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Logo contol (https://forums.alliedmods.net/showthread.php?t=206890)

Kard1nal 01-27-2013 03:44

Logo contol
 
So, I've done:

Code:

public plugin_init()
register_clcmd("impulse 201", "decalset")

public decalset(id){
        if(g_DecalStarted && get_user_team(id) == 1)
        return HAM_SUPERCEDE //now spays should be prohibited

        return PLUGIN_CONTINUE
        }

I need to prohibit sprays, but users still can to make it.
Which "return" I should use?

Sorry for my English.

YamiKaitou 01-27-2013 04:02

Re: Logo contol
 
HAM_SUPERCEDE should only be used on Ham forwards. Try PLUGIN_HANDLED, but I doubt it will work in your case either.

michal123 01-27-2013 04:33

Re: Logo contol
 
If you want block spray, use register_impulse or http://forums.alliedmods.net/showpos...6&postcount=12
Look in this topic: http://forums.alliedmods.net/showthread.php?t=77765

Kard1nal 01-27-2013 04:49

Re: Logo contol
 
I've done like in that topic says, but now no one can spray logo (I need to block T team only).

Code:

public Player_ImpulseCommands(id)
{
    if(pev(id, pev_impulse) == 201 && g_DecalStarted && get_user_team(id) == 1)
    {
        set_pev(id, pev_impulse, 0)
        return HAM_HANDLED
    }
    return HAM_IGNORED
}



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

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