Witam, znalazłem taki plugin (dodałem flagę, działa) mogłby jakiś spec ocenić poprawność kodu bo jakoś inaczej wygląda (tzn. jakieś średniki ja końcu itp.)
#include < amxmodx > #include < hamsandwich > #include < fun > /* ============================================= ============================================ */ // #define MAX_HEALTH_100 new g_iMaxPlayers; /* ============================================= ============================================ */ public plugin_init( ) { RegisterHam( Ham_Killed, "player", "CPlayer__Killed_P", 1 ); g_iMaxPlayers = get_maxplayers( ); } public CPlayer__Killed_P( iVictim, iKiller, iGib ) { if( 1 <= iKiller <= g_iMaxPlayers && is_user_alive( iKiller ) && get_user_flags(iKiller) & ADMIN_LEVEL_C) { #if defined MAX_HEALTH_100 new iHealth = get_user_health( iKiller ); if( iHealth < 100 ) { set_user_health( iKiller, iHealth + 5 >= 100 ? 100 : iHealth + 5 ); } #else set_user_health( iKiller, get_user_health( iKiller ) + 5 ); #endif } } /* ============================================= ============================================ */
Użytkownik sq69i edytował ten post 10.08.2013 19:03