Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Plugin] FPS Client/Server
#1
- Titulli i Temes : [Plugin] FPS Client/Server

[Image: OYIFmcv.png]
-Pershkrimi Ky PLugins Paraqet Qe Sa e Ki FPS E Css Edhe Sa e Ka FPS Serveri

[Image: orQLgii.png]
- Emri: I pluginsit : FPS Client/Server
- Verzioni : 1.0
- Autori : esc-Fiv3
- Editori : ProTeXx;


Code:
#include <amxmodx> #include <fakemeta> #define PLUGIN "FPS" #define VERSION "1.0" #define AUTHOR "esc-Fiv3" new Float:gametime new Float:framesper new show[33] new show2[33] new clientfps[33] new hud new fps new maxplayers public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_clcmd("say /serverfps", "cmd_show") register_clcmd("say /clientfps", "cmd_show2") register_forward(FM_StartFrame, "start_frame") register_forward(FM_PlayerPreThink, "client_think") hud = CreateHudSyncObj() maxplayers = get_maxplayers() return PLUGIN_CONTINUE } public cmd_show(id) { if(!show[id]) { show[id] = 1 } else { show[id] = 0 } return PLUGIN_HANDLED } public cmd_show2(id) { if(!show2[id]) { show2[id] = 1 } else { show2[id] = 0 } return PLUGIN_HANDLED } public client_disconnect(id) { show[id] = 0 show2[id] = 0 return PLUGIN_CONTINUE } public client_think(id) { if(show2[id]) clientfps[id]++ } public start_frame() { gametime = get_gametime() if(framesper >= gametime) { fps++ } else { framesper += 1.0 for(new id = 1; id <= maxplayers; id++) { if(!is_user_connected(id) || (!show[id] && !show2[id])) { continue } set_hudmessage(0, 255, 0, 0.01, 0.29, 0, 1.0, 1.1, 0.1, 0.1, -1) new msg[128], len if(show2[id]) { len = format(msg, charsmax(msg), "Your FPS: %d", clientfps[id]) } if(show[id]) { len += format(msg[len], charsmax(msg) - len, "%sFPS Server: %d", show2[id] ? "^n" : "", fps) } ShowSyncHudMsg(id, hud, msg) clientfps[id] = 1 } fps = 1 } } /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1034\\ f0\\ fs16 \n\\ par } */

[Image: WwyMGHI.png]
- Fpsinfoserver.amxx kët file, e fut atë në addons / amxmodx / plugins / këtu
- Emrin e Files fpsinfoserver.amxx e shkruani brenda tek addons / amxmodx / configs / plugins.ini këtu


[Image: YamMKgu.png]
[Image: fps_x2.jpg]
[Image: client_fps.jpg]
[Image: fps_server.jpg]

[Image: dzysCv0.png]
SHKARKO Ne SendSPaCe
Reply }}}}
Thanks given by:
Thanks given by:
Thanks given by:


Messages In This Thread
[Plugin] FPS Client/Server - by ProTeXx; - 12-20-2024, 07:21 PM
Re: [Plugin] FPS Client/Server - by BR3ACKER - 12-20-2024, 07:22 PM
Re: [Plugin] FPS Client/Server - by ProTeXx; - 12-20-2024, 07:29 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)