07.06.2012, 12:18
Well.. i've tried multiple times but it doesn't want to work..
Dunno what's wrong - it compile fine but when i try it IG nothing happens
PHP код:
if(strcmp(cmd, "/exit", true) == 0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
for(new i = 0; i < sizeof(BizzInfo); i++)
{
if(IsPlayerInRangeOfPoint( playerid, 5.0, BizzInfo[PlayerInfo[playerid][InBusiness]][bExitX], BizzInfo[PlayerInfo[playerid][InBusiness]][bExitY], BizzInfo[PlayerInfo[playerid][InBusiness]][bExitZ]))
{
if(GetPlayerVirtualWorld( playerid ) > 0)
{
if(PlayerInfo[playerid][InBusiness] != 0)
{
if(PlayerInfo[playerid][pMask] == 1)
{
format(string, sizeof(string), "* Stranger has left the business.");
}
else
{
format(string, sizeof(string), "* %s has left the business.", sendername);
}
if(BizzInfo[PlayerInfo[playerid][InBusiness]][bType] == 3)
{
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_DRINK_BEER)
{
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
}
else if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_DRINK_WINE)
{
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
}
else if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_DRINK_SPRUNK)
{
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
}
else if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_SMOKE_CIGGY)
{
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SMOKE_CIGGY);
}
}
else if(BizzInfo[PlayerInfo[playerid][InBusiness]][bType] == 5)
{
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_DRINK_BEER)
{
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
}
else if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_DRINK_WINE)
{
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
}
else if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_DRINK_SPRUNK)
{
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
}
else if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_SMOKE_CIGGY)
{
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SMOKE_CIGGY);
}
}
else if(BizzInfo[PlayerInfo[playerid][InBusiness]][bType] == 7)
{
TogglePlayerControllable(playerid, 1);
SetPlayerArmour(playerid, pKevlar[playerid]);
SetPlayerHealth(playerid, pHP[playerid]);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
PlayerInfo[playerid][pVirtualWorld] = 0;
SetPlayerVirtualWorld( playerid, 0);
SetPlayerInterior( playerid, BizzInfo[PlayerInfo[playerid][InBusiness]][bExteriorID]);
SetPlayerPos( playerid, BizzInfo[PlayerInfo[playerid][InBusiness]][bEntranceX], BizzInfo[PlayerInfo[playerid][InBusiness]][bEntranceY], BizzInfo[PlayerInfo[playerid][InBusiness]][bEntranceZ]);
PlayerInfo[playerid][InBusiness] = 0;
StopAudioStreamForPlayer(playerid);
}
}
else
{
if(PlayerInfo[playerid][pMask] == 1)
{
format(string, sizeof(string), "* Stranger has left the business.");
}
else
{
format(string, sizeof(string), "* %s has left the business.", sendername);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
PlayerInfo[playerid][pVirtualWorld] = 0;
SetPlayerVirtualWorld( playerid, 0 );
SetPlayerInterior( playerid, BizzInfo[i][bExteriorID]);
SetPlayerPos( playerid, BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]);
}
}
}
for(new i = 0; i < sizeof(HouseInfo); i++)
{
if(IsPlayerInRangeOfPoint(playerid, 3, HouseInfo[PlayerInfo[playerid][InHouse]][hInteriorX], HouseInfo[PlayerInfo[playerid][InHouse]][hInteriorY], HouseInfo[PlayerInfo[playerid][InHouse]][hInteriorZ]))
{
if(GetPlayerVirtualWorld(playerid) > 0)
{
if(PlayerInfo[playerid][InHouse] != 0)
{
if(PlayerInfo[playerid][pMask] == 1)
{
format(string, sizeof(string), "* Stranger has left the house.");
}
else
{
format(string, sizeof(string), "* %s has left the house.", sendername);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
PlayerInfo[playerid][pVirtualWorld] = 0;
SetPlayerVirtualWorld( playerid, 0 );
SetPlayerInterior( playerid, HouseInfo[PlayerInfo[playerid][InHouse]][hExteriorID]);
SetPlayerPos( playerid, HouseInfo[PlayerInfo[playerid][InHouse]][hExteriorX], HouseInfo[PlayerInfo[playerid][InHouse]][hExteriorY], HouseInfo[PlayerInfo[playerid][InHouse]][hExteriorZ]);
PlayerInfo[playerid][InHouse] = 0;
}
else
{
if(PlayerInfo[playerid][pMask] == 1)
{
format(string, sizeof(string), "* Stranger has left the house.");
}
else
{
format(string, sizeof(string), "* %s has left the house.", sendername);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
PlayerInfo[playerid][pVirtualWorld] = 0;
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, HouseInfo[i][hExteriorID]);
SetPlayerPos(playerid, HouseInfo[i][hExteriorX], HouseInfo[i][hExteriorY], HouseInfo[i][hExteriorZ]);
}
StopAudioStreamForPlayer(playerid);
}
}
}
for(new i = 0; i < sizeof(GarageInfo); i++)
{
if(IsPlayerInRangeOfPoint(playerid, 3, GarageInfo[PlayerInfo[playerid][InGarage]][gInteriorX], GarageInfo[PlayerInfo[playerid][InGarage]][gInteriorY], GarageInfo[PlayerInfo[playerid][InGarage]][gInteriorZ]))
{
if(GetPlayerVirtualWorld(playerid) > 0)
{
if(PlayerInfo[playerid][InGarage] != 0)
{
if(PlayerInfo[playerid][pMask] == 1)
{
format(string, sizeof(string), "* Stranger has left the Garage.");
}
else
{
format(string, sizeof(string), "* %s has left the Garage.", sendername);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
PlayerInfo[playerid][pVirtualWorld] = 0;
if(IsPlayerInAnyVehicle(playerid))
{
SetVehiclePos(GetPlayerVehicleID(playerid), GarageInfo[PlayerInfo[playerid][InGarage]][gExteriorX], GarageInfo[PlayerInfo[playerid][InGarage]][gExteriorY], GarageInfo[PlayerInfo[playerid][InGarage]][gExteriorZ]);
SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), 0);
LinkVehicleToInterior(GetPlayerVehicleID(playerid),0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
}
else
{
SetPlayerVirtualWorld( playerid, 0 );
SetPlayerInterior( playerid, GarageInfo[PlayerInfo[playerid][InGarage]][gExteriorID]);
SetPlayerPos( playerid, GarageInfo[PlayerInfo[playerid][InGarage]][gExteriorX], GarageInfo[PlayerInfo[playerid][InGarage]][gExteriorY], GarageInfo[PlayerInfo[playerid][InGarage]][gExteriorZ]);
}
PlayerInfo[playerid][InGarage] = 0;
}
else
{
if(PlayerInfo[playerid][pMask] == 1)
{
format(string, sizeof(string), "* Stranger has left the Garage.");
}
else
{
format(string, sizeof(string), "* %s has left the Garage.", sendername);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
PlayerInfo[playerid][pVirtualWorld] = 0;
if(IsPlayerInAnyVehicle(playerid))
{
SetVehiclePos(GetPlayerVehicleID(playerid), GarageInfo[PlayerInfo[playerid][InGarage]][gExteriorX], GarageInfo[PlayerInfo[playerid][InGarage]][gExteriorY], GarageInfo[PlayerInfo[playerid][InGarage]][gExteriorZ]);
SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), 0);
LinkVehicleToInterior(GetPlayerVehicleID(playerid),0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
}
else
{
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, GarageInfo[i][gExteriorX], GarageInfo[i][gExteriorY], GarageInfo[i][gExteriorZ]);
}
PlayerInfo[playerid][InGarage] = 0;
}
StopAudioStreamForPlayer(playerid);
}
}
}
for(new i = 0; i < sizeof(BInfo); i++)
{
if(IsPlayerInRangeOfPoint(playerid, 3, BInfo[PlayerInfo[playerid][Inbuilding]][bInteriorX], BInfo[PlayerInfo[playerid][Inbuilding]][bInteriorY], BInfo[i][bInteriorZ]))
{
if(GetPlayerInterior(playerid) == BInfo[PlayerInfo[playerid][Inbuilding]][bInteriorID] && GetPlayerVirtualWorld(playerid) >= 0)
{
if(PlayerInfo[playerid][Inbuilding] != 0)
{
PlayerInfo[playerid][pVirtualWorld] = 0;
SetPlayerVirtualWorld( playerid, 0 );
SetPlayerInterior( playerid, BInfo[PlayerInfo[playerid][Inbuilding]][bExteriorID]);
SetPlayerPos( playerid, BInfo[PlayerInfo[playerid][Inbuilding]][bExteriorX], BInfo[PlayerInfo[playerid][Inbuilding]][bExteriorY], BInfo[PlayerInfo[playerid][Inbuilding]][bExteriorZ]);
PlayerInfo[playerid][Inbuilding] = 0;
StopAudioStreamForPlayer(playerid);
}
else
{
PlayerInfo[playerid][pVirtualWorld] = 0;
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, BInfo[i][bExteriorID]);
SetPlayerPos(playerid, BInfo[i][bExteriorX], BInfo[i][bExteriorY], BInfo[i][bExteriorZ]);
}
}
}
}
}
}
return 1;
}