Raised This Month: $51 Target: $400
 12% 

[NEW] Developer script


Post New Thread Reply   
 
Thread Tools Display Modes
armasi
Member
Join Date: Apr 2009
Location: Lithuania
Old 09-27-2009 , 15:07   Re: [NEW] Developer script
Reply With Quote #61

This plugin don't work please fix...
armasi is offline
Send a message via Skype™ to armasi
keitHy
Member
Join Date: Aug 2009
Old 08-03-2010 , 09:54   Re: [NEW] Developer script
Reply With Quote #62

Cool, where can I get developer script, lol?
__________________
--ALERT-- NO SIGNATURE! --ALERT--
keitHy is offline
minimiller
Veteran Member
Join Date: Aug 2007
Location: United Kingdom
Old 08-03-2010 , 10:55   Re: [NEW] Developer script
Reply With Quote #63

dude this was years ago
__________________
minimiller is offline
Send a message via MSN to minimiller
petyrkpetrov
Junior Member
Join Date: Jan 2017
Old 05-22-2017 , 20:06   Re: [NEW] Developer script
Reply With Quote #64

Quote:
Originally Posted by ConnorMcLeod View Post
I just want to say that if i put this in userconfig.cfg, your plugin won't effect me at all :

developer 1
alias developer ""

So, what you have to do is use query_client_cvar 1 time to check value and block it to 0, query it a second time to see if you have succeed in setting it to 0.
If the value is still not 0, that means that the player has blocked it before he joined, then you have no other way than kicking him.

See a method :
PHP Code:
/*    Copyright © 2008, ConnorMcLeod

    Check Kz Players Cvars is free software;
    you can redistribute it and/or modify it under the terms of the
    GNU General Public License as published by the Free Software Foundation.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Check Rates; if not, write to the
    Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.
*/

#include <amxmodx>

#define PLUGIN "Check Kz Players Cvars"
#define AUTHOR "ConnorMcLeod"
#define VERSION "0.1.3"

#define _LOG

#define SVC_DISCONNECT    2

#define NULL_FLOAT        0.000000
#define MAX_FPSMAX        101.0
#define MAX_SPEED        400.0
new const g_szCvars[][] =           {"developer""fps_max" "fps_modem""cl_sidespeed""cl_forwardspeed""cl_backspeed"}
new const 
Float:g_flCvarsValues[] = {NULL_FLOAT MAX_FPSMAX,  NULL_FLOAT,   MAX_SPEED   ,     MAX_SPEED    ,   MAX_SPEED   }

new 
g_iCvarNum

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_dictionary("kzcvars.txt")
    
g_iCvarNum sizeof(g_szCvars)
}

public 
client_putinserver(id)
{
    
set_task(0.1"FirstCheck"id)
}

public 
FirstCheck(id)
{
    for(new 
ii<g_iCvarNumi++)
    {
        
CheckClientCvar(idg_szCvars[i])
    }
}

public 
Recheck(parm[])
{
    new 
id parm[0]
    if( 
is_user_connected(id) )
    {
        
CheckClientCvar(idg_szCvars[parm[1]], 1)
    }
}

CheckClientCvar(id, const szCvar[], iSecondCheck=0)
{
    static 
recheck[1]
    
recheck[0] = iSecondCheck
    query_client_cvar
(idszCvar"ClientCvarResult"1recheck)
}

public 
ClientCvarResult(id, const szCvar[], const szValue[], const recheck[])
{
    
#if defined _LOG
        
static const szLogFile[] = "KzPlayersCvars.log"
    
#endif
    
if( equal(szValue"Bad CVAR request") )
    {
        
#if defined _LOG
            
log_to_file(szLogFile"%s is not a (catchable) client cvar"szCvar)
        
#endif
        
return
    }
    
    for(new 
ii<g_iCvarNumi++)
    {
        if( 
equal(szCvarg_szCvars[i]) )
        {
            new 
Float:flMaxVal g_flCvarsValues[i]
            if( 
str_to_float(szValue) != flMaxVal )
            {
                if( 
recheck[0] )
                {
                    
#if defined _LOG
                        
new szName[32], szAuthid[20]
                        
get_user_name(idszName31)
                        
get_user_authid(idszAuthid19)
                        
log_to_file(szLogFile"<%s><%s><%s><%s>"szNameszAuthidszCvarszValue)
                    
#endif
                    
new szReason[128]
                    
formatex(szReason127"%L"id"KZCVAR_KICK_REASON"szCvarszValueflMaxValszCvar)
                    
kick_user(idszReason)
                }
                else
                {
                    
client_cmd(id"%s %.0f;alias %s"szCvarflMaxValszCvar)
                    new 
parms[2]
                    
parms[0] = id
                    parms
[1] = i
                    set_task
(0.1"Recheck"id+(32*i), parms2)
                }
            }
            else if( !
recheck[0] )
            {
                
client_cmd(id";alias %s"szCvar)
            }
            break
        }
    }
}

kick_user(id, const szKickMsg[])
{
    
emessage_begin(MSG_ONESVC_DISCONNECT_id// oranguntanz
    
ewrite_string(szKickMsg)
    
emessage_end()

@ConnorMcLeod,

This is a perfect plugin, but 1 error happens on non-steamers (
Host_Error: UserMsg: Not Present on Client 5), because of query_client_cvar, which is 53 line of the plugin: query_client_cvar(id, szCvar, "ClientCvarResult", 1, recheck)

Btw, i fixed my problem with this: https://forums.alliedmods.net/showthread.php?t=170020
__________________

Last edited by petyrkpetrov; 05-22-2017 at 20:27.
petyrkpetrov is offline
Send a message via Skype™ to petyrkpetrov
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 05-22-2017 , 20:29   Re: [NEW] Developer script
Reply With Quote #65

no steam no support btw this thread from 2010
__________________
D3XT3R is offline
Send a message via Skype™ to D3XT3R
DjSoftero
Veteran Member
Join Date: Nov 2014
Location: Lithuania
Old 05-23-2017 , 13:20   Re: [NEW] Developer script
Reply With Quote #66

Quote:
Originally Posted by D3XT3R View Post
no steam no support btw this thread from 2010
you are srsly stupid af. you run non-steam servers yourself, steal plugins and shi* and still write "no steam no support" to others
DjSoftero is offline
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 05-23-2017 , 15:48   Re: [NEW] Developer script
Reply With Quote #67

good point but im steamer and im free to run nonsteam servers but i dont req any thing hier for them and we all know if i run a steam server wil be no players mean no people buy privilage and mean no money earned
__________________
D3XT3R is offline
Send a message via Skype™ to D3XT3R
DjSoftero
Veteran Member
Join Date: Nov 2014
Location: Lithuania
Old 05-24-2017 , 09:12   Re: [NEW] Developer script
Reply With Quote #68

when you were writing requests in here about some code help, it was same thing. You were requesting help for your non-steam server.
DjSoftero is offline
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 05-25-2017 , 08:01   Re: [NEW] Developer script
Reply With Quote #69

Quote:
Originally Posted by DjSoftero View Post
when you were writing requests in here about some code help, it was same thing. You were requesting help for your non-steam server.
correct but idk
__________________
D3XT3R is offline
Send a message via Skype™ to D3XT3R
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 20:22.


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