24.03.2013, 04:13
как это реализовать?
код:
OnPlayerConnect:
код:
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; } |