Special Round- Knife Round Plugin Not Working

Статус
В этой теме нельзя размещать новые ответы.
Сообщения
213
Реакции
71
Помог
2 раз(а)
Ошибка
Someone made this plugin for me, Plugin is loaded but don't operate even don't show HUD, only I can do is cvar change, that too also don't make any effect, currently I have disabled it, else it was runnung at Number 7 in plugin list. + There are error logs in amxmodx/logs.
ОС
Linux
Amx Mod X
AMX Mod X 1.9.0.5249 (http://www.amxmodx.org)
Authors:
David "BAILOPAN" Anderson, Pavol "PM OnoTo" Marko
Felix "SniperBeamer" Geyer, Jonny "Got His Gun" Bergstrom
Lukasz "SidLuke" Wlasinski, Christian "Basic-Master" Hammacher
Borja "faluco" Ferrer, Scott "DS" Ehlert
Compiled: Jun 19 2019 13:31:53
Built from: https://github.com/alliedmodders/amxmodx/commit/6cecb34
Build ID: 5249:6cecb34
Core mode: JIT+ASM32
Билд
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.7.0.688-dev
Build date: 17:03:18 Sep 5 2019 (1972)
Build from: https://github.com/dreamstalker/rehlds/commit/262f443
ReGamedll
ReGameDLL version: 5.11.0.397-dev
Build date: 17:33:24 Sep 4 2019
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/8ec88f8
Версия Metamod
Metamod v1.21p37  2013/05/30 (5:13)
by Will Day
http://www.metamod.org/
Patch: Metamod-P (mm-p) v37
by Jussi Kivilinna
http://metamod-p.sourceforge.net/
compiled: May 30 2013, 11:41:16 EET (optimized)
Список метамодулей
Currently loaded plugins:
description stat pend file vers src load unlod
[ 1] SafeNameAndChat RUN - SafeNameAndChat. v1.1 ini ANY ANY
[ 2] Reunion RUN - reunion_mm_i386. v0.1.0.1 ini Start Never
[ 3] AMX Mod X RUN - amxmodx_mm_i386. v1.9.0.5 ini Start ANY
[ 4] Revoice RUN - revoice_mm_i386. v0.1.0.3 ini Start Never
[ 5] ReSemiclip RUN - resemiclip_mm_i3 v2.3.9 ini Chlvl ANY
[ 6] WHBlocker RUN - whblocker_mm_i38 v1.5.696 ini Chlvl ANY
[ 7] Fun RUN - fun_amxx_i386.so v1.9.0.5 pl3 ANY ANY
[ 8] Engine RUN - engine_amxx_i386 v1.9.0.5 pl3 ANY ANY
[ 9] FakeMeta RUN - fakemeta_amxx_i3 v1.9.0.5 pl3 ANY ANY
[10] GeoIP RUN - geoip_amxx_i386. v1.9.0.5 pl3 ANY ANY
[11] CStrike RUN - cstrike_amxx_i38 v1.9.0.5 pl3 ANY ANY
[12] CSX RUN - csx_amxx_i386.so v1.9.0.5 pl3 ANY ANY
[13] Ham Sandwich RUN - hamsandwich_amxx v1.9.0.5 pl3 ANY ANY
[14] ReAPI RUN - reapi_amxx_i386. v5.10.0. pl3 ANY Never
[15] hackdetector RUN - hackdetector_amx v0.15.32 pl3 ANY ANY
[16] ReAimDetector RUN - reaimdetector_am v0.2.2 pl3 ANY Never
[17] MySQL RUN - mysql_amxx_i386. v1.9.0.5 pl3 ANY ANY
17 plugins, 17 running
Список плагинов
Currently loaded plugins:
name version author file status
[ 1] My Ban System 1.1.2 K@[L]@uz kalauz_ban_syst running
[ 2] Admin Commands Log 1.2 w0w admin_commands_ running
[ 3] Admin Spectator ESP 1.4_beta KoST admin_spec_esp_ running
[ 4] Scan_Say 31/08/2019 General Memer scan_say.amxx running
[ 5] Online Logger 06.04.18 mx?! PSL_online_logg running
[ 6] OciXCrom's Rank System 3.7 OciXCrom crx_ranksystem. running
[ 7] Admin Base 1.9.0.5249 AMXX Dev Team admin.amxx running
[ 8] Admin Commands 1.9.0.5249 AMXX Dev Team admincmd.amxx running
[ 9] Admin Help 1.9.0.5249 AMXX Dev Team adminhelp.amxx running
[ 10] Multi-Lingual System 1.9.0.5249 AMXX Dev Team multilingual.am running
[ 11] Menus Front-End 1.9.0.5249 AMXX Dev Team menufront.amxx running
[ 12] Commands Menu 1.9.0.5249 AMXX Dev Team cmdmenu.amxx running
[ 13] New KickMenu 2.0 Flash kickmenu.amxx running
[ 14] Players Menu 1.9.0.5249 AMXX Dev Team plmenu.amxx running
[ 15] Maps Menu 1.9.0.5249 AMXX Dev Team mapsmenu.amxx running
[ 16] Plugin Menu 1.9.0.5249 AMXX Dev Team pluginmenu.amxx running
[ 17] Chat Manager 1.1.1-11 Mistrick PSL_GREEN_chatm running
[ 18] Chat Manager: Addon 0.0.4-70 Mistrick PSL_chatmanager running
[ 19] Anti Flood 1.9.0.5249 AMXX Dev Team antiflood.amxx running
[ 20] Admin Votes 1.9.0.5249 AMXX Dev Team adminvote.amxx running
[ 21] NextMap 1.9.0.5249 AMXX Dev Team nextmap.amxx running
[ 22] Roundsleft 0.2 JGHG roundsleft_nosp running
[ 23] Stats Configuration 1.9.0.5249 AMXX Dev Team statscfg.amxx running
[ 24] Items Restrict 1.1 s1lent items_restrict. running
[ 25] StatsX 1.9.0.5249 AMXX Dev Team statsx.amxx running
[ 26] CS Misc. Stats 1.9.0.5249 AMXX Dev Team miscstats.amxx running
[ 27] Map Spawns Editor 1.0.16 iG_os Map_Spawns_Edit running
[ 28] [PSL] Admin Color Chat 1.0 Edit By Alber PSL_admin_color running
[ 29] Admin Chat 1.9.0.5249 AMXX Dev Team adminchat.amxx running
[ 30] Reset Score 0.0.2f wopox1337 PSL_ResetScore. running
[ 31] Block IP Messages 1.0 Alpha Alik Inline Asla PSL_AFK_BlockIp running
[ 32] [PSL] Info Rounds By A 1.0 K@[L]@uz PSL_inforounds. running
[ 33] Played Time 1.4 Alka > Edit By A PSL_played_time running
[ 34] ServerNamePlay 1.8.2 Rock Rocky PSL_AFK_hostnam running
[ 35] Invisible Spectator 0.2 ConnorMcLeod PSL_Invis_Spec. running
[ 36] unknown unknown unknown pslgamename.amx running
[ 37] FragCounter 1.01 Scarzzurs fragcounter.amx running
[ 38] Spec Money Save 0.2 F@nt0M spec_money_save running
[ 39] KGB Bots 2.3 OvidiuS & Desika kgbbots.amxx running
[ 40] Steamers Info 1.0 K@[L]@uz steamers_info.a running
[ 41] AFK Control ReNew 1.2(a) neygomon afk_control.amx running
[ 42] AMX Client Exec 0.03 v3x PSL_amx_exec.am running
[ 43] Advanced Bullet Damage 1.0 Sn!ff3r abd.amxx running
[ 44] [ReAPI] No Team Flash 0.0.2 Vaqtincha no_team_flash.a running
[ 45] xREDIRECT 1.0.3.3 x0R xredirect.amxx running
[ 46] AMXX Gag 1.5.0 xPaw & Exolent amx_gag.amxx running
[ 47] ReAimDetector API 0.2.1 ReHLDS Team reaimdetector.a running
[ 48] Autoresponder 0.5 MaximusBrood ad_manager.amxx running
[ 49] AutoReloadAdmins 1.0 BS autoreloadadmin running
[ 50] Instant AutoTeamBalanc 1.2.0 ConnorMcLeod instant_autotea running
[ 51] Ultimate Grenade Contr 2.0 Nomexous u_gren_ctrl.amx running
[ 52] Fast Sniper Switch 1.3 Numb fast_sniper_swi running
[ 53] Anti sv_password Chang 1.0 BesT autopassremover running
[ 54] Block Advertising 1.3 Alka block_advertisi running
[ 55] Block IP 1.0 bad_boy Anti_IP_With_Sp running
[ 56] Advanced Kill Assists 0.9 Spection next21_kill_ass running
56 plugins, 56 running
Автор плагина
Learning
Версия плагина
1.0
Исходный код
/*


Knife Round
===========

Description
After every X rounds , an special knife round will be occur.

*/
#include <amxmodx>
#include <fun>
#include <engine>

// Red , Green , Blue
new const HUD_COLOR[3] = {0 , 255 , 0}

// Hud X position
const Float: HUD_POSITION_X = -1.0
// Hud Y position
const Float: HUD_POSITION_Y = 0.25

// Hud display time
const HOLD_TIME = 5

// buy menu commands
new const g_szBuyCmds[ ][ ] = {
"usp", "glock", "deagle", "p228", "elites", "fn57", "m3", "xm1014", "mp5", "tmp", "p90", "mac10", "ump45", "ak47",
"galil", "famas", "sg552", "m4a1", "aug", "scout", "awp", "g3sg1", "sg550", "m249", "vest", "vesthelm", "flash", "hegren",
"sgren", "defuser", "nvgs", "shield", "primammo", "secammo", "km45", "9x19mm", "nighthawk", "228compact", "12gauge",
"autoshotgun", "smg", "mp", "c90", "cv47", "defender", "clarion", "krieg552", "bullpup", "magnum", "d3au1", "krieg550",
"buyammo1", "buyammo2"
}

new const VERSION[] = "1.0"

// players class (needed when we want to block weapon pick up)
new const PLAYER_CLASS[] = "player"

// variable to increase value
new g_knife_round

// is knife round ?
new bool: g_is_knife_round

// cvar
new cvar_knife_round

public plugin_init()
{
register_plugin("Knife Round" , VERSION , "LearninG")
// looping through buy commands
for (new i; i<sizeof g_szBuyCmds; i++)
{
register_clcmd(g_szBuyCmds[i] , "block_buy")
}
// called when user touch weapons , shield ...
register_touch("armoury_entity", PLAYER_CLASS, "PlayerTouchArmoury")
register_touch("weaponbox", PLAYER_CLASS, "PlayerTouchWeaponBox")
register_touch("weapon_shield", PLAYER_CLASS, "PlayerTouchShield")

// event_new_round
register_logevent("event_new_round",2,"0=World triggered","1=Round_Start")
register_event( "30" , "event_intermission" , "a" )
register_cvar("knife_round_version", VERSION, FCVAR_SERVER | FCVAR_SPONLY)

// store cvar in variable
cvar_knife_round = register_cvar("knife_round_delay" , "15")
}

// called when new round begins
public event_new_round()
{
g_is_knife_round = false
// increase variable value by 1
g_knife_round++
// variable value reached our cvar number ?
if (g_knife_round == get_pcvar_num(cvar_knife_round))
{
// Start round
g_is_knife_round = true
g_knife_round = 0
// looping through all connected players
new players[32], num
get_players(players, num, "a")

for( --num; num >= 0; num-- )
{
// take away players weapon
strip_user_weapons(players[num])
// give them a knife
give_item(players[num] , "weapon_knife")
// set our hud message and show it to them.
set_hudmessage(HUD_COLOR[0] , HUD_COLOR[1] , HUD_COLOR[2] , HUD_POSITION_X , HUD_POSITION_Y , 0, 8.0, 6.0, 0.3, 0.3, HOLD_TIME)
show_hudmessage(players[num] , "Knife Round!!!")
}
}
}

public block_buy()
{
// is knife round ?
if (g_is_knife_round)
{
// block buy commands
return PLUGIN_HANDLED
}
// allow buy commands
return PLUGIN_CONTINUE
}

public PlayerTouchArmoury(ent, id)
{
if (g_is_knife_round)
{
return PLUGIN_HANDLED
}
return PLUGIN_CONTINUE
}

public PlayerTouchWeaponBox(ent, id)
{
// player has touched a weapon , when round is knife_round
if (g_is_knife_round)
{
// block weapon pickup
return PLUGIN_HANDLED
}
// allow pick up
return PLUGIN_CONTINUE
}

// player has touched shield.
public PlayerTouchShield(ent, id)
{
if (g_is_knife_round)
{
return PLUGIN_HANDLED
}
return PLUGIN_CONTINUE
}

public event_intermission()
{
g_is_knife_round = false
g_knife_round = 0
}
For Problem, Kindly Read Error Log [Box] at Top.

P.S: During the test of plugin, I was using metamod-p37 but now I have replaced it with:

Metamod-r v1.3.0.128, API (5:13) Metamod-r build: 17:47:54 Aug 24 2018 Metamod-r from: https://github.com/theAsmodai/metamod-r/commit/0cf2f70
 
В этой теме было размещено решение! Перейти к решению.
Последнее редактирование:
Сообщения
1,293
Реакции
2,294
Помог
57 раз(а)
Скриншот 069.jpg

original code. try set cvar to low value (3 or 4), restart server (shutdown and start again), then test. you can make restarts just to over rounds.
 
Сообщения
213
Реакции
71
Помог
2 раз(а)
Сообщения
1,293
Реакции
2,294
Помог
57 раз(а)
DrStrange, hm... i suppose that you change cvar in .sma without changing it in console. I'm right? Changing value in .sma for cvar that already has been registered doesn't change its value. You need to change it manually.
8 Сен 2019
i add debug print (chat/server console), it will print round number/round to trigger at the start of each round
 

Вложения

  • 3.9 KB Просмотры: 312
Сообщения
213
Реакции
71
Помог
2 раз(а)
DrStrange, hm... i suppose that you change cvar is .sma without changing it in console. I'm right? Changing value in .sma for cvar that already has been registered doesn't change its value. You need to change it manually.
First I tried compiled as it was, no effect was produced at round 15, then at 18th or 19th round, I changed cvar to 10 & waited for results on round 20 & 21 but nothing happend.
 
Сообщения
213
Реакции
71
Помог
2 раз(а)
It means plugin won't repeat? Knife round every x [cvar] number of rounds?
8 Сен 2019

Like: knife round at 15, 30, 45 etc.
 
Сообщения
1,293
Реакции
2,294
Помог
57 раз(а)
It means that if current round is 12 and you set cvar to 10, logic will stuck
Код:
    g_knife_round++
    // variable value reached our cvar number ?
    if (g_knife_round == get_pcvar_num(cvar_knife_round))
== needs to be changed to >= to cover cvar changing "on the fly"
 
Сообщения
213
Реакции
71
Помог
2 раз(а)
It means that if current round is 12 and you set cvar to 10, logic will stuck
Код:
    g_knife_round++
    // variable value reached our cvar number ?
    if (g_knife_round == get_pcvar_num(cvar_knife_round))
== needs to be changed to >= to cover cvar changing "on the fly"
Sorry just saw it, I will be back in a while and mark it as best answer, if it worked accordingly.

Thanks BlackSignature for quick help !!
8 Сен 2019
BlackSignature Compilation Error. // Edit: My Mistake, Fixed: you said >=, I made => this, hence got compilation error. (fixed code too)
Код:
/*


Knife Round
===========

Description
After every X rounds , an special knife round will occur.
For plugin to work properly add knife_round_delay "10" (what ever number of rounds you want) in amxx.cfg or use cvar atleast once in server.

*/
#include <amxmodx>
#include <fun>
#include <engine>

// Red , Green , Blue
new const HUD_COLOR[3] = {0 , 255 , 0}

// Hud X position
const Float: HUD_POSITION_X = -1.0
// Hud Y position
const Float: HUD_POSITION_Y = 0.25

// Hud display time
const HOLD_TIME = 5

// buy menu commands
new const g_szBuyCmds[ ][ ] = {
    "usp", "glock", "deagle", "p228", "elites", "fn57", "m3", "xm1014", "mp5", "tmp", "p90", "mac10", "ump45", "ak47",
    "galil", "famas", "sg552", "m4a1", "aug", "scout", "awp", "g3sg1", "sg550", "m249", "vest", "vesthelm", "flash", "hegren",
    "sgren", "defuser", "nvgs", "shield", "primammo", "secammo", "km45", "9x19mm", "nighthawk", "228compact", "12gauge",
    "autoshotgun", "smg", "mp", "c90", "cv47", "defender", "clarion", "krieg552", "bullpup", "magnum", "d3au1", "krieg550",
    "buyammo1", "buyammo2"
}

new const VERSION[] = "1.0"

// players class (needed when we want to block weapon pick up)
new const PLAYER_CLASS[] = "player"

// variable to increase value
new g_knife_round

// is knife round ?
new bool: g_is_knife_round

// cvar
new cvar_knife_round

public plugin_init()
{
    register_plugin("Knife Round" , VERSION , "LearninG")
    // looping through buy commands
    for (new i; i<sizeof g_szBuyCmds; i++)
    {
        register_clcmd(g_szBuyCmds[i] , "block_buy")
    }
    // called when user touch weapons , shield ...
    register_touch("armoury_entity", PLAYER_CLASS, "PlayerTouchArmoury")
    register_touch("weaponbox", PLAYER_CLASS, "PlayerTouchWeaponBox")
    register_touch("weapon_shield", PLAYER_CLASS, "PlayerTouchShield")

    // event_new_round
    register_logevent("event_new_round",2,"0=World triggered","1=Round_Start")
    register_event( "30" , "event_intermission" , "a" )
    register_cvar("knife_round_version", VERSION, FCVAR_SERVER | FCVAR_SPONLY)

    // store cvar in variable
    cvar_knife_round = register_cvar("knife_round_delay" , "10")
}

// called when new round begins
public event_new_round()
{
    g_is_knife_round = false
    // increase variable value by 1
    g_knife_round++
    // variable value reached our cvar number ?
    if (g_knife_round >= get_pcvar_num(cvar_knife_round))
    {
        // Start round
        g_is_knife_round = true
        g_knife_round = 0
        // looping through all connected players
        new players[32], num
        get_players(players, num, "a")

        for( --num; num >= 0; num-- )
        {
            // take away players weapon
            strip_user_weapons(players[num])
            // give them a knife
            give_item(players[num] , "weapon_knife")
            // set our hud message and show it to them.
            set_hudmessage(HUD_COLOR[0] , HUD_COLOR[1] , HUD_COLOR[2] , HUD_POSITION_X , HUD_POSITION_Y , 0, 8.0, 6.0, 0.3, 0.3, HOLD_TIME)
            show_hudmessage(players[num] , "Knife Only Round!!!")
        }
    }
}

public block_buy()
{
    // is knife round ?
    if (g_is_knife_round)
    {
        // block buy commands
        return PLUGIN_HANDLED
    }
    // allow buy commands
    return PLUGIN_CONTINUE
}

public PlayerTouchArmoury(ent, id)
{
    if (g_is_knife_round)
    {
        return PLUGIN_HANDLED
    }
    return PLUGIN_CONTINUE
}

public PlayerTouchWeaponBox(ent, id)
{
    // player has touched a weapon , when round is knife_round
    if (g_is_knife_round)
    {
        // block weapon pickup
        return PLUGIN_HANDLED
    }
    // allow pick up
    return PLUGIN_CONTINUE
}

// player has touched shield.
public PlayerTouchShield(ent, id)
{
    if (g_is_knife_round)
    {
        return PLUGIN_HANDLED
    }
    return PLUGIN_CONTINUE
}

public event_intermission()
{
    g_is_knife_round = false
    g_knife_round = 0
}
 
Последнее редактирование:
Сообщения
1,293
Реакции
2,294
Помог
57 раз(а)
DrStrange, you mean, you want to reset round counter when restart occurs?

add to plugin_init()
Код:
register_event("TextMsg", "event_restart_game", "a", "2=#Game_Commencing", "2=#Game_will_restart_in")
add to main plugin body
Код:
public event_restart_game() {
    g_knife_round = 0
}
 
Сообщения
213
Реакции
71
Помог
2 раз(а)
Thanks it compiled successfully but as far results are concerned I can't report you them now, since server is empty.

Код:
/*


Knife Round
===========

Description
After every X rounds , an special knife round will occur.
For plugin to work properly add knife_round_delay "10" (what ever number of rounds you want) or use cvar atleast once in server.

*/
#include <amxmodx>
#include <fun>
#include <engine>

// Red , Green , Blue
new const HUD_COLOR[3] = {0 , 255 , 0}

// Hud X position
const Float: HUD_POSITION_X = -1.0
// Hud Y position
const Float: HUD_POSITION_Y = 0.25

// Hud display time
const HOLD_TIME = 10

// buy menu commands
new const g_szBuyCmds[ ][ ] = {
    "usp", "glock", "deagle", "p228", "elites", "fn57", "m3", "xm1014", "mp5", "tmp", "p90", "mac10", "ump45", "ak47", 
    "galil", "famas", "sg552", "m4a1", "aug", "scout", "awp", "g3sg1", "sg550", "m249", "vest", "vesthelm", "flash", "hegren",
    "sgren", "defuser", "nvgs", "shield", "primammo", "secammo", "km45", "9x19mm", "nighthawk", "228compact", "12gauge",
    "autoshotgun", "smg", "mp", "c90", "cv47", "defender", "clarion", "krieg552", "bullpup", "magnum", "d3au1", "krieg550",
    "buyammo1", "buyammo2"
} 

new const VERSION[] = "1.0"

// players class (needed when we want to block weapon pick up)
new const PLAYER_CLASS[] = "player"

// variable to increase value
new g_knife_round

// is knife round ?
new bool: g_is_knife_round

// cvar
new cvar_knife_round

public plugin_init()
{
    register_plugin("Knife Round" , VERSION , "LearninG")
    // looping through buy commands
    for (new i; i<sizeof g_szBuyCmds; i++)
    {
        register_clcmd(g_szBuyCmds[i] , "block_buy")
    }
    // called when user touch weapons , shield ...
    register_touch("armoury_entity", PLAYER_CLASS, "PlayerTouchArmoury")
    register_touch("weaponbox", PLAYER_CLASS, "PlayerTouchWeaponBox")
    register_touch("weapon_shield", PLAYER_CLASS, "PlayerTouchShield")

    // event_new_round
    register_logevent("event_new_round",2,"0=World triggered","1=Round_Start")
    register_event("TextMsg", "event_restart_game", "a", "2=#Game_Commencing", "2=#Game_will_restart_in")
    register_event( "30" , "event_intermission" , "a" )
    register_cvar("knife_round_version", VERSION, FCVAR_SERVER | FCVAR_SPONLY)

    // store cvar in variable
    cvar_knife_round = register_cvar("knife_round_delay" , "10")
}

// called when new round begins
public event_new_round()
{
    g_is_knife_round = false
    // increase variable value by 1
    g_knife_round++
    // variable value reached our cvar number ?
    if (g_knife_round >= get_pcvar_num(cvar_knife_round))
    {
        // Start round
        g_is_knife_round = true
        g_knife_round = 0
        // looping through all connected players
        new players[32], num
        get_players(players, num, "a")

        for( --num; num >= 0; num-- )
        {
            // take away players weapon 
            strip_user_weapons(players[num])
            // give them a knife
            give_item(players[num] , "weapon_knife")
            // set our hud message and show it to them.
            set_hudmessage(HUD_COLOR[0] , HUD_COLOR[1] , HUD_COLOR[2] , HUD_POSITION_X , HUD_POSITION_Y , 0, 8.0, 6.0, 0.3, 0.3, HOLD_TIME)
            show_hudmessage(players[num] , "Special Round- Knife Only Round !!!")
        }
    }
}

public event_restart_game() {
    g_knife_round = 0
}

public block_buy()
{
    // is knife round ?
    if (g_is_knife_round)
    {
        // block buy commands
        return PLUGIN_HANDLED
    }
    // allow buy commands
    return PLUGIN_CONTINUE
}

public PlayerTouchArmoury(ent, id)
{
    if (g_is_knife_round)
    {
        return PLUGIN_HANDLED
    }
    return PLUGIN_CONTINUE
}

public PlayerTouchWeaponBox(ent, id)
{
    // player has touched a weapon , when round is knife_round
    if (g_is_knife_round)
    {
        // block weapon pickup
        return PLUGIN_HANDLED
    }
    // allow pick up
    return PLUGIN_CONTINUE
}

// player has touched shield.
public PlayerTouchShield(ent, id)
{
    if (g_is_knife_round)
    {
        return PLUGIN_HANDLED
    }
    return PLUGIN_CONTINUE
}

public event_intermission()
{
    g_is_knife_round = false
    g_knife_round = 0
}
 
Сообщения
1,293
Реакции
2,294
Помог
57 раз(а)
DrStrange, also
Код:
// Hud display time
const HOLD_TIME = 10
is wrong

Код:
 * @param red           Red component of hudmessage color
 * @param green         Green component of hudmessage color
 * @param blue          Blue component of hudmessage color
 * @param x             Location of the message on the x axis in percent
 * @param y             Location of the message on the y axis in percent
 * @param effects       Display effect
 * @param fxtime        Duration of the effect
 * @param holdtime      Time the message stays on screen
 * @param fadeintime    Time it takes the message to fully appear (fade-in)
 * @param fadeouttime   Time it takes the message to fully disappear (fade-out)
 * @param channel       Channel to use on the client
 *
 * @noreturn
 */
native set_hudmessage(red = 200, green = 100, blue = 0, Float:x = -1.0, Float:y = 0.35, effects = 0, Float:fxtime = 6.0, Float:holdtime = 12.0, Float:fadeintime = 0.1, Float:fadeouttime = 0.2, channel = -1);
as you can see holdtime in not at the end + it is a float value

change
Код:
- const HOLD_TIME = 10
+ const Float:HOLD_TIME = 10.0
+ const HUD_CHANNEL = -1

- set_hudmessage(HUD_COLOR[0] , HUD_COLOR[1] , HUD_COLOR[2] , HUD_POSITION_X , HUD_POSITION_Y , 0, 8.0, 6.0, 0.3, 0.3, HOLD_TIME)
+ set_hudmessage(HUD_COLOR[0] , HUD_COLOR[1] , HUD_COLOR[2] , HUD_POSITION_X , HUD_POSITION_Y , 0, 8.0, HOLD_TIME, 0.3, 0.3, HUD_CHANNEL)
 
Сообщения
213
Реакции
71
Помог
2 раз(а)
DrStrange, also
Код:
// Hud display time
const HOLD_TIME = 10
is wrong

Код:
* @param red           Red component of hudmessage color
* @param green         Green component of hudmessage color
* @param blue          Blue component of hudmessage color
* @param x             Location of the message on the x axis in percent
* @param y             Location of the message on the y axis in percent
* @param effects       Display effect
* @param fxtime        Duration of the effect
* @param holdtime      Time the message stays on screen
* @param fadeintime    Time it takes the message to fully appear (fade-in)
* @param fadeouttime   Time it takes the message to fully disappear (fade-out)
* @param channel       Channel to use on the client
*
* @noreturn
*/
native set_hudmessage(red = 200, green = 100, blue = 0, Float:x = -1.0, Float:y = 0.35, effects = 0, Float:fxtime = 6.0, Float:holdtime = 12.0, Float:fadeintime = 0.1, Float:fadeouttime = 0.2, channel = -1);
as you can see holdtime in not at the end + it is a float value

change
Код:
- const HOLD_TIME = 10
+ const Float:HOLD_TIME = 10.0
+ const HUD_CHANNEL = -1

- set_hudmessage(HUD_COLOR[0] , HUD_COLOR[1] , HUD_COLOR[2] , HUD_POSITION_X , HUD_POSITION_Y , 0, 8.0, 6.0, 0.3, 0.3, HOLD_TIME)
+ set_hudmessage(HUD_COLOR[0] , HUD_COLOR[1] , HUD_COLOR[2] , HUD_POSITION_X , HUD_POSITION_Y , 0, 8.0, HOLD_TIME, 0.3, 0.3, HUD_CHANNEL)
Hy, once again Thanks !! For noticing these small errors, I updated the code.
 
Статус
В этой теме нельзя размещать новые ответы.

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу