FS Whitelist SAMP

Pinch
Offline
FS Whitelist SAMP

Burgershot Member
Posts: 388
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
FS Whitelist SAMP

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:
publicOnPlayerConnect(playerid)
{
newquery[60],str[16];
//SQLquerythatchecksiftheplayer'sIPisinthewhitelisttable
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);
}

forwardOnVerifiedWhiteList(playerid);
public
OnVerifiedWhiteList(playerid)
{
//iftheplayerisonthewhitelist
if(cache_num_rows()>0)
{
//PlayerLogin
}
//iftheplayerisnotonthewhitelist
else
{
Kick(playerid);
}
return1;
}