AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Kick user with cl_minmodels 1 (https://forums.alliedmods.net/showthread.php?t=18726)

atomic 09-30-2005 11:38

Kick user with cl_minmodels 1
 
ok..i want a plugin that kicks users with cl_minmodels 1

The plugin checks if they have it on connect and every 2 seconds....

please make this..it's easy to make...


ok im a noob and cant script... but i learn

i know this is posted before but i got so confused that i gave up

nightscreem 09-30-2005 13:49

i have no idea if it works

Code:
#include <amxmodx> #include <amxmisc> #define PLUGIN "cl_minmodel disabler" #define VERSION "1.0" #define AUTHOR "Nightscream" new message[255]; public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         register_logevent( "event_roundstart", 2, "0=World triggered", "1=Round_Start" ) } public event_roundstart( id ) {     format( message, 254, "[AMXX] Checking CVAR cl_minmodels" )     client_print( id, print_chat, message );         set_task( 2.0, "clminmodels", id = 0, "", 0, "a", 1 ); }     public clminmodels( id ) {     if ( get_cvar_num( "cl_minmodels" ) == 1 )     {         format( message, 254, "[AMXX] Changing CVAR cl_mindodels to 0" )         client_print( id, print_chat, message );                 client_cmd( id, "cl_minmodels 1" )     } }

atomic 09-30-2005 13:57

it didnt work tho... only the message...

but i want a plugin that doesnt have "any" message on the chat and if a player have minmodels on he/she will be kicked with a reason

"Minmodels not allowed on this server"

atomic 09-30-2005 13:58

and cl_minmodels "1" is the BAD thing... 0 is good

XxAvalanchexX 09-30-2005 14:45

I just tested this and it works perfectly.

Code:
 #include <amxmodx>  #include <engine>  #define FRAME 30  new currentFrame[33];  public client_PreThink(id) {     if(currentFrame[id] >= FRAME) {         client_cmd(id,"cl_minmodels 0");         currentFrame[id] = 0;     }     currentFrame[id]++;  }

atomic 09-30-2005 15:15

w00t w00t + karma for you.. :D

hmm - karma for me :(

nightscreem 09-30-2005 15:18

Quote:

Originally Posted by XxAvalanchexX
I just tested this and it works perfectly.

Code:
 #include <amxmodx>  #include <engine>  #define FRAME 30  new currentFrame[33];  public client_PreThink(id) {     if(currentFrame[id] >= FRAME) {         client_cmd(id,"cl_minmodels 0");         currentFrame[id] = 0;     }     currentFrame[id]++;  }

what does the currentFrame and Frame does and why currentFrame

Xanimos 09-30-2005 15:20

it adds a delay between executions. so every 30 frames it will execute instead of every frame.

XxAvalanchexX 09-30-2005 16:43

Suicide is correct. If you execute every single frame it may overflow the client and cause them to crash.

atomic 09-30-2005 17:18

hmm...so...what do i do now :roll:


All times are GMT -4. The time now is 23:25.

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