if(strcmp(cmd, "/enter", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new Floathax, Floathay, Floathaz;
new Floathbx, Floathby, Floathbz;
new Floathcx, Floathcy, Floathcz;
GetVehiclePos(EnterableShamals[0], shax, shay, shaz);
GetVehiclePos(EnterableShamals[1], shbx, shby, shbz);
GetVehiclePos(EnterableShamals[2], shcx, shcy, shcz);
//foreach(Player, i)
for(new i; i<MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pHouseAccepted] > 0)
{
if(IsPlayerInRangeOfPoint(playerid, 3, PlayerInfo[i][pHouseX], PlayerInfo[i][pHouseY], PlayerInfo[i][pHouseZ]))
{
if(PlayerInfo[i][pHouseLocked] == 0)
{
GetPlayerPos(playerid,PlayerInfo[playerid][pHouseExitX],PlayerInfo[playerid][pHouseExitY],PlayerInfo[playerid][pHouseExitZ]);
GetPlayerFacingAngle(playerid, PlayerInfo[playerid][pHouseExitR]);
GetPlayerName(playerid, sendername, sizeof(sendername));
if(PlayerInfo[playerid][pMask] == 1)
{
format(string, sizeof(string), "* Stanger 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_PURPL E,COLOR_PURPLE);
SetPlayerVirtualWorld(playerid, i);
PutPlayerInHouse(playerid, PlayerInfo[i][pHouseLevel]);
PlayerInfo[playerid][pLocal] = i;
PlayerInfo[playerid][pVirtualWorld] = i;
//alarm
if(PlayerInfo[i][hAlarmSystem] == 1 && PlayerInfo[i][hAlarmNumber] != 0 && AlarmOnline[i] == 0)
{
//foreach(Player, a)
for(new a = a; a <MAX_PLAYERS; a++)
{
if(IsPlayerConnected(a))
{
if(PlayerInfo[a][pPnumber] == PlayerInfo[i][hAlarmNumber])
{
GetPlayerName(i, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "SMS: This is an automated message informing you that registrant %s's house alarm has been activated.",giveplayer);
SendClientMessage(a, COLOR_YELLOW, string);
}
}
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " That house is currently locked !");
}
return 1;
}
}
}
for(new i = 0; i < sizeof(BizzInfo); i++)
{
if(IsPlayerInRangeOfPoint(playerid, 3, BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]))
{
if(i == 0)
{
PaintballPlayers ++;
PlayerPaintballing[playerid] = 1;
new rand = random(sizeof(PaintballSpawns));
SetPlayerPos(playerid, PaintballSpawns[rand][0], PaintballSpawns[rand][1], PaintballSpawns[rand][2]);
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid, 0);
return 1;
}
if(PlayerInfo[playerid][pPbiskey] != i)
{
if(BizzInfo[i][bLocked] == 1)
{
GameTextForPlayer(playerid, "~r~Closed", 5000, 1);
return 1;
}
if(BizzInfo[i][bProducts] == 0)
{
GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);
return 1;
}
GivePlayerMoney(playerid,-BizzInfo[i][bEntranceCost]);
format(string, sizeof(string), "~r~-$%d~n~~w~type /exit~n~to get out", BizzInfo[i][bEntranceCost]);
BizzInfo[i][bTill] += BizzInfo[i][bEntranceCost];
ExtortionBiz(i, BizzInfo[i][bEntranceCost]);
GameTextForPlayer(playerid, string, 5000, 3);
}
SetPlayerInterior(playerid,BizzInfo[i][bInterior]);
SetPlayerPos(playerid,BizzInfo[i][bExitX],BizzInfo[i][bExitY],BizzInfo[i][bExitZ]);
PlayerInfo[playerid][pInt] = BizzInfo[i][bInterior];
return 1;
}
}
if(IsPlayerInRangeOfPoint(playerid,3.0,681.5620,-474.2185,16.5363)) //Outlaws HQ
{
SetPlayerInterior(playerid, 1);
SetPlayerPos(playerid, 678.2614,-464.6447,-25.6172);
SetPlayerFacingAngle( playerid, 0.0000);
GameTextForPlayer(playerid, "~w~The Welcome Pump", 5000, 1);
PlayerInfo[playerid][pInt] = 1;
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid,8.0,shax,shay,s haz)) //SHAMAL 1
{
if(PlayerInfo[playerid][pMask] == 1) format(string, sizeof(string), "* Stanger has entered the shamal.");
else format(string, sizeof(string), "* %s has entered the shamal.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
SetPlayerVirtualWorld(playerid, 1337);
SetPlayerInterior(playerid,1);
SetPlayerPos(playerid,2.57, 33.14, 1200);
GameTextForPlayer(playerid, "~w~Shamal", 5000, 1);
GivePlayerGun(playerid, 46);
}
else if(IsPlayerInRangeOfPoint(playerid,8.0,shbx,shby,s hbz)) //SHAMAL 2
{
if(PlayerInfo[playerid][pMask] == 1) format(string, sizeof(string), "* Stanger has entered the shamal.");
else format(string, sizeof(string), "* %s has entered the shamal.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
SetPlayerVirtualWorld(playerid, 133;
SetPlayerInterior(playerid,1);
SetPlayerPos(playerid,2.57, 33.14, 1200);
GameTextForPlayer(playerid, "~w~Shamal", 5000, 1);
GivePlayerGun(playerid, 46);
}
else if(IsPlayerInRangeOfPoint(playerid,8.0,shcx,shcy,s hcz)) //SHAMAL 3
{
if(PlayerInfo[playerid][pMask] == 1) format(string, sizeof(string), "* Stanger has entered the shamal.");
else format(string, sizeof(string), "* %s has entered the shamal.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
SetPlayerVirtualWorld(playerid, 1339);
SetPlayerInterior(playerid,1);
SetPlayerPos(playerid,2.57, 33.14, 1200);
GameTextForPlayer(playerid, "~w~Shamal", 5000, 1);
GivePlayerGun(playerid, 46);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1797.5505,-1578.8964,14.0856,100.3781)) //V.I.P Lounge
{
SetPlayerInterior(playerid, 10);
SetPlayerPos(playerid, 2365.81640625,-1706.4645996094,1195.725708007;
GameTextForPlayer(playerid, "~b~V.I.P Lounge", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1815.5923,-1559.0122,13.5017,71.9420)) // v.i.p Garage
{
SetPlayerInterior(playerid, 10);
SetPlayerPos(playerid, 2449.4018554688,-1723.888671875,1150.8385009766);
GameTextForPlayer(playerid, "~b~ V.I.P Garage", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1155.0187,-1181.1189,32.8187,273.9496)) //Italian Mafia
{
SetPlayerPos(playerid, 2548.7195,-1294.7968,1060.9844);
SetPlayerInterior(playerid,2);
GameTextForPlayer(playerid, "~r~ Italian Mafia HQ", 3000, 1);
}
|