31.03.2009, 19:03
this is my king of levels
stock db_Get(tablename[], key[], titul[], value[])
{
format(DBQuery, sizeof(DBQuery), "SELECT %s FROM %s WHERE LOWER(%s) = LOWER('%s') LIMIT 1;", key, tablename, titul,value);
Result = db_query(DataBase, DBQuery);
db_get_field(Result, 0, DBQuery, 256);
db_free_result(Result);
return DBQuery;
}
PlayerInform[playerid][Level] = strval(db_Get("Players", "Level", "Name", db_GetPlayerName(playerid)));
and all =)
stock db_Get(tablename[], key[], titul[], value[])
{
format(DBQuery, sizeof(DBQuery), "SELECT %s FROM %s WHERE LOWER(%s) = LOWER('%s') LIMIT 1;", key, tablename, titul,value);
Result = db_query(DataBase, DBQuery);
db_get_field(Result, 0, DBQuery, 256);
db_free_result(Result);
return DBQuery;
}
PlayerInform[playerid][Level] = strval(db_Get("Players", "Level", "Name", db_GetPlayerName(playerid)));
and all =)