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;
}
if(strcmp(cmd, "/enter", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new Float:shax, Float:shay, Float:shaz;
new Float:shbx, Float:shby, Float:shbz;
new Float:shcx, Float:shcy, Float:shcz;
GetVehiclePos(EnterableShamals[0], shax, shay, shaz);
GetVehiclePos(EnterableShamals[1], shbx, shby, shbz);
GetVehiclePos(EnterableShamals[2], shcx, shcy, shcz);
for(new i = 0; i < sizeof(HouseInfo); i++)
{
if(IsPlayerInRangeOfPoint(playerid, 3, HouseInfo[i][hExteriorX], HouseInfo[i][hExteriorY], HouseInfo[i][hExteriorZ]))
{
if(GetPlayerVirtualWorld( playerid) == 0)
{
if(HouseInfo[i][hLocked] == 0 || PlayerInfo[playerid][pScrew] >= 1)
{
if(PlayerInfo[playerid][pMask] == 1)
{
format(string, sizeof(string), "* Stranger has entered the house.");
}
else
{
format(string, sizeof(string), "* %s has entered the house.", sendername);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
PlayerInfo[playerid][InHouse] = i;
SetPlayerInterior( playerid, HouseInfo[i][hInteriorID]);
SetPlayerVirtualWorld( playerid, HouseInfo[i][hVirWorld]);
PlayerInfo[playerid][pVirtualWorld] = HouseInfo[i][hVirWorld];
SetPlayerPos( playerid, HouseInfo[i][hInteriorX], HouseInfo[i][hInteriorY], HouseInfo[i][hInteriorZ]);
if(HouseInfo[i][hRadio] > 0 && HouseInfo[i][hRadio] <= RADIOS)
{
new cRadio = HouseInfo[i][hRadio];
switch(cRadio)
{
case 1:
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1281016");
}
case 2:
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1979774");
}
case 3:
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1283687");
}
}
}
for(new x = 0; x <MAX_PLAYERS; x++)
{
new id = PlayerInfo[x][pPhousekey];
if(HouseInfo[id][hAlarmSystem] == 1 && HouseInfo[id][hAlarmNumber] != 0 && AlarmOnline[id] == 0)
{
for(new a = 0; a <MAX_PLAYERS; a++)
{
if(IsPlayerConnected(a))
{
if(PlayerInfo[playerid][pScrew] >= 1 && HouseInfo[i][hLocked] == 1)
{
if(PlayerInfo[a][pPnumber] == HouseInfo[id][hAlarmNumber])
{
new success = random(4);
if(success == 1)
{
format(string, sizeof(string), "House Alarm: Someone has tryed to enter inside the house but failed!");
SendCopMessage(COLOR_DBLUE,string);
PlayerInfo[playerid][pScrew] -= 1;
SendClientMessage(playerid, COLOR_GREY, "You failed to enter inside the house, run!");
format(string, sizeof(string), "SMS: This is an automated message informing you that registrant %s's house alarm has been activated.",GetName(x));
SendClientMessage(a, COLOR_YELLOW, string);
if(IsACop(a))
{
SetPlayerCheckpoint(playerid, HouseInfo[i][hExteriorX], HouseInfo[i][hExteriorY], HouseInfo[i][hExteriorZ], 3.0);
CP[a] = 46488;
}
if(PlayerInfo[playerid][pWantedLevel] <= 6)
{
PlayerInfo[playerid][pWantedLevel] += 1;
SetPlayerWantedLevel(playerid, PlayerInfo[playerid][pWantedLevel]);
}
PlayerInfo[playerid][pVirtualWorld] = 0;
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, HouseInfo[i][hExteriorID]);
SetPlayerPos(playerid, HouseInfo[i][hExteriorX], HouseInfo[i][hExteriorY], HouseInfo[i][hExteriorZ]);
}
else
{
format(string, sizeof(string), "House Alarm: Someone has successfully entered inside the house!");
SendCopMessage(COLOR_DBLUE,string);
PlayerInfo[playerid][pScrew] -= 1;
if(IsACop(a))
{
SetPlayerCheckpoint(playerid, HouseInfo[i][hExteriorX], HouseInfo[i][hExteriorY], HouseInfo[i][hExteriorZ], 3.0);
CP[a] = 46488;
}
if(PlayerInfo[playerid][pWantedLevel] <= 6)
{
PlayerInfo[playerid][pWantedLevel] += 1;
SetPlayerWantedLevel(playerid, PlayerInfo[playerid][pWantedLevel]);
}
SendClientMessage(playerid, COLOR_GREY, "You successfully enter inside the house!");
format(string, sizeof(string), "SMS: This is an automated message informing you that registrant %s's house alarm has been activated.",GetName(x));
SendClientMessage(a, COLOR_YELLOW, string);
}
}
}
}
}
}
}
}
else
{
GameTextForPlayer(playerid, "~r~House is Locked!", 1000, 5);
}
}
}
}
for(new i = 0; i < sizeof(GarageInfo); i++)
{
if(IsPlayerInRangeOfPoint(playerid, 3, GarageInfo[i][gExteriorX], GarageInfo[i][gExteriorY], GarageInfo[i][gExteriorZ]))
{
if(GetPlayerVirtualWorld( playerid) == 0)
{
if(GarageInfo[i][gLocked] == 0 || PlayerInfo[playerid][pScrew] >= 1)
{
if(PlayerInfo[playerid][pMask] == 1)
{
format(string, sizeof(string), "* Stranger has entered the Garage.");
}
else
{
format(string, sizeof(string), "* %s has entered the Garage.", sendername);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
PlayerInfo[playerid][InGarage] = i;
if(IsPlayerInAnyVehicle(playerid))
{
SetVehiclePos(GetPlayerVehicleID(playerid), GarageInfo[i][gInteriorX], GarageInfo[i][gInteriorY], GarageInfo[i][gInteriorZ]);
SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), GarageInfo[i][gVirWorld]);
LinkVehicleToInterior(GetPlayerVehicleID(playerid), GarageInfo[i][gInteriorID]);
SetPlayerInterior( playerid, GarageInfo[i][gInteriorID]);
SetPlayerVirtualWorld( playerid, GarageInfo[i][gVirWorld]);
}
else
{
PlayerInfo[playerid][pVirtualWorld] = GarageInfo[i][gVirWorld];
SetPlayerPos( playerid, GarageInfo[i][gInteriorX], GarageInfo[i][gInteriorY], GarageInfo[i][gInteriorZ]);
SetPlayerInterior( playerid, GarageInfo[i][gInteriorID]);
SetPlayerVirtualWorld( playerid, GarageInfo[i][gVirWorld]);
}
PlayerInfo[playerid][InGarage] = i;
if(GarageInfo[i][gRadio] > 0 && GarageInfo[i][gRadio] <= RADIOS)
{
new cRadio = GarageInfo[i][gRadio];
switch(cRadio)
{
case 1:
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1281016");
}
case 2:
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1979774");
}
case 3:
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, "http://195.242.153.98:9026/listen.pls");
}
}
}
for(new x = 0; x <MAX_PLAYERS; x++)
{
new id = PlayerInfo[x][pPhousekey];
if(GarageInfo[id][gAlarmSystem] == 1 && GarageInfo[id][gAlarmNumber] != 0 && AlarmOnline[id] == 0)
{
for(new a = 0; a <MAX_PLAYERS; a++)
{
if(IsPlayerConnected(a))
{
if(PlayerInfo[playerid][pScrew] >= 1 && GarageInfo[i][gLocked] == 1)
{
if(PlayerInfo[a][pPnumber] == GarageInfo[id][gAlarmNumber])
{
new success = random(4);
if(success == 1)
{
format(string, sizeof(string), "Garage Alarm: Someone has tryed to enter inside the garage but failed!");
SendCopMessage(COLOR_DBLUE,string);
PlayerInfo[playerid][pScrew] -= 1;
SendClientMessage(playerid, COLOR_GREY, "You failed to enter inside the garage, run!");
format(string, sizeof(string), "SMS: This is an automated message informing you that registrant %s's Garage Alarm has been activated.",GetName(x));
SendClientMessage(a, COLOR_YELLOW, string);
if(IsACop(a))
{
SetPlayerCheckpoint(playerid, GarageInfo[i][gExteriorX], GarageInfo[i][gExteriorY], GarageInfo[i][gExteriorZ], 3.0);
CP[a] = 46488;
}
if(PlayerInfo[playerid][pWantedLevel] <= 6)
{
PlayerInfo[playerid][pWantedLevel] += 1;
SetPlayerWantedLevel(playerid, PlayerInfo[playerid][pWantedLevel]);
}
PlayerInfo[playerid][pVirtualWorld] = 0;
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, HouseInfo[i][hExteriorID]);
SetPlayerPos(playerid, GarageInfo[i][gExteriorX], GarageInfo[i][gExteriorY], GarageInfo[i][gExteriorZ]);
SetVehiclePos(GetPlayerVehicleID(playerid), GarageInfo[i][gExteriorX], GarageInfo[i][gExteriorY], GarageInfo[i][gExteriorZ]);
}
else
{
format(string, sizeof(string), "Garage Alarm: Someone has successfully entered inside the Garage!");
SendCopMessage(COLOR_DBLUE,string);
PlayerInfo[playerid][pScrew] -= 1;
if(IsACop(a))
{
SetPlayerCheckpoint(playerid, GarageInfo[i][gExteriorX], GarageInfo[i][gExteriorY], GarageInfo[i][gExteriorZ], 3.0);
CP[a] = 46488;
}
if(PlayerInfo[playerid][pWantedLevel] <= 6)
{
PlayerInfo[playerid][pWantedLevel] += 1;
SetPlayerWantedLevel(playerid, PlayerInfo[playerid][pWantedLevel]);
}
SendClientMessage(playerid, COLOR_GREY, "You successfully enter inside the Garage!");
format(string, sizeof(string), "SMS: This is an automated message informing you that registrant %s's Garage alarm has been activated.",GetName(x));
SendClientMessage(a, COLOR_YELLOW, string);
}
}
}
}
}
}
}
}
else
{
GameTextForPlayer(playerid, "~r~Garage is Locked!", 1000, 5);
}
}
}
}
for(new i = 0; i < sizeof( BizzInfo ); i++)
{
if(IsPlayerInRangeOfPoint( playerid, 3, BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]))
{
if(GetPlayerVirtualWorld( playerid ) == 0)
{
if(BizzInfo[i][bLocked] == 0)
{
if(PlayerInfo[playerid][pCash] >= BizzInfo[i][bEntranceCost])
{
if(PlayerInfo[playerid][pMask] == 1)
{
format(string, sizeof(string), "* Stranger has entered the business.");
}
else
{
format(string, sizeof(string), "* %s has entered the business.", sendername);
}
SetPlayerInterior( playerid, BizzInfo[i][bInteriorID]);
SetPlayerPos( playerid, BizzInfo[i][bExitX], BizzInfo[i][bExitY], BizzInfo[i][bExitZ]);
PlayerInfo[playerid][InBusiness] = i;
SetPlayerVirtualWorld( playerid, BizzInfo[i][bVirWorld]);
PlayerInfo[playerid][pVirtualWorld] = BizzInfo[i][bVirWorld];
if(BizzInfo[i][bRadio] != 0 && BizzInfo[i][bRadio] != RADIOS+1)
{
new cRadio = BizzInfo[i][bRadio];
switch(cRadio)
{
case 1:
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1283687");
}
case 2:
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1979774");
}
case 3:
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1281016");
}
}
}
if(BizzInfo[i][bType] == 1)
{
SendClientMessage( playerid, COLOR_YELLOW, "You entered in a 24-7!");
SendClientMessage( playerid, COLOR_WHITE, "USAGE: /buy - /buykit" );
}
else if(BizzInfo[i][bType] == 2)
{
SendClientMessage( playerid, COLOR_YELLOW, "You entered in a Clothes Store!");
SendClientMessage( playerid, COLOR_WHITE, "USAGE: /buy - /acessories" );
}
else if(BizzInfo[i][bType] == 3)
{
SendClientMessage( playerid, COLOR_YELLOW, "You entered in a Club!");
SendClientMessage( playerid, COLOR_WHITE, "USAGE: /buy" );
}
else if(BizzInfo[i][bType] == 4)
{
SendClientMessage( playerid, COLOR_YELLOW, "You entered in an Ammunation!");
SendClientMessage( playerid, COLOR_WHITE, "USAGE: /buy" );
}
else if(BizzInfo[i][bType] == 5)
{
SendClientMessage( playerid, COLOR_YELLOW, "You entered in a Casino!");
SendClientMessage( playerid, COLOR_WHITE, "USAGE: /bet & /buy");
}
else if(BizzInfo[i][bType] == 6)
{
SendClientMessage( playerid, COLOR_YELLOW, "You entered in a Restaurant!");
SendClientMessage( playerid, COLOR_WHITE, "USAGE: /buy" );
}
else if(BizzInfo[i][bType] == 7)
{
GetPlayerArmour(playerid, pKevlar[playerid]);
GetPlayerHealth(playerid, pHP[playerid]);
SendClientMessage(playerid, COLOR_YELLOW, "You entered in a Paintball Weapon Shop!");
PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
SendClientMessage(playerid, COLOR_LIGHTRED, "You can now buy your weapons!");
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /buy");
}
else if(BizzInfo[i][bType] == 8)
{
SendClientMessage(playerid, COLOR_YELLOW, "You entered in a Bank!");
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /bankpercent, /wiretransfer, /deposit & /withdraw" );
}
else if(BizzInfo[i][bType] == 9)
{
SendClientMessage(playerid, COLOR_YELLOW, "You entered in an Electronic Store!");
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /buy" );
}
else if(BizzInfo[i][bType] == 10)
{
SendClientMessage(playerid, COLOR_YELLOW, "You entered in a Locks Store!");
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /buylock" );
}
else if(BizzInfo[i][bType] == 11)
{
SendClientMessage(playerid, COLOR_YELLOW, "You entered in a Radio shop!");
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /buy");
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
BizzInfo[i][bTill] += BizzInfo[i][bEntranceCost];
GivePlayerMoney(playerid, -BizzInfo[i][bEntranceCost]);
PlayerInfo[playerid][pCash] -= BizzInfo[i][bEntranceCost];
ExtortionBiz(i, BizzInfo[i][bEntranceCost]);
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You don't have enough money to enter!");
}
}
else
{
GameTextForPlayer(playerid, "~r~Business is Locked!", 1000, 5);
}
}
}
}
for(new i = 0; i < sizeof(BInfo); i++)
{
if(IsPlayerInRangeOfPoint(playerid, 3, BInfo[i][bExteriorX], BInfo[i][bExteriorY], BInfo[i][bExteriorZ]))
{
if(GetPlayerInterior(playerid) == BInfo[i][bExteriorID] && GetPlayerVirtualWorld(playerid) == 0)
{
if(BInfo[i][bVIP] != 1 || PlayerInfo[playerid][pDonateRank] != 0)
{
if(BInfo[i][bLocked] == 0)
{
PlayerInfo[playerid][Inbuilding] = i;
SetPlayerInterior( playerid, BInfo[i][bInteriorID]);
SetPlayerVirtualWorld( playerid, BInfo[i][bVirWorld]);
PlayerInfo[playerid][pVirtualWorld] = BInfo[i][bVirWorld];
Pause(playerid);
SetPlayerPos(playerid, BInfo[i][bInteriorX], BInfo[i][bInteriorY], BInfo[i][bInteriorZ]);
if(BInfo[i][buRadio] >= 1 && strlen(BInfo[i][buRadioURL]))
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, BInfo[i][buRadioURL]);
}
}
else
{
GameTextForPlayer(playerid, "~r~Building is Locked!", 1000, 5);
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You are not a VIP!");
}
}
}
}
At the begining of command use SendClientMessage(playerid, 0xFFFFFFFF, "0"); then small piece of code, then SCM(..., "1"); then another piece of code then SCM(..., "2"); and so on to see where it gets and where it stops.
|