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

Infractions - The Early Stages


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
QuantumToast
Member
Join Date: May 2017
Location: US
Old 06-23-2017 , 12:23   Re: Infractions - The Early Stages
Reply With Quote #34

Apologies for the second post so quickly.
Quote:
Originally Posted by Kryptanyte View Post
Just looking at your code I realize you can shorten a function by doing this (that was my bad haha):

*snip*

Otherwise it looks a lot cleaner.

A note when you implement SQL, you want to run threaded queries so using a query instantly won't really work (For threaded queries you pass a callback function to the query and once the query is run it will send the results to said callback function where you can handle them. This prevents hanging in your plugin)

I would say check the player for infractions early so it's (probably) returned the results by the time you want to check the player for infractions. The earliest you can do this would be OnClientAuthorized()
Based on that, if I'm reading correctly, I will have to actually run a query to check for infractions before I actually read that information into PlayerHasInfractions()? I'm trying my best to not be spoonfed, but I think I just have a lot to learn about SQL before this project gains any footing...
QuantumToast is offline
 



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 18:24.


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