Raised This Month: $ Target: $400
 0% 

Temporary Command (DoD 1.3)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Wilson [29th ID]
Veteran Member
Join Date: Nov 2005
Location: London
Old 06-14-2006 , 05:06   Temporary Command (DoD 1.3)
Reply With Quote #1

Hello, I'm trying to create a plugin for Day of Defeat 1.3 that disables player icons while in my server but sets them back to normal when you leave so that it does not happen in other servers.

On the dodplugins.net forum, FURAX44 posted a plugin that would work perfectly, which is listed below. The only problem is it actually edits the client's config.cfg with the command cl_identiconmode 0, and when the client enters any other server even after closing DoD, it is still set to 0. On average I'd say a lot of people don't know the command cl_identiconmode 2 or know they can set it to normal in their options and would simply think their DoD was broken

Code:
// 
// AMX Mod X 1.0 Script 
// 
// Developed by The AMX Mod X DoD Community 
// 
// based on EKS ts_scriptblock 
// Forum thread: http://forums.alliedmods.net/showthread.php?p=64070 


#include <amxmodx> 

new g_BlockCheck[33]    
new g_BlockIcon 

public plugin_init() { 
  register_plugin("BlockIcon","0.0.1","FURAX44") 
  register_cvar("block_icon","1") 
  register_clcmd("block_identiconmode","Used_identiconmode",0,"- Icon Identification is blocked by server") 
} 

public plugin_cfg() 
{ 
  g_BlockIcon = get_cvar_num("block_icon") 
} 

public client_connect(id){ 
  if (g_BlockIcon==1) BlockIconOnClient(id) 
}    

stock BlockIconOnClient(id) 
{ 
   g_BlockCheck[id] = 1 
   client_cmd(id,"cl_identiconmode  0;alias cl_identiconmode block_identiconmode") 
   g_BlockCheck[id] = 0 
} 


public Used_identiconmode(id){ 
   if (g_BlockCheck[id] == 1) return PLUGIN_CONTINUE 
   new Name[32] 
   get_user_name(id,Name,31) 
   server_print("Client %d %s try to change identiconmode",id,Name) 
   return PLUGIN_HANDLED 
}
My question is: is there any way to temporarily set cl_identiconmode to 0? My thoughts were by making the config.cfg read-only and then executing the command, and diamond-optic from dodplugins.net suggested using the "setinfo" feature of DoD. I tried typing in console, in game: setinfo "cl_identiconmode" "0" -- but it did nothing even after reconnection. It shows up in the "setinfo" list, but doesn't actually do anything, as if it is a passive setting that doesn't execute anything.

How can I solve this?
__________________

Day of Defeat AMXX Community

FakeMeta Research . Voice Proximity . Advanced Deploy . Technician
Wilson [29th ID] is offline
Send a message via ICQ to Wilson [29th ID] Send a message via AIM to Wilson [29th ID] Send a message via MSN to Wilson [29th ID] Send a message via Yahoo to Wilson [29th ID]
 



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 08:01.


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