Raised This Month: $51 Target: $400
 12% 

showsynchud issue


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Usama Ali
Member
Join Date: Apr 2020
Old 06-01-2022 , 06:07   showsynchud issue
Reply With Quote #1

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

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

i want to use the following mod: https://zppv.boards.net/thread/305/z...2-fixed-addons
Usama Ali is offline
lexzor
Veteran Member
Join Date: Nov 2020
Old 06-01-2022 , 06:11   Re: showsynchud issue
Reply With Quote #2

You use the created hud object before actually creating it
lexzor is offline
Usama Ali
Member
Join Date: Apr 2020
Old 06-02-2022 , 06:04   Re: showsynchud issue
Reply With Quote #3

how can i fix it? please explain
Usama Ali is offline
lexzor
Veteran Member
Join Date: Nov 2020
Old 06-02-2022 , 06:29   Re: showsynchud issue
Reply With Quote #4

Create the hud object before using it :-s

Last edited by lexzor; 06-02-2022 at 06:29.
lexzor is offline
Usama Ali
Member
Join Date: Apr 2020
Old 06-02-2022 , 08:15   Re: showsynchud issue
Reply With Quote #5

im very new to all of this, can you explain briefly would be much appreciated
Usama Ali is offline
lexzor
Veteran Member
Join Date: Nov 2020
Old 06-02-2022 , 10:34   Re: showsynchud issue
Reply With Quote #6

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

Last edited by lexzor; 06-02-2022 at 10:34.
lexzor is offline
Usama Ali
Member
Join Date: Apr 2020
Old 10-08-2022 , 20:26   Re: showsynchud issue
Reply With Quote #7

Quote:
Originally Posted by lexzor View Post
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.
Attached Files
File Type: sma Get Plugin or Get Source (zombie_escape_v2.3.sma - 39 views - 71.8 KB)
Usama Ali is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:18.


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