Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[HP Hakkında] Cod hp sisteminden
#10
Kırmızı Ekran 10 HPDEN Aşagı olunca çıkar iyi forumlar.


PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>

#define PLUGIN "Hp Kontrol"
#define VERSION "1.0"
#define AUTHOR "K4DavRa"

new sounds[] = "kalpatisi.wav"

#define FFADE_IN        0x0000        
#define FFADE_OUT            0x0001        
#define FFADE_MODULATE        0x0002        
#define FFADE_STAYOUT        0x0004

enum {
    
Red,
    
Green,
    
Blue
};

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
}

public 
client_authorized(id)
{
    
set_task(1.0"Can"id__"b")
}

public 
plugin_precache()
{
    
precache_sound(sounds)    
}

public 
Can(id)
{
    if(
is_user_connected(id) && is_user_alive(id) )
    {
        new 
Hp;
        
Hp get_user_health(id)
        if( 
Hp 100) {
            
client_cmd(id,"spk sound/kalpatisi")
            
set_user_health(id,get_user_health(id) + 1)
        }
        if(
Hp 10) {
            switch(
random_num(1,3))
            {
                case 
1:
                {    
                    
UTIL_ScreenFade(id, {100,0,0}, 0.40.1230FFADE_OUT FFADE_STAYOUTfalse,false)    
                }
                case 
2:
                {
                    
UTIL_ScreenFade(id, {100,0,0}, 0.70.1230FFADE_INfalse,false)    
                }
                case 
3:
                {
                    
UTIL_ScreenFade(id,{100,0,0},1.0,0.2,255,FFADE_IN,false,false)    
                }
            }
        }
    }
}

stock UTIL_ScreenFade(id=0,iColor[3]={0,0,0},Float:flFxTime=-1.0,Float:flHoldTime=0.0,iAlpha=0,iFlags=FFADE_IN,bool:bReliable=false,bool:bExternal=false)
{
if( 
id && !is_user_connected(id))
    return;
    
    new 
iFadeTime;
    if( 
flFxTime == -1.0 )
    {
        
iFadeTime 4;
    }
    else
    {
        
iFadeTime FixedUnsigned16flFxTime 1<<12 );
    }
    
    static 
gmsgScreenFade;
    if( !
gmsgScreenFade )
    {
        
gmsgScreenFade get_user_msgid("ScreenFade");
    }
    
    new 
MSG_DEST;
    if( 
bReliable )
    {
        
MSG_DEST id MSG_ONE MSG_ALL;
    }
    else
    {
        
MSG_DEST id MSG_ONE_UNRELIABLE MSG_BROADCAST;
    }
    
    if( 
bExternal )
    {
        
emessage_beginMSG_DESTgmsgScreenFade_id );
        
ewrite_shortiFadeTime );
        
ewrite_shortFixedUnsigned16flHoldTime 1<<12 ) );
        
ewrite_shortiFlags );
        
ewrite_byteiColor[Red] );
        
ewrite_byteiColor[Green] );
        
ewrite_byteiColor[Blue] );
        
ewrite_byteiAlpha );
        
emessage_end();
    }
    else
    {
        
message_beginMSG_DESTgmsgScreenFade_id );
        
write_shortiFadeTime );
        
write_shortFixedUnsigned16flHoldTime 1<<12 ) );
        
write_shortiFlags );
        
write_byteiColor[Red] );
        
write_byteiColor[Green] );
        
write_byteiColor[Blue] );
        
write_byteiAlpha );
        
message_end();
    }
}
stock FixedUnsigned16(Float:flValueiScale)
{
    new 
iOutput;
    
    
iOutput floatround(flValue iScale);
    
    if ( 
iOutput )
        
iOutput 0;
    
    if ( 
iOutput 0xFFFF )
        
iOutput 0xFFFF;
    
    return 
iOutput;

Reply


Messages In This Thread
Cevap: [HP Hakkında] Cod hp sisteminden - by к4dανяα - 15-10-12, 23:49

Possibly Related Threads…
Thread Author Replies Views Last Post
  ZP Kodları Hakkında Soru Pecko 7 3,312 25-01-14, 20:05
Last Post: Pecko
  Formatex Menu Hakkında balcan2744 11 5,879 15-11-13, 16:39
Last Post: JDM
  [JB] JB Admin Paneli Hakkında Furkan Dize 13 4,762 01-11-12, 02:17
Last Post: DeaTReX
  [ACİL ] Takımlara ayırma hakkında sorun var Furkan Dize 4 3,158 13-10-12, 13:07
Last Post: melof
  AMX_Snapshot plugini hakkında burc ugur 5 2,641 07-09-12, 10:08
Last Post: baros1996
  glow verme hakkında kaybun 11 20,154 24-08-12, 22:39
Last Post: ByGece
  Plugin hakkında sorum olacaktı ? fener067 3 2,380 05-06-12, 12:21
Last Post: TAVUK31
  Frag Hakkında fener067 2 2,836 20-02-12, 20:45
Last Post: fener067
  Plugin hakkında sorum olacaktı ? fener067 2 2,038 03-02-12, 23:46
Last Post: ahmetberkay

Foruma Atla:


Users browsing this thread: 1 Guest(s)