AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   weird problem (https://forums.alliedmods.net/showthread.php?t=335947)

Plut0 01-15-2022 20:20

weird problem
 
3 Attachment(s)
Im using a respawn menu with this buymenu from https://forums.alliedmods.net/showthread.php?t=87776
im pretty sure they use natives from cstrike.inc but in game when i try to buy respawn it says i dont have the money and shows $0 in the respawn menu mean while i have like 20k in the bottom right

OciXCrom 01-16-2022 08:17

Re: weird problem
 
The plugin from the link sets the player's money to 0 and uses a fake message to display a different amount in the bottom-right corner that cannot be retrieved with cstrike.inc's money functions.

Try replacing every instance of sending the "g_MsgMoney" message in the .sma like this:

Code:
message_begin(MSG_ONE_UNRELIABLE, g_MsgMoney, _, id) write_long(zp_cs_player_money[id]); write_byte(1); message_end();

To:

Code:
emessage_begin(MSG_ONE_UNRELIABLE, g_MsgMoney, _, id) ewrite_long(zp_cs_player_money[id]); ewrite_byte(1); emessage_end();

Just add "e" in front of every function between "message_begin" and "message_end".

The difference between "message" and "emessage" is that the latter can be detected by other plugins.

Plut0 01-16-2022 10:21

Re: weird problem
 
Quote:

Originally Posted by OciXCrom (Post 2768562)
The plugin from the link sets the player's money to 0 and uses a fake message to display a different amount in the bottom-right corner that cannot be retrieved with cstrike.inc's money functions.

Try replacing every instance of sending the "g_MsgMoney" message in the .sma like this:

Code:
message_begin(MSG_ONE_UNRELIABLE, g_MsgMoney, _, id) write_long(zp_cs_player_money[id]); write_byte(1); message_end();

To:

Code:
emessage_begin(MSG_ONE_UNRELIABLE, g_MsgMoney, _, id) ewrite_long(zp_cs_player_money[id]); ewrite_byte(1); emessage_end();

Just add "e" in front of every function between "message_begin" and "message_end".

The difference between "message" and "emessage" is that the latter can be detected by other plugins.

I dont know if im blind but I cant find it in neither .sma even tried ctrl + f to search

OciXCrom 01-16-2022 10:54

Re: weird problem
 
I'm talking about the buymenu from the link.

Plut0 01-16-2022 12:05

Re: weird problem
 
tried it still the same..


All times are GMT -4. The time now is 11:29.

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