|
Author
|
Message
|
|
New Member
|

04-10-2007
, 16:34
Handle joins to server
|
#1
|
Hello!
I'm trying to write a script that will handle player joins to my server. I'm totally new to this so I need a little help and maybe a tip (or lots of).
I have a database with X player names. Each name is associated with a clan id. I'm using AMX Mod X. The idea:
When the first player connects, I want to check if his name does exist in the database. If it does, he will automatically be put in CT or T. If not, he will be banned. The next four from his clan will also be put in the same team.
The next player, whose clan id is not equal to the first player's, will be put in the other team, and of course also the four following clan members. If there's empty slots within, say, 5 minutes, everybody will be kicked out.
Now over to the hard part, get it working. I've read the Wiki and docs on amxmodx.org but I cannot figure out when I will check against the database. I need to hook on some event, but cannot find any "join event".
And how do I kick everybody 5 minutes after the first player has joined if there's less than 10 players connected? Can I use the set_task() function for that?
|
|
|
|