12-20-2024, 07:21 PM
- Titulli i Temes : [Plugin] FPS Client/Server
![[Image: OYIFmcv.png]](http://i.imgur.com/OYIFmcv.png)
-Pershkrimi Ky PLugins Paraqet Qe Sa e Ki FPS E Css Edhe Sa e Ka FPS Serveri
![[Image: orQLgii.png]](http://i.imgur.com/orQLgii.png)
- Emri: I pluginsit : FPS Client/Server
- Verzioni : 1.0
- Autori : esc-Fiv3
- Editori : ProTeXx;
![[Image: WwyMGHI.png]](http://i.imgur.com/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]](http://i.imgur.com/YamMKgu.png)
![[Image: fps_x2.jpg]](http://s22.postimg.org/nleo5g5kd/fps_x2.jpg)
![[Image: client_fps.jpg]](http://s24.postimg.org/bm87vebi9/client_fps.jpg)
![[Image: fps_server.jpg]](http://s23.postimg.org/f89ftv57r/fps_server.jpg)
![[Image: dzysCv0.png]](http://i.imgur.com/dzysCv0.png)
SHKARKO Ne SendSPaCe
![[Image: OYIFmcv.png]](http://i.imgur.com/OYIFmcv.png)
-Pershkrimi Ky PLugins Paraqet Qe Sa e Ki FPS E Css Edhe Sa e Ka FPS Serveri
![[Image: orQLgii.png]](http://i.imgur.com/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]](http://i.imgur.com/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]](http://i.imgur.com/YamMKgu.png)
![[Image: fps_x2.jpg]](http://s22.postimg.org/nleo5g5kd/fps_x2.jpg)
![[Image: client_fps.jpg]](http://s24.postimg.org/bm87vebi9/client_fps.jpg)
![[Image: fps_server.jpg]](http://s23.postimg.org/f89ftv57r/fps_server.jpg)
![[Image: dzysCv0.png]](http://i.imgur.com/dzysCv0.png)
SHKARKO Ne SendSPaCe

