-
Posts
24 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Articles
Posts posted by bat
-
-
Si cu aceste doua ce fac ?
Cu a 2 il compilez sh tsal pui pe server.
-
Se vede cu mult ca addonsu nu a fost facut de tine, dar iti zic pe intelesu' incepatorului, mai scoate din .spr .wav .mdl! Adica Modele/Sunete/Spriteuri!
Nu mai trebu nic s mai scoata bai, doar folosesti un unprecacher (http://rangfort.ro/forum/index.php?/topic/10066-problema-server-jbrangfortro/?p=59450) Pentru ca serverul are un limit, daca utilizezi unprecache serverul nu trimite clientului, modelele,sunetele etc.. care sunt default.
-
failed to precache because the item count is over the 512 limit
>>>Ai trecut de limitu 512 (models,sounds,sprite)
Poate problema e in library, dar eu sfatuesc sa va folositi de unprecacher.
https://forums.alliedmods.net/showthread.php?p=1506103#post1506103
Ori
#include <amxmodx> #include <fakemeta> new const models[][] = { "v_ak47.mdl", "v_aug.mdl", "v_awp.mdl", "v_c4.mdl", "v_deagle.mdl", "v_elite.mdl", "v_famas.mdl", "v_fiveseven.mdl", "v_flashbang.mdl", "v_g3sg1.mdl", "v_galil.mdl", "v_glock18.mdl", "v_hegrenade.mdl", "v_knife.mdl", "v_m3.mdl", "v_m4a1.mdl", "v_m249.mdl", "v_mac10.mdl", "v_mp5.mdl", "v_p90.mdl", "v_p228.mdl", "v_scout.mdl", "v_sg550.mdl", "v_sg552.mdl", "v_smokegrenade.mdl", "v_tmp.mdl", "v_ump45.mdl", "v_usp.mdl", "v_xm1014.mdl", "w_ak47.mdl", "w_assault.mdl", "w_aug.mdl", "w_awp.mdl", "w_backpack.mdl", "w_c4.mdl", "w_deagle.mdl", "w_elite.mdl", "w_famas.mdl", "w_fiveseven.mdl", "w_flashbang.mdl", "w_g3sg1.mdl", "w_galil.mdl", "w_glock18.mdl", "w_hegrenade.mdl", "w_kevlar.mdl", "w_knife.mdl", "w_m3.mdl", "w_m4a1.mdl", "w_m249.mdl", "w_mac10.mdl", "w_mp5.mdl", "w_p90.mdl", "w_p228.mdl", "w_scout.mdl", "w_sg550.mdl", "w_sg552.mdl", "w_shield.mdl", "w_smokegrenade.mdl", "w_thighpack.mdl", "w_tmp.mdl", "w_ump45.mdl", "w_usp.mdl", "w_xm1014.mdl", "pallet_with_bags.mdl", "pallet_with_bags2.mdl", "palmtree.mdl", "PG-150.mdl", "player.mdl", "pred_plant.mdl", "pshell.mdl", "rshell.mdl", "rshell_big.mdl", "bag.mdl", "bigtree.mdl", "bush.mdl", "chick.mdl", "fern.mdl", "grass.mdl", "hostage.mdl", "lv_bottle.mdl" } public plugin_precache() { register_forward(FM_PrecacheModel, "PrecacheModel") } public PrecacheModel(const szModel[]) { for(new i = 0; i < sizeof(models); i++) { if( containi(szModel, models[i]) != -1 ) { forward_return(FMV_CELL, 0) return FMRES_SUPERCEDE } } return FMRES_IGNORED }
-
amxx modules in console. Daca scrie bad load, insamna ca nu sunt modulile, ori nu sunt pentru amx mod x current.
Adauga-ma in skype:mazafaka1202
-
@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. -
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.
-
#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() }
-
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() }
-
/* AMXMODX Plugin By AL3X MC */ #include <amxmodx> #include <amxmisc> #define MAX_GROUPS 10 new g_groupNames[MAX_GROUPS] [] = { "- = = [ DetinaToR ] = = -", "- = = [ OwNeR ] = = -", "- = = [ Co -OwNeR ] = = -", "- = = [ GoD ] = = -", "- = = [ SeMi -GoD ] = = -", "- = = [ AdMiNisTraToR ] = = -", "- = = [ MoDeRaToR ] = = -", "- = = [ HelPeR ] = = -", "- = = [ V.I.P ] = = -", "- = = [ SloT ] = = -" } new g_groupFlags[MAX_GROUPS] [] = { "abcdefghijklmnopqrstu", "bcdefghijklmnopqrstu", "bcdefghijkmnopqrst", "bcdefghijkmnopqrs", "bcdefghijmnopq", "bcdefghij", "bcdefg", "bcefg", "abi", "bi" } new g_groupFlagsValue[MAX_GROUPS] public plugin_init () { register_plugin("Admin Who","1.0","AL3X MC") register_concmd("amx_who", "AMXX_WHO", 0) register_concmd("admin_who", "AMXX_WHO", 0) for(new i = 0; i < MAX_GROUPS; i++) { g_groupFlagsValue[i] = read_flags(g_groupFlags[i]) } } public AMXX_WHO (id) { new players[32], inum, player, name[32], i, a get_players(players, inum) console_print(id, " CS.RANGFORT.RO ") for(i= 0; i < MAX_GROUPS; i++) { console_print(id, "-----[%d]%s-----", i+1, g_groupNames[i]) for(a = 0; a < inum; ++a) { player = players[a] get_user_name(player, name, 31) if (get_user_flags(player) == g_groupFlagsValue[i]) { console_print(id, "%s", name) } } } console_print(id, " CS.RANGFORT.RO ") return PLUGIN_HANDLED }
-
very badly coded.
#include amxmodx #include fakemeta new knife_kill, grenade_kill, headshot new level[32] new bool:kills[32] new one_kill new two_kill new three_kill new four_kill new five_kill new six_kill new seven_kill new eight_kill new more_than_eight_kill new g_lastkill new g_firstblood public plugin_precache() { headshot = precache_model("sprites/headshot.spr") knife_kill = precache_model("sprites/knife_kill.spr") grenade_kill = precache_model("sprites/grenade_kill.spr") one_kill = precache_model("sprites/1_kill.spr") two_kill = precache_model("sprites/2_kill.spr") three_kill = precache_model("sprites/3_kill.spr") four_kill = precache_model("sprites/4_kill.spr") five_kill = precache_model("sprites/5_kill.spr") six_kill = precache_model("sprites/6_kill.spr") seven_kill = precache_model("sprites/7_kill.spr") eight_kill = precache_model("sprites/8_kill.spr") more_than_eight_kill = precache_model("sprites/more_than_8_kill.spr") } public plugin_init() { register_plugin("Death Sprite Effect","1.5","RaZzoR") register_event("DeathMsg","onDeath","a") register_event("DeathMsg","onDeath_level","a") register_event("TextMsg", "eRestart", "a", "2Game_C", "2Game_w") register_event("SendAudio", "eEndRound", "a", "2&%!MRAD_terwin", "2&%!MRAD_ctwin", "2&%!MRAD_rounddraw") register_event("RoundTime", "eNewRound", "bc") } public eRestart() { eEndRound() g_firstblood = 1 } public eEndRound() { } public client_disconnect(id) { level[id]= 0 } public client_putinserver(id) { level[id]= 0 } public onDeath() { new name_attacker[32] new name_victim[32] new wpn[3] new hs = read_data(3) new attacker = read_data(1) new victim = read_data(2) get_user_name(attacker, name_attacker, 31) get_user_name(victim, name_victim, 31) read_data(4,wpn,2) if (wpn[0] != 'k' && wpn[1] != 'r' && !can_see_fm(attacker, victim)) { } else if (hs && wpn[0] != 'k' && wpn[1] != 'r') { show_sprite(victim, headshot) } else if (wpn[0] == 'k') { show_sprite(victim, knife_kill) } else if (wpn[1] == 'r') { show_sprite(victim, grenade_kill) } return PLUGIN_CONTINUE } public onDeath_level() { new players_ct[32], players_t[32], ict, ite get_players(players_ct,ict,"ae","CT") get_players(players_t,ite,"ae","TERRORIST") if (ict == 0 || ite == 0) g_lastkill = 1 new attacker = read_data(1) new victim = read_data(2) new name_attacker[32] new name_victim[32] level[attacker] += 1 level[victim]= 0 get_user_name(attacker, name_attacker, 31) get_user_name(victim, name_victim, 31) if((victim == attacker) || (get_user_team(attacker) == get_user_team(victim)) || !victim || !attacker) return PLUGIN_CONTINUE if (g_firstblood && attacker!=victim && attacker>0) { g_firstblood = 0 } if (g_lastkill == 1) { g_lastkill = 0 } if (level[attacker] == 1) { show_sprite(victim, one_kill) kills[victim] = true } if (level[attacker] == 2) { show_sprite(victim, two_kill) kills[victim] = true } if (level[attacker] == 3) { show_sprite(victim, three_kill) kills[victim] = true } if (level[attacker] == 4) { show_sprite(victim, four_kill) kills[victim] = true } if (level[attacker] == 5) { show_sprite(victim, five_kill) kills[victim] = true } if (level[attacker] == 6) { show_sprite(victim, six_kill) kills[victim] = true } if (level[attacker] == 7) { show_sprite(victim, seven_kill) kills[victim] = true } if (level[attacker] == 8) { show_sprite(victim, eight_kill) kills[victim] = true } if (level[attacker] > 8) { show_sprite(victim, more_than_eight_kill) kills[victim] = true } return PLUGIN_CONTINUE } public show_sprite(attacker, sprite) { if(!is_user_connected(attacker)) return PLUGIN_CONTINUE static origin[3] get_user_origin(attacker, origin) message_begin(MSG_PVS, SVC_TEMPENTITY, origin) write_byte(TE_SPRITE) write_coord(origin[0]) write_coord(origin[1]) write_coord(origin[2]+65) write_short(sprite) write_byte(10) write_byte(250) message_end() return PLUGIN_CONTINUE } public podesi_boolove(id) { kills[id] = false } bool:can_see_fm(entindex1, entindex2) { if (!entindex1 || !entindex2) return false if (pev_valid(entindex1) && pev_valid(entindex1)) { new flags = pev(entindex1, pev_flags) if (flags & EF_NODRAW || flags & FL_NOTARGET) { return false } new Float:lookerOrig[3] new Float:targetBaseOrig[3] new Float:targetOrig[3] new Float:temp[3] pev(entindex1, pev_origin, lookerOrig) pev(entindex1, pev_view_ofs, temp) lookerOrig[0] += temp[0] lookerOrig[1] += temp[1] lookerOrig[2] += temp[2] pev(entindex2, pev_origin, targetBaseOrig) pev(entindex2, pev_view_ofs, temp) targetOrig[0] = targetBaseOrig [0] + temp[0] targetOrig[1] = targetBaseOrig [1] + temp[1] targetOrig[2] = targetBaseOrig [2] + temp[2] engfunc(EngFunc_TraceLine, lookerOrig, targetOrig, 0, entindex1, 0) // checks the had of seen player if (get_tr2(0, TraceResult:TR_InOpen) && get_tr2(0, TraceResult:TR_InWater)) { return false } else { new Float:flFraction get_tr2(0, TraceResult:TR_flFraction, flFraction) if (flFraction == 1.0 || (get_tr2(0, TraceResult:TR_pHit) == entindex2)) { return true } else { targetOrig[0] = targetBaseOrig [0] targetOrig[1] = targetBaseOrig [1] targetOrig[2] = targetBaseOrig [2] engfunc(EngFunc_TraceLine, lookerOrig, targetOrig, 0, entindex1, 0) // checks the body of seen player get_tr2(0, TraceResult:TR_flFraction, flFraction) if (flFraction == 1.0 || (get_tr2(0, TraceResult:TR_pHit) == entindex2)) { return true } else { targetOrig[0] = targetBaseOrig [0] targetOrig[1] = targetBaseOrig [1] targetOrig[2] = targetBaseOrig [2] - 17.0 engfunc(EngFunc_TraceLine, lookerOrig, targetOrig, 0, entindex1, 0) // checks the legs of seen player get_tr2(0, TraceResult:TR_flFraction, flFraction) if (flFraction == 1.0 || (get_tr2(0, TraceResult:TR_pHit) == entindex2)) { return true } } } } } return false }
- 2
-
SPAM
-
Description: Cu acest plugin la connectarea la server, se va adauga o palarie random.
Version: 1.0
Download: Click
#include amxmodx.inc#include fakemeta.inc native remove_entity(ent); new const hat[][]={ "models/hat0.mdl", "models/hat1.mdl", "models/hat2.mdl", "models/hat3.mdl", "models/hat4.mdl", "models/hat5.mdl", "models/hat6.mdl", "models/hat7.mdl", "models/hat8.mdl", "models/hat9.mdl"} new UserEnt[33] = -1 public plugin_precache() for(new i = 0; i < sizeof(hat); i++) precache_model(hat[i])public client_putinserver(id){new model[64]new infotarget = engfunc(EngFunc_AllocString, "info_target")new Entity = engfunc(EngFunc_CreateNamedEntity, infotarget) Entity = engfunc(EngFunc_CreateNamedEntity, infotarget)format(model, charsmax(model), "%s", hat[random_num(0,9)]) if(pev_valid(Entity)){engfunc(EngFunc_SetModel, Entity, model)set_pev(Entity, pev_movetype, MOVETYPE_FOLLOW)set_pev(Entity, pev_aiment, id)set_pev(Entity, pev_owner, id) UserEnt[id] = Entity}} public client_disconnect(id) if(UserEnt[id] != -1 && pev_valid(UserEnt[id])){remove_entity(UserEnt[id])UserEnt[id] = -1}
-
Descriere: La connectarea la server, se va auzi sunete din half-life.
Update: 1.0 (Static)
#include amxmodxnew sounds[] = {12,13,14} /*Half-Life12.mp3,Half-Life13.mp3,Half-Life14.mp3*/public client_connect(id){ client_cmd(id, "mp3volume 0.25;") client_cmd(id, "mp3 play media/Half-Life%d.mp3", sounds[random_num(0,2)])}
-
Descriere: Un plugin care va arata statistica dvs pe server.
Update 1.0
#include amxmodx #include csstats new name[32] const SHOW_TYPE = 1 // 1 - Show Hud | 2 - Show Chat new const typecmd [][] = { "say /rank", "say rank" } public plugin_init() { for(new cmd = 0; cmd < sizeof typecmd; cmd++) { register_clcmd(typecmd[cmd], "cmdrank") } } public cmdrank(Player) { static stats[8], body[8] static Deaths = 0, Kills = 0, Float:Ratio = 0.0 new position = get_user_stats(Player, stats, body) new totalposition = get_statsnum() get_user_name(Player, name, charsmax(name)) Deaths = stats[1] Kills = stats[0] Ratio = Deaths == 0 ? (float(Kills)) : (float(Kills) / float(Deaths)) switch(SHOW_TYPE) { case 1: // Hud { set_hudmessage(42, 255, 42, 0.27, 0.83, 1, 0.0, 3.0, 2.0, 1.0, -1) ShowSyncHudMsg(Player, CreateHudSyncObj(), "%s You have rank %d/%d^nKills: %d Deaths: %d^nKPD: %.2f", name, totalposition, position, stats[0], stats[1], Ratio) } case 2: // Chat { client_print(Player, print_chat, "%s You have rank %d/%d. With Kills: %d Deaths: %d KPD: %.2f", name, totalposition, position, stats[0], stats[1], Ratio) } } }
[ REZOLVAT ] Suport amx_ss
in Suport
Posted
client_cmd(param,"snapshot");
client_cmd(param,"kill");
#tryinclude cstrike
cs_set_user_team(param, CS_TEAM_SPECTATOR);