Quote:
Originally Posted by Shinja
PHP код:
forward LoadAccount(playerid);
public LoadAccount(playerid)
{
PlayerInfo[playerid][ID] = cache_insert_id();
cache_get_field_content(0, "Name", PlayerInfo[playerid][Name]);
cache_get_field_content(0, "Password", PlayerInfo[playerid][Password]);
PlayerInfo[playerid][Cash] = cache_get_field_content_int(0, "Cash");
SetSpawnInfo( playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0 );
SpawnPlayer(playerid);
return 1;
}
|
Actually he was doing
PHP код:
cache_get_field_content(1, "Name", PlayerInfo[playerid][Name]);
cache_get_field_content(2, "Password", PlayerInfo[playerid][Password]);
PlayerInfo[playerid][Cash] = cache_get_field_content_int(3, "Cash");
He think its field number, no its row so must be 0, hmm thanks for your advice about insert id