20.02.2016, 12:51
GM Roleplay:
їhelp mysql ucp register and login?
ї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(playerid, DIALOG_LOGIN, DIALOG_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;
}