18.06.2015, 11:37
hello guys i need help
house system works fine but business system when i enter to a business samp crashed plz help
house system works fine but business system when i enter to a business samp crashed plz help
pawn Код:
for(new b = 0; b < MAX_BUSINESSES; b++)
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, BusinessData[b][extPos][0], BusinessData[b][extPos][1], BusinessData[b][extPos][2]))
{
if(BusinessData[b][Status] == 1)
return SendPlayerMessage(playerid, "This business is locked.");
SetPlayerInterior(playerid,BusinessData[b][intInterior]);
SetPlayerVirtualWorld(playerid, BusinessData[b][intVW]);
SetPlayerPos(playerid, BusinessData[b][intPos][0], BusinessData[b][intPos][1], BusinessData[b][intPos][2]);
SetPlayerFacingAngle(playerid, BusinessData[b][intPos][3]);
SetPVarInt(playerid, "InsideBusiness", b);
GameTextForPlayer(playerid, "~y~/buy~", 1500, 4);
}
if(IsPlayerInRangeOfPoint(playerid, 2.0, BusinessData[b][intPos][0], BusinessData[b][intPos][1], BusinessData[b][intPos][2]) && GetPlayerInterior(playerid) == BusinessData[b][intInterior] && GetPlayerVirtualWorld(playerid) == BusinessData[b][intVW])
{
SetPlayerPos(playerid, BusinessData[b][extPos][0], BusinessData[b][extPos][1], BusinessData[b][extPos][2]);
SetPlayerFacingAngle(playerid, BusinessData[b][extPos][3]);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPVarInt(playerid, "InsideBusiness", -1);
}
}