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

Kick user with cl_minmodels 1


Post New Thread Reply   
 
Thread Tools Display Modes
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 09-30-2005 , 19:07  
Reply With Quote #11

Use that code on your server...
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
atomic
Veteran Member
Join Date: Jan 2005
Location: What The Foot?
Old 09-30-2005 , 19:25  
Reply With Quote #12

yes.. it works... no crash
__________________
atomic is offline
atomic
Veteran Member
Join Date: Jan 2005
Location: What The Foot?
Old 09-30-2005 , 19:41  
Reply With Quote #13

uhmm it didnt work anyway...they can still bind a key to cl_minmodels 1 and see molers in like 0.3 sec

please make a plugin that kick players with cl_minmodels 1
__________________
atomic is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 09-30-2005 , 19:53  
Reply With Quote #14

Try changing FRAME to 1 instead and see how it works.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
atomic
Veteran Member
Join Date: Jan 2005
Location: What The Foot?
Old 09-30-2005 , 20:04  
Reply With Quote #15

Code:
 #include <amxmodx> 
 #include <engine> 

 #define FRAME 1 <-----
 new currentFrame[33]; 

 public client_PreThink(id) { 
    if(currentFrame[id] >= FRAME) { 
        client_cmd(id,"cl_minmodels 0"); 
        currentFrame[id] = 0; 
    } 
    currentFrame[id]++; 
 }
caused bad load

Code:
 #include <amxmodx> 
 #include <engine> 

 #define FRAME 30 
 new currentFrame[1]; <----- 

 public client_PreThink(id) { 
    if(currentFrame[id] >= FRAME) { 
        client_cmd(id,"cl_minmodels 0"); 
        currentFrame[id] = 0; 
    } 
    currentFrame[id]++; 
 }
caused ALOT of run time errors in console
__________________
atomic is offline
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 09-30-2005 , 21:11  
Reply With Quote #16

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]++;  }
This one work perfectly fine. I been running it on my server for the past 3 hours without any error.


@ Atomic
new currentFrame[1]; setting that to 1 will making it runtime error probably outofbound error. There a reason why XxAvalanchexX put it at 33 and this #define FRAME 30 as that and not #define FRAME 1.
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 09-30-2005 , 21:42  
Reply With Quote #17

Why not just query_client_cvar every 5 seconds or something?
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 09-30-2005 , 22:04  
Reply With Quote #18

Code:
#include <amxmodx> public client_putinserver(id) {    if(!task_exists(id)) {       set_task(10.0,"minmodels",id);    } } public client_disconnect(id) {    remove_task(id); } public minmodels(id) {    if(!is_user_connected(id)) {       return;    }    query_client_cvar(id,"cl_minmodels","results");    set_task(10.0,"minmodels",id); } public results(id, const cvar[], const value[]) {    if(equali(cvar,"cl_minmodels") && str_to_num(value)) {       server_cmd("kick #%d ^"cl_minmodels 1 is not allowed on this server^"",get_user_userid(id));    } }

If you want to do that, then try this. Only works on 1.60. But they can still tap it on and tap it off in a second or two just to spot out the moles.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 09-30-2005 , 22:08  
Reply With Quote #19

I just tested this and it doesn't make my client overflow. See if this is fast enough for you.

Code:
#include <amxmodx>  #include <engine>  public client_PreThink(id) {     client_cmd(id,"cl_minmodels 0");  }  public client_PostThink(id) {     client_cmd(id,"cl_minmodels 0");  }
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 10-01-2005 , 08:16  
Reply With Quote #20

Quote:
Originally Posted by XxAvalanchexX
Code:
#include <amxmodx> public client_putinserver(id) {    if(!task_exists(id)) {       set_task(10.0,"minmodels",id);    } } public client_disconnect(id) {    remove_task(id); } public minmodels(id) {    if(!is_user_connected(id)) {       return;    }    query_client_cvar(id,"cl_minmodels","results");    set_task(10.0,"minmodels",id); } public results(id, const cvar[], const value[]) {    if(equali(cvar,"cl_minmodels") && str_to_num(value)) {       server_cmd("kick #%d ^"cl_minmodels 1 is not allowed on this server^"",get_user_userid(id));    } }

If you want to do that, then try this. Only works on 1.60. But they can still tap it on and tap it off in a second or two just to spot out the moles.
Well the thing is, with that script they will be kicked if they set it to 1. So if they really want to keep tapping it, they'll just be kicked in 10 seconds anyways.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
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 05:11.


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