AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   showsynchud issue (https://forums.alliedmods.net/showthread.php?t=338030)

Usama Ali 06-01-2022 06:07

showsynchud issue
 
i want to use zombie escape v2.3 but it does not work and shows the following problem

L 06/01/2022 - 15:02:36: [AMXX] Run time error 10 (plugin "zombie_escape_v2.3.amxx") (native "ShowSyncHudMsg") - debug not enabled!
L 06/01/2022 - 15:02:36: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 06/01/2022 - 15:02:36: HudSyncObject -1 is invalid

i want to use the following mod: https://zppv.boards.net/thread/305/z...2-fixed-addons

lexzor 06-01-2022 06:11

Re: showsynchud issue
 
You use the created hud object before actually creating it

Usama Ali 06-02-2022 06:04

Re: showsynchud issue
 
how can i fix it? please explain

lexzor 06-02-2022 06:29

Re: showsynchud issue
 
Create the hud object before using it :-s

Usama Ali 06-02-2022 08:15

Re: showsynchud issue
 
im very new to all of this, can you explain briefly would be much appreciated

lexzor 06-02-2022 10:34

Re: showsynchud issue
 
PHP Code:

#include <amxmodx>

new g_hudsyncobject// this is the variable where we store the handle of created hud sync obj

public plugin_init()
{
    
g_hudsyncobject CreateHudSyncObj() //here we create the hudsyncobject

    
set_task(1.0"show_hud", .flags "b"); //to display your 
}

public 
show_hud()
{
    new 
szMess[192];
    
formatex(szMesscharsmax(szMess), "This is your hud text");
    
set_hudmessage(255,255,255, -1.0, -1.001.01.00.10.1, -1);
    
ShowSyncHudMsg(0g_hudsyncobjectszMess); // here you display your hud text using that object
}

public 
plugin_end()
{
    
ClearSyncHud(0g_hudsyncobject// here you clear the display of hud sync object


above you have an example of how to display a hud message. Related to your issue, you are using ShowSyncHudMsg native BEFORE CreateHudSyncObj. That's why that error persist

Usama Ali 10-08-2022 20:26

Re: showsynchud issue
 
1 Attachment(s)
Quote:

Originally Posted by lexzor (Post 2780772)
PHP Code:

#include <amxmodx>

new g_hudsyncobject// this is the variable where we store the handle of created hud sync obj

public plugin_init()
{
    
g_hudsyncobject CreateHudSyncObj() //here we create the hudsyncobject

    
set_task(1.0"show_hud", .flags "b"); //to display your 
}

public 
show_hud()
{
    new 
szMess[192];
    
formatex(szMesscharsmax(szMess), "This is your hud text");
    
set_hudmessage(255,255,255, -1.0, -1.001.01.00.10.1, -1);
    
ShowSyncHudMsg(0g_hudsyncobjectszMess); // here you display your hud text using that object
}

public 
plugin_end()
{
    
ClearSyncHud(0g_hudsyncobject// here you clear the display of hud sync object


above you have an example of how to display a hud message. Related to your issue, you are using ShowSyncHudMsg native BEFORE CreateHudSyncObj. That's why that error persist

hudobject looks okay here have a look.


All times are GMT -4. The time now is 21:20.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.