- Регистрация
- 29 Авг 2018
- Сообщения
- 89
- Лучшие ответы
- 0
- Репутация
- 1
PHP:
stock LoadPlayerData(playerid)
{
new rowss, datapost[50];
mysql_format(MySQL, m_string, sizeof(m_string), "SELECT * FROM `accounts` WHERE `ID` = '%d'",player_info[playerid][ID]);
new Cache:result = mysql_query(MySQL, m_string);
cache_get_row_count(rowss);
if(rowss)
{
cache_get_field_content_int(0, "ID",player_info[playerid][ID]);
cache_get_field_content(0, "NAME", player_info[playerid][NAME], 24);
cache_get_field_content(0, "EMAIL", player_info[playerid][EMAIL], 50);
cache_get_field_content_int(0, "SEX", player_info[playerid][SEX]);
cache_get_field_content(0, "REF", player_info[playerid][REF],24);
cache_get_field_content_int(0, "SKIN", player_info[playerid][SKIN]);
cache_get_field_content(0, "REGIP", player_info[playerid][REGIP], 16);
cache_get_field_content(0, "REGDATE", player_info[playerid][REGDATE], 32);
cache_delete(result);
new dates[12], y, m, d, ip[24];
GetPlayerIp(playerid,ip,24);
getdate(y, m, d);
format(datapost,sizeof(datapost),"%s %s", GetFixDate(), GetFixTime());
mysql_format(MySQL, m_string, sizeof(m_string),"UPDATE `accounts` SET `LASTIP` = '%s', `LASTDATE` = '%s' WHERE `NAME`='%s'", ip, dates, player_info[playerid][NAME]);
mysql_query(MySQL, m_string);
LoginPlayer(playerid);
}
else NewKick(playerid);
return true;
}