Burgershot
  • Home
  • Members
  • Team
  • Help
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Burgershot SA-MP General Discussions Whitelist System

 
  • 0 Vote(s) - 0 Average
Whitelist System
Genon_May
Offline

Burgershot Member
Posts: 2
Threads: 1
Joined: Mar 2021
Reputation: 0
#1
2021-03-23, 08:42 AM
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
Pinch
Offline

Burgershot Member
Posts: 391
Threads: 19
Joined: Apr 2019
Reputation: 22
Location: Belgrade, Serbia
#2
2021-03-23, 10:02 AM
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.
RhaegarX
Offline

Burgershot Member
Posts: 66
Threads: 12
Joined: Nov 2020
Reputation: 4
#3
2021-03-23, 12:37 PM
(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(playerid, str, sizeof(str));
      mysql_format(ConexaoSQL, query, sizeof(query), "SELECT `*` FROM `whitelist` WHERE `ip` = '%s'", str);
      mysql_tquery(ConexaoSQL, query, "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;
} 
Genon_May
Offline

Burgershot Member
Posts: 2
Threads: 1
Joined: Mar 2021
Reputation: 0
#4
2021-03-23, 03:05 PM
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.
« Next Oldest | Next Newest »



  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Burgershot - Powered by our Community and MyBB Original Theme by Emerald

Linear Mode
Threaded Mode