Code:
if(Gates[gate][EGateHouseSQLID] != 0 && !aoverride)
{
new house = houseIDFromSQLID(Gates[gate][EGateHouseSQLID]);
if(house != -1)
{
if(getHouseOwner(house) != 0 && !hasHouseKeys(playerid, house))
{
SendClientMessage(playerid, X11_TOMATO_2, "You don't have access to that gate");
return 1;
}
}
}
this doesn't seem to be working.. anyone can open gate even when HouseSQLID is set here:
Code:
enum EGateInfo {
EGateCmd[32],
EGateModelID,
Float:EGateX,
Float:EGateY,
Float:EGateZ,
Float:EGateRotX,
Float:EGateRotY,
Float:EGateRotZ,
FactionType:EGateFactionType,
EGateJob,
EGateState, //0 if closed, 1 if opened, 2 if disabled, 3 if forced opened
Float:EOpenPosX,
Float:EOpenPosY,
Float:EOpenPosZ,
EGateObjectID,
EGateRoleText[64],
Float:EGateFindDistance,
Float:EGateMoveSpeed,
Float:EGateOpenRotX,
Float:EGateOpenRotY,
Float:EGateOpenRotZ,
EGateInterior,
EGateVW,
EGateFaction,
EGateLastMoveTime, //unix timestamp of last move time
EGateHouseSQLID, //SQLID of the house its associated with
EGateBizSQLID, //SQLID of business
Code:
{"hgate6",971, -1048.2001953125, -1313.9990234375, 131.19999694824, 0.00, 0.00, 0.00,EFactionType_None, -1, 0, 0.0, 0.0, -9.5, 0, "* %s uses %s remote to %s the house gate.",15.0,7.0 , 0.0, 0.0, 0.0,0,0,0,0,1910,-1},