Jump to content
Autentificarea cu Google și Facebook nu mai este disponibilă. ×

Recommended Posts

Posted (edited)

public OnPlayerConnect(playerid) 
{
    new query[128];
    GetPlayerName(playerid, PlayerInfo[playerid][pName], MAX_PLAYER_NAME);
    mysql_format(SQL, query, sizeof(query), "SELECT * FROM `users` WHERE `Name` = '%e' LIMIT 1", PlayerInfo[playerid][pName]);
    mysql_tquery(SQL, query, "OnPlayerDataLoaded", "d", playerid);
    return 1;
}

function OnPlayerDataLoaded(playerid) {
    if(cache_num_rows()) return SCM(playerid, -1, "login");
    else return SCM(playerid, -1, "register");

    return 1;
}

 

Pur si simplu nu imi afiseaza nici-un mesaj din functia OnPlayerDataLoaded ca sa imi pot da seama daca are cont sau nu, tin sa mentionez ca am tabelul users creat si nu exista problema in baza de date. 

 

Folosesc mysql R41-4

Edited by NoName145
Posted

Verifica conexiunea la baza de date la mysql_connect, altceva nu are ce sa fie daca nici in log-uri nu ai nimic presupun.

Posted
11 minutes ago, NoName145 said:

e clear

ce definitie are acel 'function'? eventual verifica sa vezi ce valoare returneaza mysql_tquery

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.