Регистр ( MySQL )
#7

как это реализовать?
код:
OnPlayerConnect:
Quote:

new str[128];
mysql_real_escape_string(PlayerName(playerid), PlayerName(playerid));
format(str, sizeof(str),"SELECT `name` FROM "accounts_table" WHERE `name` = '%s'", PlayerName(playerid));
mysql_function_query(connection, str, true, "OnPlayerRegCheck","d", playerid);

Quote:

forward OnPlayerRegCheck(playerid);
public OnPlayerRegCheck(playerid)
{
if(IsPlayerConnected(playerid))
{
new rows, fields;
cache_get_data(rows, fields);
if(rows)
{
//login dialog
}
else //register dialog
}
return 1;
}

Reply


Messages In This Thread
Регистр ( MySQL ) - by CamperGTA - 19.03.2013, 02:27
Re: Регистр ( MySQL ) - by CamperGTA - 23.03.2013, 20:16
Re: Регистр ( MySQL ) - by AirKite - 23.03.2013, 20:19
Re: Регистр ( MySQL ) - by Stepashka - 23.03.2013, 20:28
Re: Регистр ( MySQL ) - by AirKite - 23.03.2013, 23:20
Re: Регистр ( MySQL ) - by CamperGTA - 24.03.2013, 04:11
Re: Регистр ( MySQL ) - by CamperGTA - 24.03.2013, 04:13
Re: Регистр ( MySQL ) - by Jon_De - 24.03.2013, 06:04
Re: Регистр ( MySQL ) - by Stepashka - 24.03.2013, 06:35
Re: Регистр ( MySQL ) - by AirKite - 24.03.2013, 09:47

Forum Jump:


Users browsing this thread: 3 Guest(s)