20.07.2012, 16:46
In OnPlayerKeyStateChange() you did not return code execution after ExitHouse() and ExitBusiness() so do:
if(IsPlayerNearPoint(2.0, playerid, hInfo[i][InteriorX], hInfo[i][InteriorY], hInfo[i][InteriorZ])) {
ExitHouse(playerid, i);
return 1;
}
and do:
if(IsPlayerNearPoint(2.0, playerid, bInfo[i][bInteriorX], bInfo[i][bInteriorY], bInfo[i][bInteriorZ])) {
ExitBusiness(playerid, i);
return 1;
}
See what happends in your script after these changes. This also makes your script faster because unnecessary for loops are cut out in the code execution.
if(IsPlayerNearPoint(2.0, playerid, hInfo[i][InteriorX], hInfo[i][InteriorY], hInfo[i][InteriorZ])) {
ExitHouse(playerid, i);
return 1;
}
and do:
if(IsPlayerNearPoint(2.0, playerid, bInfo[i][bInteriorX], bInfo[i][bInteriorY], bInfo[i][bInteriorZ])) {
ExitBusiness(playerid, i);
return 1;
}
See what happends in your script after these changes. This also makes your script faster because unnecessary for loops are cut out in the code execution.