21.06.2016, 10:58
I will perform this function, it recognizes the name on the account number in the database. (encoding declared at the beginning of fashion after the database connection)
stock GetAccountName(account)
{
new name[MAX_PLAYER_NAME];
if(SQL::RowExists("accounts", "ID", account))
{
new handle = SQL::Open(SQL::READ, "accounts", "ID", account);
SQL::ReadString(handle, "Name", name, MAX_PLAYER_NAME);
SQL::Close(handle);
}
return name;
}
The result of "return" is recognized in the "
??"
stock GetAccountName(account)
{
new name[MAX_PLAYER_NAME];
if(SQL::RowExists("accounts", "ID", account))
{
new handle = SQL::Open(SQL::READ, "accounts", "ID", account);
SQL::ReadString(handle, "Name", name, MAX_PLAYER_NAME);
SQL::Close(handle);
}
return name;
}
The result of "return" is recognized in the "

