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

OciXCrom's Rank System [XP|Levels|Ranks]


Post New Thread Reply   
 
Thread Tools Display Modes
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-18-2021 , 17:51   Re: OciXCrom's Rank System [XP|Levels|Ranks]
Reply With Quote #601

I made the check the wrong way around. Check now, I updated my code.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
karaulov
Senior Member
Join Date: Jul 2018
Old 03-20-2021 , 04:55   Re: OciXCrom's Rank System [XP|Levels|Ranks]
Reply With Quote #602

@OciXCrom, you use SQL_ExecuteQuery in "Load data" function, this is not async, if latency between game server and mysql > 10ms, in game can be lags. You can fix it ?
karaulov is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-20-2021 , 09:28   Re: OciXCrom's Rank System [XP|Levels|Ranks]
Reply With Quote #603

Quote:
Originally Posted by karaulov View Post
@OciXCrom, you use SQL_ExecuteQuery in "Load data" function, this is not async, if latency between game server and mysql > 10ms, in game can be lags. You can fix it ?
Which one is async? And what would happen if it fails to connect to the server? Pretty sure that would lead do data loss.
__________________

Last edited by OciXCrom; 03-20-2021 at 09:28.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
karaulov
Senior Member
Join Date: Jul 2018
Old 03-21-2021 , 00:00   Re: OciXCrom's Rank System [XP|Levels|Ranks]
Reply With Quote #604

@OciXCrom, you use SQL_Execute twice in plugin when player join to server or change name. If mysql server has delay 50ms, it takes 100ms time (server just stop work at 100ms).

It also can be used for ddos attack to server (auto change name hack).

Last edited by karaulov; 03-21-2021 at 00:01.
karaulov is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-21-2021 , 08:41   Re: OciXCrom's Rank System [XP|Levels|Ranks]
Reply With Quote #605

Alright, I see what you mean. Looks like SQL_ThreadQuery is what you're looking for.

Quote:
SQL_ThreadQuery > Note

This will not interrupt gameplay in the event of a poor/lossed
connection, however, the interface is more complicated and
asynchronous. Furthermore, a new connection/disconnection is
made for each query to simplify driver support.
I will switch the functions and test this out very soon.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Will2
Junior Member
Join Date: Jan 2021
Old 03-22-2021 , 14:23   Re: OciXCrom's Rank System [XP|Levels|Ranks]
Reply With Quote #606

Quote:
Originally Posted by OciXCrom View Post
I made the check the wrong way around. Check now, I updated my code.
It still doesn't work.
Will2 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-22-2021 , 14:43   Re: OciXCrom's Rank System [XP|Levels|Ranks]
Reply With Quote #607

Code:
#include <amxmodx> #include <crxranks> #include <fakemeta> #if !defined MAX_PLAYERS const MAX_PLAYERS = 32 #endif const SPEAK_LEVEL = 5 new g_iLevel[MAX_PLAYERS + 1] public plugin_init() {     register_plugin("CRXRanks: Speak On Level", "1.0", "OciXCrom")     register_forward(FM_Voice_SetClientListening, "OnPlayerTalk") } public OnPlayerTalk(iReceiver, iSender) {     if(g_iLevel[iSender] < SPEAK_LEVEL)     {         engfunc(EngFunc_SetClientListening, iReceiver, iSender, 0)         return FMRES_SUPERCEDE     }         return FMRES_IGNORED } public crxranks_user_level_updated(id, iLevel) {     g_iLevel[id] = iLevel }
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Nito
Junior Member
Join Date: Jun 2017
Old 03-23-2021 , 12:46   Re: OciXCrom's Rank System [XP|Levels|Ranks]
Reply With Quote #608

I have one little problem. When someone reaches for example 30 lvl in the new round he gets ''S'' flag like i set up, but when the map changes ''S'' flag disappears. Can sameone help me? I just need it to stay for next reset (1st day every month).
Nito is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-23-2021 , 15:10   Re: OciXCrom's Rank System [XP|Levels|Ranks]
Reply With Quote #609

Are you using AMXBans or some other admin privilege system?
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Will2
Junior Member
Join Date: Jan 2021
Old 03-23-2021 , 15:40   Re: OciXCrom's Rank System [XP|Levels|Ranks]
Reply With Quote #610

Quote:
Originally Posted by OciXCrom View Post
Code:
#include <amxmodx> #include <crxranks> #include <fakemeta> #if !defined MAX_PLAYERS const MAX_PLAYERS = 32 #endif const SPEAK_LEVEL = 5 new g_iLevel[MAX_PLAYERS + 1] public plugin_init() {     register_plugin("CRXRanks: Speak On Level", "1.0", "OciXCrom")     register_forward(FM_Voice_SetClientListening, "OnPlayerTalk") } public OnPlayerTalk(iReceiver, iSender) {     if(g_iLevel[iSender] < SPEAK_LEVEL)     {         engfunc(EngFunc_SetClientListening, iReceiver, iSender, 0)         return FMRES_SUPERCEDE     }         return FMRES_IGNORED } public crxranks_user_level_updated(id, iLevel) {     g_iLevel[id] = iLevel }

Very good, it works now. Thank you for your help!
Will2 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 00:20.


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