hi guys i did this command to see the owner of a house | houseid | lastlogin from the owner , but how i do if the house is not owner to get only House Owner: | and Houseid: | without lastlogin cause the house was not buyed
Код HTML:
CMD:house2(playerid, params[])
{
new house;
if(gLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_ERROR, "You are not logged in.");
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_ERROR, "Your admin level is not high enough to use this command.");
if(sscanf(params,"i",house)) return SendClientMessage(playerid, COLOR_SYN, "Synthax:{FFFFFF} /house <houseid>");
{
if(strlen(HouseInfo[house][hOwner]) < 2) return SendClientMessage(playerid, COLOR_ERROR, "Invalid house id.");
if(PlayerInfo[playerid][pHouseKey] == 0)
{
format(gString, sizeof(gString), "Owner: %s | House id: %d | Last Login: %s", HouseInfo[house][hOwner], house, PlayerInfo[playerid][pLastLogin]);
SendClientMessage(playerid, COLOR_GRAD3, gString);
}
else
{
format(gString, sizeof(gString), "Owner: %s | House id: %d | No Owner", HouseInfo[house][hOwner], house);
SendClientMessage(playerid, COLOR_GRAD3, gString);
}
}
return 1;
}