06.12.2015, 12:51
How to restrict player to enter house if it is not his own?
What i am using now is doing vice versa and i don't know why.
I want to check if houseownerid is the same as playerid(from table accounts)
so i am using the same variables
is there other way i can do it?
now with that way it doesn't allow me even if i am the owner of the house
What i am using now is doing vice versa and i don't know why.
I want to check if houseownerid is the same as playerid(from table accounts)
so i am using the same variables
is there other way i can do it?
PHP код:
else if(IsPlayerInRangeOfPoint(playerid, 2.0, HouseInfo[hid][XEnt],HouseInfo[hid][YEnt],HouseInfo[hid][ZEnt])) //enter house!
{
if((pinfo[playerid][ID] != HouseInfo[hid][HOwnerID]) && (HouseInfo[hid][HOwned]) == 1) return SendClientMessage(playerid, -1, ""COL_RED"SERVER"COL_WHITE":You cant enter the house since it's not yours!");
EnterHouse(playerid,hid);
}