Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
C++ Server Plugin API help
#1
Hi there,

I've been creating numerous plugins for my MW3 server, but there is something which i can't seem to figure out.

I'm trying to do an OnSay command so that when somebody says !fovincrease the FOV changes to e.g 80

if anyone can help with an example piece of code it would be appreciated.
Reply

#2
C++ Code
  1. PLUGIN_API_ONSAY
  2. {
  3. string s = Message;
  4. if(s.substr(0, 12) == "!fovincrease")
  5. {
  6. SetClientDvar(Client->ClientNum, "cg_fov \"80\"");
  7. return CHAT_NONE;
  8. }
  9. return CHAT_ALL;
  10. }
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  [Release] Windows 8.1 Fix for MW3 Server Addon master131 16 17,172 09-29-2014, 23:08
Last Post: SuperNovaAO
Brick [Release] MW3 Server Administration Addon iRoNinja 5 8,576 11-10-2013, 15:46
Last Post: Casper
Exclamation Help cmdlist, dvarlist server crash Nerus 17 11,042 11-09-2013, 23:54
Last Post: Nerus
Wink Plugin with !ban !kick and !tampban clemi555 3 3,913 11-09-2013, 09:21
Last Post: clemi555
  AntiNoScope Plugin clemi555 5 4,385 11-08-2013, 19:13
Last Post: clemi555
  Our Level Fastfile is Different from the Server. CheeseToast 6 10,619 11-03-2013, 17:52
Last Post: CheeseToast
  Dedicated Server External (public) IP Nerus 3 5,604 11-02-2013, 14:16
Last Post: Casper
  [Release] Bunker Plugin 1.3 archit 68 38,589 10-30-2013, 11:59
Last Post: clacki
  MW3 Server Version superg1973 7 12,130 10-28-2013, 01:15
Last Post: kotyra972
  Help Modifying plugin maverigh 5 5,290 10-19-2013, 10:29
Last Post: Nekochan

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.