14.01.2012, 12:10
pawn Код:
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
format(string, sizeof(string), "SELECT Houseowner FROM Houses WHERE ID = '%d'", i);
mysql_query(string);
mysql_store_result();
new howner[MAX_PLAYER_NAME];
mysql_fetch_field("Houseowner", howner);
if(!strcmp(howner, name, false)) { // If the name in the database matches with your name...
// If the player is the owner...
}
else {
// If the player is not the owner...
}
mysql_free_result();