Posts: 176
Threads: 18
Joined: Oct 2011
Reputation:
0
it allows you to continue command ??
explain more please, i am unable to understand your problem.
Posts: 208
Threads: 35
Joined: Dec 2012
Reputation:
0
As in, when I use the command that I use the 'if(IsHouseOwner(playerid, h))', it allowed me to continue what the command is supposed to do, which it shouldn't, since I am not the owner of the house I do it on.
Posts: 208
Threads: 35
Joined: Dec 2012
Reputation:
0
Didn't work, it says I am not the owner of houses I don't own, but it also says I am not the owner of houses I do own
Posts: 632
Threads: 24
Joined: Aug 2011
pawn Код:
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.");
}
Maybe that? I also removed return 0; you can put it back maybe...
EDIT: You used detter's suggestion on your command or stock? If you did it on stock, I'd suggest you use it on commands.