How could I go about this? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How could I go about this? (
/showthread.php?tid=603903)
How could I go about this? -
danielpalade - 29.03.2016
I want to make it so when a player connects to the server, it will check the database for all the clan tags on the server. And then it would look through that user's username and if it will detect that clan tag in his username, it would kick him. I just don't know how to do this? Any tips?
Re: How could I go about this? -
introzen - 29.03.2016
I would use a MySQL query to grab the clan tags into an array first thing on
OnGameModeInit, so you have them locally. Then I would use
strfind to search for the clan tag inside the player name on
OnPlayerConnect.
Re: How could I go about this? -
Septikos - 29.03.2016
Quote:
Originally Posted by introzen
I would use a MySQL query to grab the clan tags into an array first thing on OnGameModeInit, so you have them locally. Then I would use strfind to search for the clan tag inside the player name on OnPlayerConnect.
|
I would also advise MySQL, check out this tutorial to get started;
https://sampforum.blast.hk/showthread.php?tid=129183