kenc0d3r | Date: Sunday, 02 Nov 2014, 2:41 PM | Message # 3 |
New Member
Group: Member
Messages: 10
Status: Offline
| Ini bang.. Oh iya, setelah pasang nih plugin layar ane malah kedip-kedip. Tolong bantu koreksi juga itu bang. Itu udah ane edit dikit [dikitnya pake banget] dari source asliya, mungkin masih sangat berantakan bagi siapa aja yang liat [malu2 ane].. Tapi paling tidak saya sudah mengupayakan agar paradigma para mas [TER]tentang pendatang baru di forum hanya bisa minta.
Code #include <amxmodx> #include <fakemeta> #include <hamsandwich> #include <acg>
#define TGA_Weapon 4 #define TGA_Player 5 #define TGA_Ammo 6 #define TGA_NewView 7 #define TEXT_HP_AC 1 #define TEXT_Ammo 2
new g_second=59,g_minute,Float:g_time,g_endround
new const msa_wpn[][]={"ak47","aug","awp","c4","deagle","elite","famas","fiveseven","flashbang","g3sg1","galil","glock18","hegrenade","knife","m3","m4a1","m249", "mac10","mp5","p90","p228","scout","sg550","sg552","smokegrenade","tmp","ump45","usp","xm1014"} new const msa_player[][]={"arctic","gign","gsg9","guerilla","leet","sas","terror","urban","vip"} new const msa_ui[][]={"ammo","NewView"}
public plugin_precache() { for(new i;i<sizeof msa_wpn;i++) { new msb_wpn[64] format(msb_wpn,63,"gfx/UI/WPN/%s.tga",msa_wpn[i]) precache_generic(msb_wpn) } for(new i;i<sizeof msa_player;i++) { new msb_player[64] format(msb_player,63,"gfx/UI/player/%s.tga",msa_player[i]) precache_generic(msb_player) } for(new i;i<sizeof msa_ui;i++) { new msb_ui[64] format(msb_ui,63,"gfx/UI/%s.tga",msa_ui[i]) precache_generic(msb_ui) } }
public plugin_init() { register_event("HLTV","Event_HLTV","a","1=0","2=0") register_logevent("logevent_round_end",2,"1=Round_End") g_minute=floatround(get_cvar_float("mp_roundtime"),floatround_tozero)-1 register_forward(FM_PlayerPreThink,"Fm_PlayerPreThink") register_forward(FM_PlayerPostThink,"Fm_PlayerPostThink_Post",1) register_message(get_user_msgid("CurWeapon"),"Message_CurWeapon_AmmoX") register_message(get_user_msgid("AmmoX"),"Message_CurWeapon_AmmoX") register_message(get_user_msgid("Health"),"Message_Health_Battery") register_message(get_user_msgid("Battery"),"Message_Health_Battery") RegisterHam(Ham_Spawn,"player","HAM_Spawn_Post",1) RegisterHam(Ham_Killed,"player","HAM_Killed") }
public Event_HLTV(id) { g_minute=floatround(get_cvar_float("mp_roundtime"),floatround_tozero)-1 g_second=59 g_time=get_gametime() g_endround=false }
public logevent_round_end() { g_endround=true }
public Fm_PlayerPreThink(id) { if(get_gametime()-0.999999>=g_time) { if(g_endround) { g_minute=0 g_second=0 } if(!g_endround) { g_second-- } if(!g_endround&&g_second<0) { g_second=59 g_minute-- } g_time=get_gametime() } static buffer[64] if(g_second<10) { formatex(buffer,charsmax(buffer),"%d:0%d",g_minute,g_second) } if(g_second>=10) { formatex(buffer,charsmax(buffer),"%d:%d",g_minute,g_second) } if(is_user_alive(id)) { set_hudmessage(255,255,255,-1.0,0.94,0,0.0,0.1,0.0,0.0,4) show_hudmessage(id,"%s^n%d",buffer,get_pdata_int(id,115)) } }
public Fm_PlayerPostThink_Post(iPlayer) { if(is_user_alive(iPlayer)) { new viewmodel[64] pev(iPlayer,pev_viewmodel2,viewmodel,charsmax(viewmodel)) replace(viewmodel,63,".mdl",".tga") replace(viewmodel,63,"models/v_","gfx/UI/WPN/") acg_drawtga(iPlayer,viewmodel,255,255,255,255,0.75,0.85,0,FX_FADE,0.0,0.4,0.0,-1.0,0,0,TGA_Weapon) } }
public Message_CurWeapon_AmmoX(msg_id,msg_dest,msg_entity) { if(GetClip(msg_entity)<0) { acg_removedrawnimage(msg_entity,2,TGA_Ammo) acg_removedrawnimage(msg_entity,3,TEXT_Ammo) return } if(is_user_alive(msg_entity)) { new QB_HB[32] formatex(QB_HB,31,"%d/%d",GetClip(msg_entity),GetBpAmmo(msg_entity)) acg_initfont(msg_entity,"",14,1,0,0,TEXT_Ammo) acg_drawtext(msg_entity,0.87,0.967,QB_HB,255,255,255,255,0.0,0.0,-1.0,1,TS_BORDER,0,0,TEXT_Ammo) acg_drawtga(msg_entity,"gfx/UI/ammo.tga",255,255,255,255,0.75,0.92,0,FX_FADE,0.0,0.0,0.0,-1.0,0,0,TGA_Ammo) } }
public Message_Health_Battery(msg_id,msg_dest,msg_entity) { if(is_user_alive(msg_entity)) { new HP_AC[32] formatex(HP_AC,31,"%d^n%d",pev(msg_entity,pev_armorvalue),pev(msg_entity,pev_health)) acg_initfont(msg_entity,"",14,1,0,0,TEXT_HP_AC) acg_drawtext(msg_entity,0.15,0.962,HP_AC,255,255,255,255,0.0,0.0,-1.0,1,TS_BORDER,0,0,TEXT_HP_AC) } }
public HAM_Spawn_Post(id) { if(is_user_alive(id)) { new model[64] fm_cs_get_user_model(id,model,charsmax(model)) new name[64] format(name,63,"gfx/UI/player/%s.tga",model) acg_drawtga(id,name,255,255,255,255,0.0,0.85,0,FX_FADE,0.0,0.4,0.0,-1.0,0,0,TGA_Player) acg_drawtga(id,"gfx/UI/NewView.tga",255,255,255,255,0.1,0.1,0,FX_FADE_INTERVAL,0.0,0.0,0.0,-1.0,1,1,TGA_NewView) } }
public HAM_Killed(victim,attacker,shouldgib) { acg_removedrawnimage(victim,2,TGA_Weapon) acg_removedrawnimage(victim,2,TGA_Player) acg_removedrawnimage(victim,2,TGA_Ammo) acg_removedrawnimage(victim,2,TGA_NewView) acg_removedrawnimage(victim,3,TEXT_HP_AC) acg_removedrawnimage(victim,3,TEXT_Ammo) }
stock fm_cs_get_user_model(player,model[],len) { get_user_info(player,"model",model,len) }
stock GetClip(iPlayer) { new iEntity=get_pdata_cbase(iPlayer,373) if(iEntity<=0) return-1 return get_pdata_int(iEntity,51,4) }
stock GetBpAmmo(iPlayer) { new iEntity=get_pdata_cbase(iPlayer,373) if(iEntity<=0) return-1 return get_pdata_int(iPlayer,376+get_pdata_int(iEntity,49,4),4) }
|
|
| |
DavidJr | Date: Sunday, 02 Nov 2014, 3:01 PM | Message # 4 |
CEO
Group: Executive Team
Messages: 471
Status: Offline
| Coba ini drubah jadi:
Code register_forward(FM_PlayerPostThink,"Fm_PlayerPostThink_Post",1)
->
Code register_event("CurWeapon","Event_CurWeapon", "b")
Dan
Code public Fm_PlayerPostThink_Post(iPlayer) { if(is_user_alive(iPlayer)) { new viewmodel[64] pev(iPlayer,pev_viewmodel2,viewmodel,charsmax(viewmodel)) replace(viewmodel,63,".mdl",".tga") replace(viewmodel,63,"models/v_","gfx/UI/WPN/") acg_drawtga(iPlayer,viewmodel,255,255,255,255,0.75,0.85,0,FX_FADE,0.0,0.4,0.0,-1.0,0,0,TGA_Weapon) } }
->
Code public Event_CurWeapon(iIndex) { if (!is_user_alive(iIndex)) return; new viewmodel[64] pev(iIndex,pev_viewmodel2,viewmodel,charsmax(viewmodel)) replace(viewmodel,63,".mdl",".tga") replace(viewmodel,63,"models/v_","gfx/UI/WPN/") acg_drawtga(iIndex,viewmodel,255,255,255,255,0.75,0.85,0,FX_FADE,0.0,0.4,0.0,-1.0,0,0,TGA_Weapon) }
Auto Aim Bot Detector: http://youtu.be/NiKY0rG7cNg
|
|
| |