27.10.2010, 18:09
Allright so recently I discovered this bug that still let's you lock and unlock the house form the outside but not from the inside in the interior. It says "You locked the house" and "You unlocked the house but still it won't lock the house when you are inside the house.
If I remove all "return 1;" from there it works but then it sends me a triple message saying "You locked the house" or "You unlocked the house"..
Here's the code.
If I remove all "return 1;" from there it works but then it sends me a triple message saying "You locked the house" or "You unlocked the house"..
Here's the code.
pawn Код:
if(dialogid == 20){
if(response == 1)
{
for(new h = 0; h < MAX_HOUSES; h++)
{
if(listitem == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]))
{
HouseInfo[h][hLocked] = 1;
SendClientMessage(playerid, COLOR_RED, "You locked your house.");
return 1;
}
else if(IsPlayerInRangeOfPoint(playerid, 2.0, HouseInfo[h][hExitx], HouseInfo[h][hExity], HouseInfo[h][hExitz]))
{
HouseInfo[h][hLocked] = 1;
SendClientMessage(playerid, COLOR_RED, "You locked your house.");
return 1;
}
}
if(listitem == 1)
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]))
{
HouseInfo[h][hLocked] = 0;
SendClientMessage(playerid, COLOR_RED, "You unlocked your house.");
return 1;
}
else if(IsPlayerInRangeOfPoint(playerid, 2.0, HouseInfo[h][hExitx], HouseInfo[h][hExity], HouseInfo[h][hExitz]))
{
HouseInfo[h][hLocked] = 0;
SendClientMessage(playerid, COLOR_RED, "You unlocked your house.");
return 1;
}
}}}}