ThePhoenix, Там также без инклуды Скиньте пожалуйста полный SMA
18 Июн 2020
public GlowWeapon(id) {
if (!pev_valid(FakeWeaponID[id])) { //If the fake weapon ID does not already exist for this player.
FakeWeaponID[id] = fm_create_entity("info_target") //Spawn a new entity to replace the original.
if (!pev_valid(FakeWeaponID[id])) { //If it failed, don't go any further.
return
} else { //If it worked, set its basic properties.
dllfunc(DLLFunc_Spawn, FakeWeaponID[id])
set_pev(FakeWeaponID[id], pev_classname, "FakeWeapon")
set_pev(FakeWeaponID[id], pev_movetype, MOVETYPE_FOLLOW)
set_pev(FakeWeaponID[id], pev_aiment, id)
}
}
new weaponstr[31]
pev(id, pev_weaponmodel2, weaponstr, 30) //Store the name of the current weapon. ( P_ )
set_pev(id, pev_weaponmodel2, "") //Remove the weapon from the players hands. ( P_ )
fm_entity_set_model(FakeWeaponID[id], weaponstr) //Apply the weapon stored above to our fake weapon
set_pev(FakeWeaponID[id], pev_renderfx, kRenderFxGlowShell) //Render Away!
set_pev(FakeWeaponID[id], pev_rendercolor, {0.0, 200.0, 0.0}) //R, G, B
set_pev(FakeWeaponID[id], pev_rendermode, kRenderNormal)
set_pev(FakeWeaponID[id], pev_renderamt, 50.0) //Ammount/ShellSize
}
write_byte(TE_ELIGHT)
write_short(entity:attachment to follow)
write_coord(position.x)
write_coord(position.y)
write_coord(position.z)
write_coord(radius)
write_byte(red)
write_byte(green)
write_byte(blue)
write_byte(life in 0.1's)
write_coord(decay rate)
V_ P_ это не энтити (точнее не серверный энтити) это создаётся на стороне клиента. Бгз редактирование клиента это нельзя сделатьentity:attachment to follow
/**
*
* Название: Zombie Aura
* Автор: vk.com/solkept
*
*/
#include amxmodx
#include fakemeta
#include hamsandwich
#include zombieplague
// Нативы, думаю понятно, что они делают:
// EnableZombieAura(iPlayer, iRed, iGreen, iBlue);
// DisableZombieAura(iPlayer);
// Частота таска, минимально 0.1, чем меньше значение, тем быстрее будет включаться аура.
new const Float:g_flTaskFrequency = 1.0;
new g_iMaxPlayers;
enum _:AuraProperties {
Enable = 0,
Red,
Green,
Blue
}; new g_iPlayerAura[33][AuraProperties];
public plugin_init() {
register_plugin("xman2030_aura", "CS-FADE.RU", "CS-FADE.RU");
set_task(g_flTaskFrequency, "task_ShowAura", 94494944, _, _, "b");
RegisterHam(Ham_Spawn, "player", "Ham_PlayerSpawnPost", true);
g_iMaxPlayers = get_maxplayers();
}
public plugin_natives() {
register_native("EnableZombieAura", "native_EnableZombieAura", 1);
register_native("DisableZombieAura", "native_DisableZombieAura", 1);
}
public native_DisableZombieAura(iPlayer) ChangeAuraSettings(iPlayer, Enable, 0);
public native_EnableZombieAura(iPlayer, iRed, iGreen, iBlue) {
ChangeAuraSettings(iPlayer, Enable, 1);
ChangeAuraSettings(iPlayer, Red, iRed);
ChangeAuraSettings(iPlayer, Green, iGreen);
ChangeAuraSettings(iPlayer, Blue, iBlue);
}
public zp_user_humanized_post(iPlayer, iSurvivor) ChangeAuraSettings(iPlayer, Enable, 0);
public Ham_PlayerSpawnPost(iPlayer) if(!zp_get_user_zombie(iPlayer)) ChangeAuraSettings(iPlayer, Enable, 0);
public client_connect(iPlayer) ChangeAuraSettings(iPlayer, Enable, 0);
public task_ShowAura(iTaskID) {
for(new iPlayer = 1; iPlayer <= g_iMaxPlayers; iPlayer++) {
if(!is_user_connected(iPlayer)) continue;
if(!is_user_alive(iPlayer)) continue;
if(g_iPlayerAura[iPlayer][Enable]) {
new Float:vecOrigin[3]; pev(iPlayer, pev_origin, vecOrigin);
new iOrigin[3]; FVecIVec(vecOrigin, iOrigin);
message_begin(MSG_BROADCAST, SVC_TEMPENTITY, _, iPlayer);
write_byte(TE_ELIGHT);
write_short(iPlayer);
write_coord(iOrigin[0]);
write_coord(iOrigin[1]);
write_coord(iOrigin[2]);
write_coord(20);
write_byte(g_iPlayerAura[iPlayer][Red]);
write_byte(g_iPlayerAura[iPlayer][Green]);
write_byte(g_iPlayerAura[iPlayer][Blue]);
write_byte(20);
write_coord(0);
message_end();
}
}
}
ChangeAuraSettings(iPlayer, iSetting, iValue) if(0 < iPlayer < g_iMaxPlayers) g_iPlayerAura[iPlayer][iSetting] = iValue;
Give us the clue about how to doingV_ P_ это не энтити (точнее не серверный энтити) это создаётся на стороне клиента. Бгз редактирование клиента это нельзя сделать
No wayGive us the clue about how to doing
What problems in p_ ??No way
Only client edit for v_ and p_
For p_ u can make attachment and set some render effects, but have some problems with it
muzzleflash atachments is broken when u firingWhat problems in p_ ??
I already using it, and nothing problematic found.