|
wwA PlayCs
Membru
Membru din: Dum Noi 22, 2015 1:26 pm Mesaje: 301 Localitate: Sibiu
Steam ID: magenkyo17
Skype ID: sound_cstrike
Server Preferat: Respawn.Playcs.ro
|
Descriere: Acest plugin va arata in hud, butoanele(care le apasati [W / A / S / D]) + FPS-ul. Descarcare: Aveti sursa mai jos. Nume: Button checker. Versiune: 0.1 Link oficial: Aici. Sursa:- SMA | Show code
#include < amxmodx > #include < engine > #include < fakemeta >
#pragma semicolon 1
static const PLUGIN_NAME[ ] = "DeathRun - Buttons / FPS"; static const PLUGIN_AUTHOR[ ] = "puMf";
new b_Button[ 33 ]; new tFramesPer[ 33 ], tFps[ 33 ], Float:tGameTime[ 33 ], tCurFps[ 33 ];
public plugin_init( ) { register_plugin( PLUGIN_NAME, "0.1", PLUGIN_AUTHOR ); register_forward( FM_PlayerPreThink, "fwPlayerPreThink" ); set_task( 0.1, "hud", _, _, _, "b", _ ); } public fwPlayerPreThink( id ) { if( is_user_connected( id ) ) { tGameTime[ id ] = get_gametime( ); if( tFramesPer[ id ] > tGameTime[ id ] ) { tFps[ id ] += 1; } else { tFramesPer[ id ] += 1; tCurFps[ id ] = tFps[ id ]; tFps[ id ] = 0; } } } public hud( ) { new iP[ 32 ], iN, id; get_players( iP, iN, "c" ); for( new i = 0;i < iN; i++ ) { id = iP[ i ]; b_Button[ id ] = get_user_button( id ); set_hudmessage( 10, 10, 255, 0.46, 0.14, 0, 0.0, 1.0 ); show_hudmessage( id, " ^n^n^n^n^n^n^n^n^n^n^n^n^n^n^n^n^n %s^n^n%s %s %s^n%s %s^n [FPS: %d]", \ b_Button[ id ] & IN_FORWARD ? " W" : " <->", b_Button[ id ] & IN_MOVELEFT ? " A" : " <->", \ b_Button[ id ] & IN_BACK ? " S" : " <->", b_Button[ id ] & IN_MOVERIGHT ? " D" : " <->", b_Button[ id ] & IN_DUCK ? " Duck" : " <->", b_Button[ id ] & IN_JUMP ? " Jump" : " <->", tCurFps[ id ] ); } } Instalare: 1. Fisierul button_checker.sma il puneti in addons/amxmodx/scripting2. Fisierul button_checker.amxx il puneti in addons/amxmodx/plugins3. Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati la urma: 4. Alti pasi necesari... Module necesare (se sterge ; din fata modulului de mai jos; acestea le gasiti in fisierul amxmodx\configs\modules.ini): - Engine ( pentru butoane) - Fakemeta ( pentru FPS)
_________________ ș-am numa vorbe de aur,ingropama-ti in bvlgari!
|