stock IsHouseOwner(playerid, h)
{
new szName[32];
GetPlayerName(playerid, szName, 32);
if(!strcmp(HouseInfo[h][h_Owner], szName))
{
return 1;
}
else SendClientMessage(playerid, COLOR_GREY, "{D10D0D}[ERROR]: {FFFFFF}You are not the owner of this house.");
return 0;
}
stock IsHouseOwner(playerid, h) { new szName[32]; GetPlayerName(playerid, szName, 32); if(strcmp(HouseInfo[h][h_Owner], szName)) { return 1; } else SendClientMessage(playerid, COLOR_GREY, "{D10D0D}[ERROR]: {FFFFFF}You are not the owner of this house."); return 0; }
stock IsHouseOwner(playerid, h) { new szName[32]; GetPlayerName(playerid, szName, 32); if(!strcmp(HouseInfo[h][h_Owner], szName)) return SendClientMessage(playerid, COLOR_GREY, "{D10D0D}[ERROR]: {FFFFFF}You are not the owner of this house."); return 1; }
Код:
stock IsHouseOwner(playerid, h) { new szName[32]; GetPlayerName(playerid, szName, 32); if(!strcmp(HouseInfo[h][h_Owner], szName)) return SendClientMessage(playerid, COLOR_GREY, "{D10D0D}[ERROR]: {FFFFFF}You are not the owner of this house."); return 1; } |
stock IsHouseOwner(playerid, h) { new szName[32]; GetPlayerName(playerid, szName, 32); if(strcmp(HouseInfo[h][h_Owner], szName) == 0) return 1; return 0; }
if(!IsHouseOwner(ID ,HOUSE)) return SendClientMessage(playerid, COLOR_GREY, "{D10D0D}[ERROR]: {FFFFFF}You are not the owner of this house."); // rest of your code
stock IsHouseOwner(playerid, h)
{
new szName[32];
GetPlayerName(playerid, szName, 32);
if(!strcmp(HouseInfo[h][h_Owner], szName))
{
return 1;
}
else if(strcmp(HouseInfo[h][h_Owner], szName)) return SendClientMessage(playerid, COLOR_GREY, "{D10D0D}[ERROR]: {FFFFFF}You are not the owner of this house.");
}