PDA

View Full Version : Can't exit


Dziugsas
18/04/2014, 12:16 PM
Hello guys!

I'm having some problem ;/

I can enter ,but when i press ENTER near exit nothing happens.

if (PRESSED(KEY_SECONDARY_ATTACK))
{
new BusID, BusType;
if (GetPlayerVehicleSeat(playerid) == -1)
{
for (new BusSlot; BusSlot < MAX_BUSINESSPERPLAYER; BusSlot++)
{
BusID = PlayerInfo[playerid][Business][BusSlot];
if (BusID != 0)
{
if (IsPlayerInRangeOfPoint(playerid, 2.5, ABusinessData[BusID][BusinessX], ABusinessData[BusID][BusinessY], ABusinessData[BusID][BusinessZ]))
{
BusType = ABusinessData[BusID][BusinessType];
SetPlayerVirtualWorld(playerid, 2000 + BusID);
SetPlayerInterior(playerid, ABusinessInteriors[BusType][InteriorID]);
SetPlayerPos(playerid, ABusinessInteriors[BusType][IntX], ABusinessInteriors[BusType][IntY], ABusinessInteriors[BusType][IntZ]);
PlayerInfo[playerid][CurrentBusiness] = BusID;
SendClientMessage(playerid, 0xFFFFFFFF, "{00FF00}Use {FFFF00}/busmenu{00FF00} to change options for your business");
return 1;
}
}
}
}
else
{
if (IsPlayerInRangeOfPoint(playerid, 5, ABusinessInteriors[BusType][IntX], ABusinessInteriors[BusType][IntY], ABusinessInteriors[BusType][IntZ]))
{
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, ABusinessData[BusID][BusinessX], ABusinessData[BusID][BusinessY], ABusinessData[BusID][BusinessZ]);
PlayerInfo[playerid][CurrentBusiness] = 0;
}
}
}

Dziugsas
18/04/2014, 10:45 PM
Bump