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
Rainbow How can i add my private server in unranked? Geded12 5 8,749 06-21-2025, 08:34
Last Post: Akash12
  [Release] Windows 8.1 Fix for MW3 Server Addon master131 16 27,968 09-29-2014, 23:08
Last Post: SuperNovaAO
Brick [Release] MW3 Server Administration Addon iRoNinja 5 9,731 11-10-2013, 15:46
Last Post: Casper
Exclamation Help cmdlist, dvarlist server crash Nerus 17 13,793 11-09-2013, 23:54
Last Post: Nerus
Wink Plugin with !ban !kick and !tampban clemi555 3 5,609 11-09-2013, 09:21
Last Post: clemi555
  AntiNoScope Plugin clemi555 5 6,450 11-08-2013, 19:13
Last Post: clemi555
  Our Level Fastfile is Different from the Server. CheeseToast 6 14,109 11-03-2013, 17:52
Last Post: CheeseToast
  Dedicated Server External (public) IP Nerus 3 8,428 11-02-2013, 14:16
Last Post: Casper
  [Release] Bunker Plugin 1.3 archit 68 49,041 10-30-2013, 11:59
Last Post: clacki
  MW3 Server Version superg1973 7 15,929 10-28-2013, 01:15
Last Post: kotyra972

Forum Jump:


Users browsing this thread:
1 Guest(s)

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