AndreeA! 8 Posted November 17, 2014 Share Posted November 17, 2014 (edited) Nume : Kill HP Versiune : cea mai noua Descriere detaliata : caut un plugin BUN pt respawn care da hp atunci cand faci frag, la frag normal 30 hp, la HS 50 HP si atunci cand te ia cineva ecranul rosu si cand faci frag ecran verde sau cv de genu p.s doresc ca pluginul sa fie SMA sa il pot personaliza Multumesc anticipat ! Edited November 17, 2014 by Denisa Next suspend 72 de ore daca mai scri colorat Link to comment Share on other sites More sharing options...
LondoN eXtream 110 Posted November 17, 2014 Share Posted November 17, 2014 #include <amxmodx> #include <fun> #define PLUGIN "BonusHp" #define VERSION "1.0" #define AUTHOR "falseq" public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_event( "DeathMsg", "ev_DeathMsg", "a" ); } public ev_DeathMsg( ) { new iKiller = read_data( 1 ); new iVictim = read_data( 2 ); new iHeadshot = read_data( 3 ); if( iKiller != iVictim && is_user_alive( iKiller ) ) { set_user_health( iKiller, get_user_health( iKiller ) + 30 ); } else if(iHeadshot) { set_user_health( iKiller, get_user_health( iKiller ) + 50 ); } } Sper sa iti placa Link to comment Share on other sites More sharing options...
bat 5 Posted November 17, 2014 Share Posted November 17, 2014 Optimizat. #include amxmodx #include fakemeta public plugin_init() register_event("DeathMsg", "deathmsg", "a") public deathmsg(){ static killer,victim,headshot,health killer = read_data(1) victim = read_data(2) headshot = read_data(3) health = pev(killer, pev_health) if(!is_user_alive(killer)) return; if(killer) { fm_set_user_health(killer, health + headshot ? 50 : 30) fm_set_user_screenfade(killer, 2, 0, 0, 0, 255, 0, 100) } if(victim) { fm_set_user_screenfade(victim, 2, 0, 0, 255, 0, 0, 100) } } stock fm_set_user_health(index, health){ (health > 0) ? set_pev(index, pev_health, float(health)) : dllfunc(DLLFunc_ClientKill, index) } stock fm_set_user_screenfade(index, time, hold, type, colorR, colorG, colorB, amount){ message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("ScreenFade"), {0,0,0}, index) write_short(time) write_short(hold) write_short(type) write_byte(colorR) write_byte(colorG) write_byte(colorB) write_byte(amount) message_end() } Link to comment Share on other sites More sharing options...
LondoN eXtream 110 Posted November 17, 2014 Share Posted November 17, 2014 @bat conform .sma-ului tau pluginul este nefunctionabil, si neoptimizat, si doar cateva linii inutile adaugate. Link to comment Share on other sites More sharing options...
bat 5 Posted November 17, 2014 Share Posted November 17, 2014 #include <amxmodx> #include <fun> #define PLUGIN "BonusHp" #define VERSION "1.0" #define AUTHOR "falseq" public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_event( "DeathMsg", "ev_DeathMsg", "a" ); } public ev_DeathMsg( ) { new iKiller = read_data( 1 ); new iVictim = read_data( 2 ); new iHeadshot = read_data( 3 ); if( iKiller != iVictim && is_user_alive( iKiller ) ) { set_user_health( iKiller, get_user_health( iKiller ) + 30 ); } else if(iHeadshot) { set_user_health( iKiller, get_user_health( iKiller ) + 50 ); } } Sper sa iti placa Descriere detaliata : caut un plugin BUN pt respawn care da hp atunci cand faci frag, la frag normal 30 hp, la HS 50 HP si atunci cand te ia cineva ecranul rosu si cand faci frag ecran verde sau cv de genu Optimizat. #include amxmodx #include fakemeta public plugin_init() register_event("DeathMsg", "deathmsg", "a") public deathmsg(){ static killer,victim,headshot,health killer = read_data(1) victim = read_data(2) headshot = read_data(3) health = pev(killer, pev_health) if(!is_user_alive(killer)) return; if(killer) { fm_set_user_health(killer, health + headshot ? 50 : 30) fm_set_user_screenfade(killer, 2, 0, 0, 0, 255, 0, 100) } if(victim) { fm_set_user_screenfade(victim, 2, 0, 0, 255, 0, 0, 100) } } stock fm_set_user_health(index, health){ (health > 0) ? set_pev(index, pev_health, float(health)) : dllfunc(DLLFunc_ClientKill, index) } stock fm_set_user_screenfade(index, time, hold, type, colorR, colorG, colorB, amount){ message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("ScreenFade"), {0,0,0}, index) write_short(time) write_short(hold) write_short(type) write_byte(colorR) write_byte(colorG) write_byte(colorB) write_byte(amount) message_end() } Link to comment Share on other sites More sharing options...
Guest KentHD Posted November 17, 2014 Share Posted November 17, 2014 Data viitoare să le daţi în spoiler ! #include <amxmodx>#include <amxmisc>#include <fun>#include <cstrike>new const PLUGIN[] = "Kill Bonus HP"new const VERSION[] = "2.0"new const AUTHOR[] = "KentHD"new award_hp, award_hp2, hp_MsgSyncpublic plugin_init(){ register_plugin(Kill Bonus HP, 2.0, KentHD) register_event("DeathMsg" , "event_DeathMsg" , "a" , "1>0" , "2>0"); register_cvar("hp_award","1") register_cvar("hp_award_hp","30") // head kill register_cvar("hp_award_hp2","20") // body kill register_cvar("hp_award_show","1") hp_MsgSync = CreateHudSyncObj()} public event_DeathMsg(){ new killer = read_data(1) new clip, ammo, weapon = get_user_weapon(killer,clip,ammo) if(weapon == CSW_KNIFE) { new killerhealth killerhealth = get_user_health(killer) if((killerhealth + 50) > 100) { set_user_health(killer, 100) } else { set_user_health(killer, killerhealth + 50) } } if(!get_cvar_num("hp_award")) return PLUGIN_HANDLED new id = read_data(1) new bool:killhead = bool:read_data(3) new player_hp = get_user_health(id) award_hp = get_cvar_num("hp_award_hp") award_hp2 = get_cvar_num("hp_award_hp2") if((killhead) && (award_hp>0) && (is_user_alive(id))) // head kill { if((player_hp + award_hp) > 100) set_user_health(id , 100) else set_user_health(id , player_hp+award_hp) if(get_cvar_num("hp_award_show")) { set_hudmessage(0, 255, 0, 0.01, 0.90, 0, 0.2, 0.2, 0.025, 0.02, -1) ShowSyncHudMsg(id, hp_MsgSync, "+%i^n", award_hp) } } if((!killhead) && (award_hp2>0) && (is_user_alive(id)))// body kill { if((player_hp + award_hp2) > 100) set_user_health(id , 100) else set_user_health(id , player_hp + award_hp2) if(get_cvar_num("hp_award_show")) { set_hudmessage(0, 255, 0, 0.01, 0.90, 0, 0.2, 0.2, 0.025, 0.02, -1) ShowSyncHudMsg(id, hp_MsgSync, "+%i^n", award_hp2) } } Link to comment Share on other sites More sharing options...
LondoN eXtream 110 Posted November 17, 2014 Share Posted November 17, 2014 (edited) @bat iti lipsesc 2,3 randuri din .sma-ul ala. Poate folosi si CFG_HDE(cred ca asa se numea) ca sa ii faca eracnul rosu. EDIT: register_plugin(Kill Bonus HP, 2.0, KentHD) corect era: register_plugin("PLUGIN","VERSION","AUTHOR") Edited November 17, 2014 by dK^aL3X Link to comment Share on other sites More sharing options...
bat 5 Posted November 17, 2014 Share Posted November 17, 2014 Data viitoare să le daţi în spoiler ! #include <amxmodx> #include <amxmisc> #include <fun> #include <cstrike> new const PLUGIN[] = "Kill Bonus HP" new const VERSION[] = "2.0" new const AUTHOR[] = "KentHD" new award_hp, award_hp2, hp_MsgSync public plugin_init() { register_plugin(Kill Bonus HP, 2.0, KentHD) register_event("DeathMsg" , "event_DeathMsg" , "a" , "1>0" , "2>0"); register_cvar("hp_award","1") register_cvar("hp_award_hp","30") // head kill register_cvar("hp_award_hp2","20") // body kill register_cvar("hp_award_show","1") hp_MsgSync = CreateHudSyncObj() } public event_DeathMsg() { new killer = read_data(1) new clip, ammo, weapon = get_user_weapon(killer,clip,ammo) if(weapon == CSW_KNIFE) { new killerhealth killerhealth = get_user_health(killer) if((killerhealth + 50) > 100) { set_user_health(killer, 100) } else { set_user_health(killer, killerhealth + 50) } } if(!get_cvar_num("hp_award")) return PLUGIN_HANDLED new id = read_data(1) new bool:killhead = bool:read_data(3) new player_hp = get_user_health(id) award_hp = get_cvar_num("hp_award_hp") award_hp2 = get_cvar_num("hp_award_hp2") if((killhead) && (award_hp>0) && (is_user_alive(id))) // head kill { if((player_hp + award_hp) > 100) set_user_health(id , 100) else set_user_health(id , player_hp+award_hp) if(get_cvar_num("hp_award_show")) { set_hudmessage(0, 255, 0, 0.01, 0.90, 0, 0.2, 0.2, 0.025, 0.02, -1) ShowSyncHudMsg(id, hp_MsgSync, "+%i^n", award_hp) } } if((!killhead) && (award_hp2>0) && (is_user_alive(id)))// body kill { if((player_hp + award_hp2) > 100) set_user_health(id , 100) else set_user_health(id , player_hp + award_hp2) if(get_cvar_num("hp_award_show")) { set_hudmessage(0, 255, 0, 0.01, 0.90, 0, 0.2, 0.2, 0.025, 0.02, -1) ShowSyncHudMsg(id, hp_MsgSync, "+%i^n", award_hp2) } } Data viitoare sa nu schimbi numele autorului. Link to comment Share on other sites More sharing options...
bat 5 Posted November 17, 2014 Share Posted November 17, 2014 @bat iti lipsesc 2,3 randuri din .sma-ul ala. Poate folosi si CFG_HDE(cred ca asa se numea) ca sa ii faca eracnul rosu. EDIT: register_plugin(Kill Bonus HP, 2.0, KentHD) corect era: register_plugin("PLUGIN","VERSION","AUTHOR") Fara register plugin, pluginu nu va functiona? (facepalm) Tu daca crezi ca stii pawn, trebuie sa stii ca prin stock definez cum vrei sa fie codul. fm_set_user_screenfade(killer, 2, 0, 0, 0, 255, 0, 100) - Ecran verde. fm_set_user_screenfade(victim, 2, 0, 0, 255, 0, 0, 100) - Ecran rosu. Link to comment Share on other sites More sharing options...
AndreeA! 8 Posted November 17, 2014 Author Share Posted November 17, 2014 Multumesc de ajutor, asta gasisem si eu pe google ! Puteti da Topic Closed ! Link to comment Share on other sites More sharing options...
Recommended Posts