Raised This Month: $ Target: $400
 0% 

Handle joins to server


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
wpf
New Member
Join Date: Apr 2007
Old 04-10-2007 , 16:34   Handle joins to server
Reply With Quote #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?
wpf 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 06:33.


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