• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Whitelist System
#1
Hey, im wondering does anyone know where i can find a whitelist system for samp. There used to be a few on the samp forums but cant reach them right now since they are down. If anyone knows where i can find one (english version) i would be very grateful
  Reply
#2
I don't have one, you can check the old forum's web archive but why don't you just create one yourself? It's like 7-8 minutes max (including time it takes to create a table)
Using Pawn.CMD?

If you're doing so, this is the very first sign that you absolutely shouldn't utilize your all powerful P-Code knowledge in any of the scripting discussion topics.
  Reply
#3
(2021-03-23, 08:42 AM)Genon_May Wrote: Hey, im wondering does anyone know where i can find a whitelist system for samp. There used to be a few on the samp forums but cant reach them right now since they are down. If anyone knows where i can find one (english version) i would be very grateful



If you use MySQL, the initial logic of the system would be this:

PHP Code:
public OnPlayerConnect(playerid)

{

? ? ? new 
query[60], str[16];

? ? ? 
//?SQL query that checks if the player's IP is in the whitelist table

? ? ??GetPlayerIp(playeridstrsizeof(str));

? ? ? 
mysql_format(ConexaoSQLquerysizeof(query), "SELECT `*` FROM `whitelist` WHERE `ip` = '%s'"str);

? ? ? 
mysql_tquery(ConexaoSQLquery"OnVerifiedWhiteList""i"playerid);

}



forward OnVerifiedWhiteList(playerid);

public 
OnVerifiedWhiteList(playerid)

{

? ? 
// if the player is on the whitelist

? ? if (cache_num_rows() > 0)

? ? {

? ? ? ? 
// Player Login

? ? }

? ? 
// if the player is not on the whitelist

? ? else

? ? {

? ? ? ? 
Kick(playerid);

? ? }

? ? return 
1;


  Reply
#4
Hey thanks for trying to help me i really appreciate it. I found one already today after 1 hour of googling xd, already implemented on my server, sorry for the incovenience.
  Reply


Forum Jump: