House Question
#1

Hello,

pawn Код:
hBuyer[MAX_PLAYER_NAME],
I have that, how would I use that to check if the player using the command /rentable is the owner or not? Thanks.
Reply
#2

pawn Код:
stock IsPlayerOwner()
{
     if(hBuyer[playerid] != houseowner) // you have to use your house var or enum to make it also loop all houses
     {
          return 1;
     }
     return 0;
}
Reply
#3

..No that isnt what I am looking for, I want umm something like this:
pawn Код:
if(HouseInfo[idx][hOwner] == playername)
This is my hOwner thing:
pawn Код:
strmid(HouseInfo[idx][hOwner], arrCoords[8], 0, strlen(arrCoords[8]), 255);
Would that kind of thing work, and how would I script it?
Reply
#4

Got the same problem.
Reply
#5

For comparing string.
https://sampwiki.blast.hk/wiki/Strcmp
Reply
#6

No but I am saying what is a way to check if a house is owned by a player or not with my current code?
Reply
#7

Yes it is.
pawn Код:
if(!strcmp(HouseInfo[idx][hOwner],playername));
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)