View Single Post
QuantumToast
Member
Join Date: May 2017
Location: US
Old 06-16-2017 , 18:28   Re: Infractions - The Early Stages
Reply With Quote #28

Quote:
Originally Posted by Chaosxk View Post
You have a mix between old/new syntax, should be something like this for new:
PHP Code:
public Action Event_PlayerConnect(Event event, const char[] namebool dontBroadcast)
{
    
int index event.GetInt("index");
    
int client GetClientOfUserId(event.GetInt("userid"));
    
    
//do something

I apologize, I am not actually using the old format, I directly copy/pasted that from someone else's old plugin source, after searching around for some examples of player_connect event hooks :/ But thank you for making sure I was on the right track!

Also, regarding the last two arguments, what exactly are they used for? The API is great and all for finding the correct functions and syntaxes, but it has fairly poor descriptions of what the function is used for or what it even does. It also has no examples, just definitions for mostly everything :/

Quote:
Originally Posted by Chaosxk View Post
Well try it out and adjust if your missing something.
I haven't even begun to set up a SQL database yet, so I can't really test it. I have zero experience with it, but some nice people have posted some examples and links to get me started. It'll be slow progress since I'll be busy this weekend.

Last edited by QuantumToast; 06-16-2017 at 18:30.
QuantumToast is offline