Възможно ли е да се направи, когато играч напише /god
- Да стане напълно невидим и да не се чува
- Да не може да нанася никаква щета по противника
- Да има бъни хоп
Заявка за god плъгин
Заявка за god плъгин
Мисля че търсиш това viewtopic.php?f=32&t=5227&p=30191&hilit=%2Fgod#p30191
А за autobhop си сложи просто този плъгин - https://forums.alliedmods.net/showthread.php?t=133605
Надявам се да съм ти бил полезен
А за autobhop си сложи просто този плъгин - https://forums.alliedmods.net/showthread.php?t=133605
Надявам се да съм ти бил полезен
-
Huehue
Извън линия - Модератор
- Мнения: 352
- Регистриран на: 16 Яну 2017, 23:42
- Местоположение: София
- Се отблагодари: 7 пъти
- Получена благодарност: 171 пъти
- Обратна връзка:
Заявка за god плъгин
Заповядайте,
Код за потвърждение: Избери целия код
#include <amxmodx>
/* Common include libraries */
#tryinclude <reapi>
#tryinclude <cromchat>
#if !defined _reapi_included
#include <engine>
#include <hamsandwich>
#endif
new g_bGodEnabled[MAX_PLAYERS + 1]
public plugin_init()
{
register_plugin("God Command", "1.0", "AMXX-BG PawnTeam")
register_clcmd("say /god", "God_Command")
register_clcmd("say_team /god", "God_Command")
#if defined _reapi_included
RegisterHookChain(RG_CBasePlayer_Jump, "RG__CBasePlayer_Jump")
RegisterHookChain(RG_CBasePlayer_TraceAttack, "RG__CBasePlayer_TraceAttack")
#else
RegisterHam(Ham_TraceAttack, "player", "CBase_Ham_TraceAttack")
#endif
register_message(get_user_msgid("StatusValue"), "messageStatusValue")
#if defined _cromchat_included
CC_SetPrefix("&x04[AMXX-BG]&x01")
#endif
}
public client_putinserver(id)
{
g_bGodEnabled[id] = false
}
public God_Command(id)
{
#if defined _reapi_included
if (g_bGodEnabled[id])
{
g_bGodEnabled[id] = false
rg_set_entity_rendering(id)
rg_set_user_footsteps(id, false)
}
else
{
static Float:fColors[3]
fColors[0] = 0.0
fColors[1] = 0.0
fColors[2] = 0.0
g_bGodEnabled[id] = true
rg_set_entity_rendering(id, kRenderFxNone, fColors, kRenderTransTexture, 0)
rg_set_user_footsteps(id, true)
}
#else
if (g_bGodEnabled[id])
{
g_bGodEnabled[id] = false
set_rendering(id)
entity_set_int(id, EV_INT_flTimeStepSound, 0)
}
else
{
g_bGodEnabled[id] = true
set_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransTexture, 0)
entity_set_int(id, EV_INT_flTimeStepSound, 999)
}
#endif
#if defined _cromchat_included
CC_SendMessage(id, "You have &x03%s &x04god &x01status..", g_bGodEnabled[id] ? "enabled" : "disabled")
#else
client_print(id, print_chat, "[AMXX-BG] You have %s god status..", g_bGodEnabled[id] ? "enabled" : "disabled")
#endif
}
#if defined _reapi_included
public RG__CBasePlayer_Jump(id)
{
if (!g_bGodEnabled[id])
return
set_entvar(id, var_fuser2, 0.0)
if (get_entvar(id, var_flags) & FL_ONGROUND)
{
new Float:fVelocity[3]
get_entvar(id, var_velocity, fVelocity)
fVelocity[2] += 250.0
set_entvar(id, var_velocity, fVelocity)
set_entvar(id, var_gaitsequence, 6)
}
}
public RG__CBasePlayer_TraceAttack(iVictim, iAttacker)
{
if (!is_user_connected(iAttacker) || iVictim == iAttacker)
return HC_CONTINUE
return (g_bGodEnabled[iAttacker]) ? HC_SUPERCEDE : HC_CONTINUE
}
#else
public client_PreThink(id)
{
if (!g_bGodEnabled[id])
return
entity_set_float(id, EV_FL_fuser2, 0.0)
entity_set_int(id, EV_INT_flTimeStepSound, 999)
if (entity_get_int(id, EV_INT_button) & 2)
{
static iFlags
iFlags = entity_get_int(id, EV_INT_flags)
if (iFlags & FL_WATERJUMP || entity_get_int(id, EV_INT_waterlevel) >= 2 || !(iFlags & FL_ONGROUND))
return
new Float:fVelocity[3]
get_user_velocity(id, fVelocity)
fVelocity[2] += 250.0
set_user_velocity(id, fVelocity)
entity_set_int(id, EV_INT_gaitsequence, 6)
}
return
}
public CBase_Ham_TraceAttack(iVictim, iAttacker)
{
if (!is_user_connected(iAttacker) || iVictim == iAttacker)
return HAM_IGNORED
return (g_bGodEnabled[iAttacker]) ? HAM_SUPERCEDE : HAM_IGNORED
}
#endif
public messageStatusValue(id)
{
new iFlag = get_msg_arg_int(1)
new iTarget = get_msg_arg_int(2)
if (iFlag == 2 && g_bGodEnabled[iTarget])
{
set_msg_arg_int(1, get_msg_argtype(1), 1)
set_msg_arg_int(2, get_msg_argtype(2), 0)
}
}
#if defined _reapi_included
stock rg_set_entity_rendering(const entity, fx = kRenderFxNone, Float:color[] = {255.0, 255.0, 255.0}, render = kRenderNormal, amount = 16)
{
set_entvar(entity, var_renderfx, fx)
set_entvar(entity, var_rendercolor, color)
set_entvar(entity, var_rendermode, render)
set_entvar(entity, var_renderamt, float(amount))
}
#endif
LOYAL TO THE OATH OF OMERTА̀
Зад монитора мъжкари, това не го разбирам..
На живо сте мишкари, това го гарантирам!
Седиш на 30 метра от мен като препариран!
Ако има нещо брат, номерът ми е блокиран..
My GitHub Profile
GitHub
My AMXX Includes Collection
AMXX Include Libraries
My Steam Profile (from SteamDB)
Зад монитора мъжкари, това не го разбирам..
На живо сте мишкари, това го гарантирам!
Седиш на 30 метра от мен като препариран!
Ако има нещо брат, номерът ми е блокиран..
My GitHub Profile
GitHub
My AMXX Includes Collection
AMXX Include Libraries
My Steam Profile (from SteamDB)
- Value: 4179€
- Games owned: 1855
- Games played: 754 (40%)
- Hours on record: 4,994.9h
-
SkandaU
Извън линия - Потребител
- Мнения: 213
- Регистриран на: 09 Яну 2017, 12:37
- Се отблагодари: 45 пъти
- Получена благодарност: 22 пъти
Заявка за god плъгин
Бачка коректно, възможно ли е да внесеш още няколко промени?
Когато напишеш командата да се вижда от всички и да излиза така [GodMode] Player test activated GodMode / Player test deactivated GodMode.
Когато напише командата да излезе от GodMode да го респауне, демек да го върне в базата.
И ако можеш да изкараш худ съобщение. Players in GodMode (2): test, player
А и като метна граната нанася щета, ако може и това да оправиш ще бъде бомба плъгина
Благодаря ти за положения труд и време върху заявката ми.
Когато напишеш командата да се вижда от всички и да излиза така [GodMode] Player test activated GodMode / Player test deactivated GodMode.
Когато напише командата да излезе от GodMode да го респауне, демек да го върне в базата.
И ако можеш да изкараш худ съобщение. Players in GodMode (2): test, player
А и като метна граната нанася щета, ако може и това да оправиш ще бъде бомба плъгина
Благодаря ти за положения труд и време върху заявката ми.
-
Huehue
Извън линия - Модератор
- Мнения: 352
- Регистриран на: 16 Яну 2017, 23:42
- Местоположение: София
- Се отблагодари: 7 пъти
- Получена благодарност: 171 пъти
- Обратна връзка:
Заявка за god плъгин
Update 1.1:
Плъгина работи вече само на ReAPI
Добавени са нещата които поиска.
Плъгина работи вече само на ReAPI
Добавени са нещата които поиска.
Код за потвърждение: Избери целия код
#include <amxmodx>
/* Common include libraries */
#tryinclude <reapi>
#tryinclude <cromchat>
#if !defined _reapi_included
#assert "This plugin requires ReAPI Library, please install it and try again!"
#endif
#if !defined _cromchat_included
#assert "This plugin requires OciXCrom ColorChat Library. Please install it and try again!"
#endif
#define HUD_RED random(256)
#define HUD_GREEN random(256)
#define HUD_BLUE random(256)
#define HUD_X_COORD 0.02
#define HUD_Y_COORD 0.2
new g_bGodEnabled[MAX_PLAYERS + 1],
g_szName[MAX_PLAYERS + 1][MAX_NAME_LENGTH],
g_szMessage[MAX_FMT_LENGTH],
g_iGodsCount,
g_SyncHudMessage,
g_iNameChanged
public plugin_init()
{
register_plugin("God Command [ReAPI Support Only]", "1.1-Huehue", "AMXX-BG PawnTeam")
register_clcmd("say /god", "God_Command")
register_clcmd("say_team /god", "God_Command")
RegisterHookChain(RG_CBasePlayer_Jump, "RG__CBasePlayer_Jump")
RegisterHookChain(RG_CBasePlayer_TraceAttack, "RG__CBasePlayer_TraceAttack")
RegisterHookChain(RG_CGrenade_ExplodeHeGrenade, "RG__CGrenade_ExplodeHeGrenade")
register_message(get_user_msgid("StatusValue"), "messageStatusValue")
set_task(2.0, "Task_HudInfo", .flags = "b")
g_SyncHudMessage = CreateHudSyncObj()
CC_SetPrefix("&x04[GodMode]&x01")
}
public client_putinserver(id)
{
get_user_name(id, g_szName[id], charsmax(g_szName[]))
g_bGodEnabled[id] = false
CreateMessage()
}
public client_disconnected(id)
{
if (g_bGodEnabled[id])
{
g_bGodEnabled[id] = false
g_iGodsCount--
CreateMessage()
}
}
public client_infochanged(id)
{
if (g_bGodEnabled[id])
{
static szNames[2][MAX_NAME_LENGTH]
get_user_name(id, szNames[0], charsmax(szNames[]))
get_user_info(id, "name", szNames[1], charsmax(szNames[]))
if (!equal(szNames[0], szNames[1]))
{
copy(g_szName[id], charsmax(g_szName[]), szNames[1])
g_iNameChanged = true
}
}
}
public Task_HudInfo()
{
set_hudmessage(HUD_RED, HUD_GREEN, HUD_BLUE, HUD_X_COORD, HUD_Y_COORD, .holdtime = 1.8, .channel = 4)
ShowSyncHudMsg(0, g_SyncHudMessage, g_szMessage)
if (g_iNameChanged)
{
g_iNameChanged = false
CreateMessage()
}
}
public CreateMessage()
{
static iLen
iLen = 0
iLen += formatex(g_szMessage[iLen], charsmax(g_szMessage) - iLen, "Players in GodMode: %i", g_iGodsCount)
new iPlayers[MAX_PLAYERS], iNum, id
get_players(iPlayers, iNum)
for(--iNum; iNum >= 0; iNum--)
{
id = iPlayers[iNum]
if (g_bGodEnabled[id])
{
iLen += formatex(g_szMessage[iLen], charsmax(g_szMessage) - iLen, "^n%s", g_szName[id])
}
}
}
public God_Command(id)
{
if (g_bGodEnabled[id])
{
g_bGodEnabled[id] = false
rg_set_entity_render(id, false)
rg_set_user_footsteps(id, false)
rg_round_respawn(id)
g_iGodsCount--
}
else
{
g_bGodEnabled[id] = true
rg_set_entity_render(id, true)
rg_set_user_footsteps(id, true)
g_iGodsCount++
}
CC_SendMessage(0, "Player &x03%s &x04%s &x01GodMode.", g_szName[id], g_bGodEnabled[id] ? "activated" : "deactivated")
CreateMessage()
}
public RG__CBasePlayer_Jump(id)
{
if (!g_bGodEnabled[id])
return
set_entvar(id, var_fuser2, 0.0)
if (get_entvar(id, var_flags) & FL_ONGROUND)
{
new Float:fVelocity[3]
get_entvar(id, var_velocity, fVelocity)
fVelocity[2] += 250.0
set_entvar(id, var_velocity, fVelocity)
set_entvar(id, var_gaitsequence, 6)
}
}
public RG__CBasePlayer_TraceAttack(iVictim, iAttacker)
{
if (!is_user_connected(iAttacker) || iVictim == iAttacker)
return HC_CONTINUE
return (g_bGodEnabled[iAttacker]) ? HC_SUPERCEDE : HC_CONTINUE
}
public RG__CGrenade_ExplodeHeGrenade(iEntity, iTraceHandle, iBitsDamageType)
{
#pragma unused iTraceHandle, iBitsDamageType
if (!is_entity(iEntity))
return HC_CONTINUE
new iOwner = get_entvar(iEntity, var_owner)
if (g_bGodEnabled[iOwner])
{
set_entvar(iEntity, var_flags, get_entvar(iEntity, var_flags) | FL_KILLME)
set_entvar(iEntity, var_nextthink, get_gametime())
return HC_SUPERCEDE
}
return HC_CONTINUE
}
public messageStatusValue(id)
{
new iFlag = get_msg_arg_int(1)
new iTarget = get_msg_arg_int(2)
if (iFlag == 2 && g_bGodEnabled[iTarget])
{
set_msg_arg_int(1, get_msg_argtype(1), 1)
set_msg_arg_int(2, get_msg_argtype(2), 0)
}
}
stock rg_set_entity_render(id, bool:visible = true)
{
if (visible == true)
rg_set_entity_rendering(id)
else
{
static Float:fColors[3]
fColors[0] = 0.0
fColors[1] = 0.0
fColors[2] = 0.0
rg_set_entity_rendering(id, kRenderFxNone, fColors, kRenderTransTexture, 0)
}
}
stock rg_set_entity_rendering(const entity, fx = kRenderFxNone, Float:color[] = {255.0, 255.0, 255.0}, render = kRenderNormal, amount = 16)
{
set_entvar(entity, var_renderfx, fx)
set_entvar(entity, var_rendercolor, color)
set_entvar(entity, var_rendermode, render)
set_entvar(entity, var_renderamt, float(amount))
}
LOYAL TO THE OATH OF OMERTА̀
Зад монитора мъжкари, това не го разбирам..
На живо сте мишкари, това го гарантирам!
Седиш на 30 метра от мен като препариран!
Ако има нещо брат, номерът ми е блокиран..
My GitHub Profile
GitHub
My AMXX Includes Collection
AMXX Include Libraries
My Steam Profile (from SteamDB)
Зад монитора мъжкари, това не го разбирам..
На живо сте мишкари, това го гарантирам!
Седиш на 30 метра от мен като препариран!
Ако има нещо брат, номерът ми е блокиран..
My GitHub Profile
GitHub
My AMXX Includes Collection
AMXX Include Libraries
My Steam Profile (from SteamDB)
- Value: 4179€
- Games owned: 1855
- Games played: 754 (40%)
- Hours on record: 4,994.9h
-
- Подобни теми
- Отговори
- Преглеждания
- Последно мнение
-
- 1 Отговори
- 1265 Преглеждания
-
Последно мнение от OciXCrom
-
- 3 Отговори
- 1899 Преглеждания
-
Последно мнение от OciXCrom
-
- 20 Отговори
- 4458 Преглеждания
-
Последно мнение от Siska
-
- 4 Отговори
- 1929 Преглеждания
-
Последно мнение от OciXCrom
-
- 3 Отговори
- 1850 Преглеждания
-
Последно мнение от neppyS BG
-
- 9 Отговори
- 4214 Преглеждания
-
Последно мнение от mBFF-TheFucKBG
-
- 2 Отговори
- 1575 Преглеждания
-
Последно мнение от Err0rcH0
Кой е на линия
Потребители разглеждащи този форум: Bing [Bot] и 26 госта