SA-MP Forums Archive
їhelp mysql ucp register and login? - 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: їhelp mysql ucp register and login? (/showthread.php?tid=601358)



їhelp mysql ucp register and login? - Tween73 - 20.02.2016

GM Roleplay:
їhelp mysql ucp register and login?

PHP Code:
#include <a_mysql>
new Register[MAX_PLAYERS];
new 
Login[MAX_PLAYERS];
#define mysql_hostname  "localhost"
#define mysql_username  "root" 
#define mysql_password  "" 
#define mysql_database  "GM-RP"
public OnPlayerConnect(playerid)
{
    if(
Login[playerid] == 1)
    {
        
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_PASSWORD"GM Roleplay | Login""your password""Login""Quit");
    } 
        else 
    { 
    if(
Register[playerid] == 0)
    {
        
SendClientMessage(playerid, -1" website: localhost/register.php ");
        
Kick(playerid);
    }
    return 
1;