PDA

View Full Version : hotkey as command?


whando
13/11/2013, 05:51 PM
Hello, it's probaly extremely simple but I just can't find it so quick and I really need it right now, my command to enter any property is /enter and /exit, how do I get it working if i'm at the entrance I can press space to enter/exit?

Part of code:



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)
{

Hopefully anybody can help me! Thanks!

Konstantinos
13/11/2013, 05:55 PM
public OnPlayerKeyStateChange( playerid, newkeys, oldkeys )
{
if( ( newkeys & KEY_SPRINT) && !( oldkeys & KEY_SPRINT ) )
{
if( GetPlayerState( playerid ) == PLAYER_STATE_ONFOOT )
{
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++)
{
// rest of the code of the /enter command
}
}
}
return 1;
}

whando
13/11/2013, 06:05 PM
Still gives me errors, even placed it at the bottom of my gamemode.. :/

Konstantinos
13/11/2013, 06:13 PM
Still gives me errors, even placed it at the bottom of my gamemode.. :/

What errors? Post them here.

Note: Make sure you do not have any extra/missing bracket(s).

whando
13/11/2013, 06:24 PM
If I leave it at the place the command currently is, I get the 26 error thing from PAWNO, if I place it at the bottom I get

C:\Users\'Maikel\Desktop\JammingRoleplay\pawno\JRP .pwn(95992) : error 021: symbol already defined: "CUFFS_OnPlayerKeyStateChange"
C:\Users\'Maikel\Desktop\JammingRoleplay\pawno\JRP .pwn(96013) : error 017: undefined symbol "string"
C:\Users\'Maikel\Desktop\JammingRoleplay\pawno\JRP .pwn(96013) : error 017: undefined symbol "string"
C:\Users\'Maikel\Desktop\JammingRoleplay\pawno\JRP .pwn(96013) : error 029: invalid expression, assumed zero
C:\Users\'Maikel\Desktop\JammingRoleplay\pawno\JRP .pwn(96013) : fatal error 107: too many error messages on one line

Which I just see... It's actually something I need to fix xD.

public OnPlayerKeyStateChange( playerid, newkeys, oldkeys )
{
if( ( newkeys & KEY_SPRINT) && !( oldkeys & KEY_SPRINT ) )
{
if( GetPlayerState( playerid ) == PLAYER_STATE_ONFOOT )
{
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.", RemoveUnderScore(playerid));
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,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 h = 0; h < sizeof(EntranceInfo); h++)
{
if(IsPlayerInRangeOfPoint(playerid,EntranceInfo[h][EntranceEnterRadius],EntranceInfo[h][EntranceEnterX],EntranceInfo[h][EntranceEnterY],EntranceInfo[h][EntranceEnterZ]) && GetPlayerVirtualWorld(playerid) == EntranceInfo[h][EntranceExitVW])
{
new i = h;
new bool:wait = false;
/* Added because people kept /entering as soon as an admin creates an entrance */ if (EntranceInfo[h][EntranceInsideX] == 0) return SendClientMessage(playerid, GREY, "Entrance is not set up yet.");
if (EntranceInfo[h][EntranceLocked]) return SendClientMessage(playerid, GREY, "This entrance is locked.");
if (EntranceInfo[h][EntranceFaction] != 0 && PlayerInfo[playerid][pMember] != EntranceInfo[h][EntranceFaction]) return SendClientMessage(playerid, GREY, "This entrance is restricted to a certain faction, you can't enter.");
if (EntranceInfo[h][EntranceVIP] != 0 && PlayerInfo[playerid][pDonateRank] < EntranceInfo[h][EntranceVIP]) return SendClientMessage(playerid, GREY, "This entrance is restricted to VIP's higher than your level, you can't enter.");
if (EntranceInfo[h][EntranceEnterWait]) { wait = true; }
//SetPlayerVirtualWorld(playerid, h);
//SetPlayerVirtualWorld(playerid, EntranceInfo[h][EntranceVirtualWorld]);
//SetPlayerInterior(playerid, EntranceInfo[h][EntranceInterior]);
//Enter[playerid] = h;
new vehicleid;
new Seat[MAX_PLAYERS], InCar[MAX_PLAYERS];
if (EntranceInfo[h][EntranceTeleVeh] == 1 && IsPlayerInAnyVehicle(playerid))
{
if (GetPlayerVehicleSeat(playerid) != 0) return 1;
vehicleid = GetPlayerVehicleID(playerid);
SetVehiclePos(vehicleid, EntranceInfo[i][EntranceInsideX],EntranceInfo[i][EntranceInsideY], EntranceInfo[i][EntranceInsideZ] + 0.4);
SetVehicleZAngle(vehicleid, EntranceInfo[i][EntranceInsideA]);
SetVehicleWorld(vehicleid, EntranceInfo[i][EntranceVirtualWorld]);
SetVehicleInterior(vehicleid, EntranceInfo[i][EntranceInterior]);
for(new j = 0; j < MAX_PLAYERS; j++)
{
if(IsPlayerInVehicle(j, vehicleid))
{
InCar[j] = vehicleid;
Seat[j] = GetPlayerVehicleSeat(j);
SetPlayerInterior(j, EntranceInfo[i][EntranceInterior]);
SetPlayerVirtualWorld(j, EntranceInfo[i][EntranceVirtualWorld]);
}
}
}
SetPlayerPosEx(playerid, EntranceInfo[i][EntranceInsideX],EntranceInfo[i][EntranceInsideY], EntranceInfo[i][EntranceInsideZ]);
SetPlayerFacingAngle(playerid, EntranceInfo[i][EntranceInsideA]);
SetPlayerInterior(playerid, EntranceInfo[i][EntranceInterior]);
SetPlayerVirtualWorld(playerid, EntranceInfo[i][EntranceVirtualWorld]);
if (vehicleid != 0)
{
for (new j = 0; j < MAX_PLAYERS; j++)
{
if (InCar[j] == 0) continue;
if (InCar[j] == vehicleid)
{
PutPlayerInVehicle(j, vehicleid, Seat[j]);
}
}
}
KillTimer(ObjectWaitTimer[playerid]);
if (wait == true) ObjectWait(playerid, EntranceInfo[h][EntranceInsideX], EntranceInfo[h][EntranceInsideY], EntranceInfo[h][EntranceInsideZ]);
}
}
for(new i = 0; i < sizeof(MInfo); i++)
{
if(IsPlayerInRangeOfPoint(playerid, 3, MInfo[i][mExteriorX], MInfo[i][mExteriorY], MInfo[i][mExteriorZ]))
{
if(GetPlayerInterior(playerid) == MInfo[i][mExteriorID] && GetPlayerVirtualWorld(playerid) == 0)
{
if(MInfo[i][mVIP] != 1 || PlayerInfo[playerid][pDonateRank] != 0)
{
if(MInfo[i][mLocked] == 0)
{
PlayerInfo[playerid][Inmotel] = i;
SetPlayerInterior( playerid, MInfo[i][mInteriorID]);
SetPlayerVirtualWorld( playerid, MInfo[i][mVirWorld]);
PlayerInfo[playerid][pVirtualWorld] = MInfo[i][mVirWorld];
Pause(playerid);
SetPlayerPos(playerid, MInfo[i][mInteriorX], MInfo[i][mInteriorY], MInfo[i][mInteriorZ]);
}
else
{
GameTextForPlayer(playerid, "~r~Motel Full - No Rooms Avaliable!", 1000, 5);
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You are not a VIP!");
}
}
}
}
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.", RemoveUnderScore(playerid));
}
TogglePlayerControllable(playerid, false);
Loaded[playerid] = 1;
ShowLoading(playerid);
SetTimer("LoadPlayer",3100,false);
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 have entered 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!");
PlayerPaintballing[playerid] = 1;
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 & /atmcard" );
}
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_PURPL E,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!");
}
}
}
}
for(new h = 0; h < sizeof(HQInfo); h++)
{
if(IsPlayerInRangeOfPoint(playerid,2.0,HQInfo[h][HQEnterX],HQInfo[h][HQEnterY],HQInfo[h][HQEnterZ]))
{
if(HQInfo[h][HQInsideX] == 0) return SendClientMessage(playerid, GREY, "HQ is not set up yet.");
if(HQInfo[h][HQLocked]) return SendClientMessage(playerid, GREY, "HQ is locked.");
SetPlayerVirtualWorld(playerid, h + 2000);
SetPlayerPosEx(playerid, HQInfo[h][HQInsideX],HQInfo[h][HQInsideY],HQInfo[h][HQInsideZ]);
SetPlayerInterior(playerid, HQInfo[h][HQInterior]);
SetCameraBehindPlayer(playerid);
}
}
if(IsPlayerInRangeOfPoint(playerid, 3, 9999.0685,-9999.6198,13.5382)) //Paintball Entrance
{
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);
}//-----------------------------[Prison Entrances]------------------------//
else if(IsPlayerInRangeOfPoint(playerid,2.0,1771.6210,-1547.4747,9.9129)) // Yard to Inside [Fun Time]
{
GameTextForPlayer(playerid,"~w~Objects Loading...",1000,5);
Pause(playerid);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid,1852.0464,-1732.5062,5202.5859);
}
else if(IsPlayerInRangeOfPoint(playerid,2.0,1769.3439,-1549.8958,9.9112)) // Yard to Inside [Prisoining]
{
GameTextForPlayer(playerid,"~w~Objects Loading...",1000,5);
Pause(playerid);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid,1864.7402,-1725.0553,5202.5859);
}
else if(IsPlayerInRangeOfPoint(playerid,2.0,1797.4753,-1579.0033,14.0861)) // Outside Prison to Inside
{
GameTextForPlayer(playerid,"~w~Objects Loading..",1000,5);
Pause(playerid);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1862.0128,-1700.4945,5202.5859);
}
//-----------------------------[Prison Entrances]------------------------//
else if(IsPlayerInRangeOfPoint(playerid,3.0,2755.3499,-2515.5325,13.6397)) // Gun Depot Enter Point
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerPos(playerid,2776.5386,-1492.2943,1066.2562);
GameTextForPlayer(playerid, "~w~Gun Depot", 5000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid,8.0,1765.7958,-1705.0437,13.4707)) // EMS new building
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerVirtualWorld(playerid, 101);
SetPlayerInterior(playerid,16);
SetPlayerPos(playerid,2046.1004638672,-1765.7945556641,767.94354248047);
GameTextForPlayer(playerid, "~w~E.M.S building", 5000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid,8.0,shax,shay,s haz)) //SHAMAL 1
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
if(PlayerInfo[playerid][pMask] == 1) format(string, sizeof(string), "> Stranger has entered the shamal.");
else format(string, sizeof(string), "> %s has entered the shamal.", RemoveUnderScore(playerid));
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
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
if(PlayerInfo[playerid][pMask] == 1) format(string, sizeof(string), "> Stranger has entered the shamal.");
else format(string, sizeof(string), "> %s has entered the shamal.", RemoveUnderScore(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
SetPlayerVirtualWorld(playerid, 1338);
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
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
if(PlayerInfo[playerid][pMask] == 1) format(string, sizeof(string), "> Stranger has entered the shamal.");
else format(string, sizeof(string), "> %s has entered the shamal.", RemoveUnderScore(playerid));
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, 1833.8832,-1125.6548,24.6721)) //V.I.P Lounge
{
if(PlayerInfo[playerid][pDonateRank] < 1) return SendClientMessage(playerid,COLOR_RED,"You're not VIP.");
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 10);
SetPlayerPos(playerid, 2365.81640625,-1706.4645996094,1195.7257080078);
GameTextForPlayer(playerid, "~b~V.I.P Lounge", 3000, 1);
}
/*else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1498.3635,-1580.5297,13.5498)) //Italian Resturant
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 4);
SetPlayerPos(playerid, 1564.7557373047,-1730.5688476563,1125.6225585938);
GameTextForPlayer(playerid, "~w~The Italian Resturant", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 328.2883,-1923.6836,1.4061)) //Santa Maria Resturant
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 1);
SetPlayerPos(playerid, -794.806396,497.738037,1376.195312);
GameTextForPlayer(playerid, "~w~Santa Maria Resturant", 3000, 1);
}*/
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1587.0557,-1730.1108,1441)) // Hall To Jails 2
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 5);
SetPlayerPos(playerid, 1587.4763,-1728.4971,1441);
GameTextForPlayer(playerid, "~w~Detention Facility", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1588.2921,-1745.8655,1441.2000)) // Prison Reception
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 5);
SetPlayerPos(playerid, 1589.6949,-1744.9985,1441.2000);
GameTextForPlayer(playerid, "~w~Prison Reception", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, -5.2309,-325.4293,5.4297)) // Prison Store
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 209.8902,-152.7066,-89.7323);
GameTextForPlayer(playerid, "~w~Prison Store", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, -30.8378,-361.3748,5.4297)) // Control Room
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, -27.0908,-379.4108,14.9761);
GameTextForPlayer(playerid, "~w~Control Room", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, -107.5323,-219.7949,2.0466)) // Another Infim.
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1148.3007,-1318.3501,1023.7019);
GameTextForPlayer(playerid, "~w~Infirmary Two", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, -5.2309,-325.4293,5.4297)) // Prison Store
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 5);
SetPlayerPos(playerid, 209.8902,-152.7066,-89.7323);
GameTextForPlayer(playerid, "~w~Prison Store", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1581.6827,-1730.2046,1441.2000)) // From Prison Hall to Jails
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 5);
SetPlayerPos(playerid, 1581.0818,-1728.5902,1441.1000);
GameTextForPlayer(playerid, "~w~Detention Facility", 3000, 1);
}
/*else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2233.2905,-1159.6998,25.8906)) // Jefferson Motel
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 15);
SetPlayerPos(playerid, 2215.454833,-1147.475585,1025.796875);
GameTextForPlayer(playerid, "~w~Jefferson Motel", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1547.3805,-1269.3496,17.4063)) // Tommy's Apartment
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1591.90002441,-1239.90002441,221.10000610);
GameTextForPlayer(playerid, "~w~Tommy's Apartment", 3000, 1);
}*/
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1833.8832,-1125.6548,24.6721)) // v.i.p Garage
{
if(PlayerInfo[playerid][pDonateRank] < 1) return SendClientMessage(playerid,COLOR_RED,"You're not VIP.");
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerPos(playerid, 2483.8914,2377.5178,7.5434);
SetPlayerInterior(playerid, 0);
GameTextForPlayer(playerid, "~b~ V.I.P Garage", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2297.8594,-1509.6943,26.8667)) // Royal Church Main Door
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, -2025.0823,1143.2609,18.0688);
GameTextForPlayer(playerid, "~w~Los Santos Royal Church", 3000, 1);
}
/*else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2139.1563,-1742.7773,13.5524)) // Ganton Sex Shop
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 3);
SetPlayerPos(playerid, -100.3464,-24.8610,1000.7188);
GameTextForPlayer(playerid, "~w~Ganton Sex Shop", 3000, 1);
}*/
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1524.4841,-1677.8577,6.2188)) // LSPD Training Place Enter
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 2195.96875,-1890.1411132813,903.56622314453);
GameTextForPlayer(playerid, "~b~L.S.P.D Training Range", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2034.1747,-1401.6726,17.2948)) // County Hospital
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 17);
SetPlayerPos(playerid, 2403.6315917969,-1873.8382568359,977.00183105469);
GameTextForPlayer(playerid, "~w~County Hospital", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2045.0454,-1913.2452,13.5469)) // DMV
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 3);
SetPlayerPos(playerid, -2029.798339,-106.675910,1035.171875);
GameTextForPlayer(playerid, "~w~Department Of Motor Vehicles", 3000, 1);
}
/*else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1333.4658,-1864.3909,13.5469)) // 2 Dragons Strip Club
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 3);
SetPlayerPos(playerid, -2637.0388,1402.2401,906.4609);
GameTextForPlayer(playerid, "~r~Two Dragons Strip Club", 3000, 1);
}*/
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 389.4164,-1162.6322,1227.8639)) // FBI Elevator which leads to Second Floor
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 17);
SetPlayerPos(playerid, 391.95086669922,-1159.1645507813,1235.4501953125);
GameTextForPlayer(playerid, "~r~F.B.I - Second Floor", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 393.1075,-1162.8607,1227.8639)) // FBI Elevator which leads to Prisons Floor
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 17);
SetPlayerPos(playerid, 397.96765136719,-1166.8763427734,1224.2651367188);
GameTextForPlayer(playerid, "~r~F.B.I - Prisons Floor", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2070.8240,-1793.8846,13.5533)) // Barber
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 3);
SetPlayerPos(playerid, 418.652984,-82.639793,1001.804687);
GameTextForPlayer(playerid, "~w~The Barber", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2508.3833,-2205.7219,13.5469)) // Drug Depot Enter from Outside
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 3);
SetPlayerPos(playerid, 2203.7878,-1817.9066,960.5386);
GameTextForPlayer(playerid, "~w~The Drug Depot", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2206.0955,-1821.6783,943.1324)) // Drug Depot Enter from Bottom
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 3);
SetPlayerPos(playerid, 2250.0303,-1791.3995,915.8544);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2312.1548,-1508.6281,26.8438)) // Los Santos Royal Church Interior
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 3);
SetPlayerPos(playerid, -2001.2556,1096.8164,18.8574);
GameTextForPlayer(playerid, "~w~Los Santos Royal Church", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2253.9475,-1333.1809,23.9815)) // Los Santos Church Main Door
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 6);
SetPlayerPos(playerid, 178.60601806641,-100.326538085942,1029.4976806641);
GameTextForPlayer(playerid, "~w~Los Santos Church", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1658.4365,-1691.3781,15.6094)) // FBI Door from Garage Which lead to Prisons
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 3);
SetPlayerPos(playerid, 385.1813,-1155.5437,1223.6608);
GameTextForPlayer(playerid, "~w~F.B.I Department", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1654.0979,-1655.1139,22.5156)) // FBI Door from Roof Which lead to Second Floor
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 3);
SetPlayerPos(playerid, 357.4144,-1166.8655,1234.8639);
GameTextForPlayer(playerid, "~w~F.B.I Department", 3000, 1);
}
/*else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2421.5442,-1219.2491,25.5612)) // PigPen
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 2);
SetPlayerPos(playerid, 1204.809936,-11.586799,1000.921875);
GameTextForPlayer(playerid, "~r~The PigPen", 3000, 1);
}*/
else if(IsPlayerInRangeOfPoint(playerid, 3.0, -86.0714,-299.3637,2.7646)) // Director Office of Prison
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, -220.3469,-251.2590,8.4680);
GameTextForPlayer(playerid, "~r~Director's Office", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2068.5889,-1779.9105,13.5596)) // Tatto
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 16);
SetPlayerPos(playerid, -204.439987,-26.453998,1002.273437);
GameTextForPlayer(playerid, "~r~Tatto Shop", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1742.9120,-1943.8079,13.5689)) // Unity Station from train to inside
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 17);
SetPlayerPos(playerid, -1973.2489,168.5225,539.0989);
GameTextForPlayer(playerid, "~w~Unity Station", 3000, 1);
}
/*else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2310.0693,-1643.5203,14.8270)) // Ten Green Bottles
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 11);
SetPlayerPos(playerid, 501.980987,-69.150199,998.757812);
GameTextForPlayer(playerid, "~w~Ten Green Bottles", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1296.4255,-1424.8632,14.9531)) // Bar near PB
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 1);
SetPlayerPos(playerid, 1358.6835,-488.1862,650.7677);
GameTextForPlayer(playerid, "~w~Two Elephants Resturant", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0,2105.4717,-1806.5591,13.5547)) // Pizza Stack
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 5);
SetPlayerPos(playerid, 372.2533,-133.3005,1001.4922);
GameTextForPlayer(playerid, "~w~Pizza Stack", 3000, 1);
}*/
else if(IsPlayerInRangeOfPoint(playerid, 2.5, 2487.7549,2397.2488,4.2109)) //VIP Garage to lounge / lounge to garge
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerPos(playerid, 2417.8186,-1705.3455,1195.0190);
SetPlayerInterior(playerid, 10);
GameTextForPlayer(playerid,"~b~V.I.P Lounge", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 2.5, 849.5972,-1519.9574,14.3481)) //SS
{
if(IsAnAgent(playerid))
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerPos(playerid, 2145.3159,1597.3687,1003.9677);
SetPlayerInterior(playerid, 1);
GameTextForPlayer(playerid,"~w~ The Secret Service", 3000, 1);
}
else
{
SendClientMessage(playerid, COLOR_GREY,"You are not a Member of the Secret Service Orgnization");
return 1;
}
}
else if(IsPlayerInRangeOfPoint(playerid, 2.5, 1769.8843,-1867.9167,13.5696)) //Unity Station People Entrance
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerPos(playerid, -2007.7353515625,176.60624694824,540.34661865234);
SetPlayerInterior(playerid, 15);
GameTextForPlayer(playerid,"~w~Unity Station", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 2.5, 1752.4977,-1894.1453,13.5574)) //Unity Station Workers Entrance
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerPos(playerid, -1961.6540527344,164.9091796875,546.71893310547);
SetPlayerInterior(playerid, 15);
GameTextForPlayer(playerid,"~w~Unity Station", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 5.0, 2229.7354,-1721.5267,13.5639)) //Gym
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerPos(playerid, 772.111999,-3.898649,1000.728820);
SetPlayerInterior(playerid, 5);
GameTextForPlayer(playerid,"~w~Los Santos Gym", 3000, 1);
}
/*else if(IsPlayerInRangeOfPoint(playerid, 2.5, 1786.9857,-1720.8442,13.5426)) // Chinese Resturant
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerPos(playerid, 1026.8576660156,-1309.5942382813,-20.835353851318);
SetPlayerInterior(playerid, 6);
GameTextForPlayer(playerid,"~w~China Resturant", 3000, 1);
}*/
else if(IsPlayerInRangeOfPoint(playerid,3.0,626.9654,-571.7671,17.9207)) //SASD
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 5);
SetPlayerPos(playerid, 322.2817,303.3415,999.1484);
SetPlayerFacingAngle( playerid, 0.0000);
GameTextForPlayer(playerid, "~w~S.A.S.D", 5000, 1);
PlayerInfo[playerid][pInt] = 5;
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid,3.0,1676.8248,-1634.7830,14.2266)) //FBI building
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 10);
SetPlayerPos(playerid, 367.62509155273,-1149.8499755859,1228.7457275391);
SetPlayerFacingAngle(playerid, 0.0000);
GameTextForPlayer(playerid, "~w~Federal Bureau of Investigation", 5000, 1);
PlayerInfo[playerid][pInt] = 10;
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1601.9219,-2157.7139,13.7401)) //FIRE DEPARTMENT ENTERANCE
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 3);
SetPlayerPos(playerid, 368.0984,162.2898,1019.9844);
PlayerInfo[playerid][pInt] = 3;
GameTextForPlayer(playerid, "~r~E.M.S HeadQuarters", 5000, 1);
SetPlayerFacingAngle(playerid, 90.0);
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1172.6975, -1325.3914, 15.4019)) //HOSPITAL GROUND ENTER (NEW)
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 1);
SetPlayerPos(playerid, 1199.0801,-1366.3083,1017.8790);
PlayerInfo[playerid][pInt] = 1;
GameTextForPlayer(playerid, "~r~All Saints ~n~~w~Medical Center", 5000, 1);
SetPlayerFacingAngle(playerid, 271.3973);
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1154.5345, -1343.6583, 26.6953)) //HOSPITAL ROOF ENTER (NEW)
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 1);
SetPlayerPos(playerid, 1216.2145,-1379.2618,1029.4714);
PlayerInfo[playerid][pInt] = 1;
GameTextForPlayer(playerid, "~r~All Saints ~n~~w~Medical Center", 5000, 1);
SetPlayerFacingAngle(playerid, 1.0922);
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid, 3, 1568.6840,-1691.0090,5.8906)) //Garage-LSPD Enterance
{
if(IsACop(playerid))
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 6);
SetPlayerPos(playerid,246.4211,87.0546,1003.6406);
SetCameraBehindPlayer(playerid);
GameTextForPlayer(playerid, "~w~Los Santos~n~~r~Police Department", 5000, 1);
SetPlayerFacingAngle(playerid, 180.0000);
PlayerInfo[playerid][pInt] = 6;
}
}
else if(IsPlayerInRangeOfPoint(playerid, 3, 1564.8468,-1666.1549,28.3956)) //LSPD Roof-LSPD Enterance
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 6);
SetPlayerPos(playerid,242.7468,66.3155,1003.6406);
SetCameraBehindPlayer(playerid);
GameTextForPlayer(playerid, "~w~Los Santos~n~~r~Police Department", 5000, 1);
SetPlayerFacingAngle(playerid, 270.0);
PlayerInfo[playerid][pInt] = 6;
}
else if(IsPlayerInRangeOfPoint(playerid, 3, 1554.5262,-1675.7283,16.1953)) //LSPD enter
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerPos(playerid,246.7284,62.6640,1003.6406);
SetCameraBehindPlayer(playerid);
GameTextForPlayer(playerid, "~w~Los Santos~n~~r~Police Department", 5000, 1);
SetPlayerFacingAngle(playerid, 90.0000);
SetPlayerInterior(playerid, 6);
PlayerInfo[playerid][pInt] = 6;
}
else if(IsPlayerInRangeOfPoint(playerid, 3, 2447.8350,-1962.6876,13.5469)) //Los Santos Export Depot
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerPos(playerid,2573.0928,-1302.0148,1044.1250);
SetCameraBehindPlayer(playerid);
PlayerInfo[playerid][pInt] = 2;
SetPlayerInterior(playerid, 2);
GameTextForPlayer(playerid, "~w~Los Santos ~n~Export Depot building", 5000, 1);
SetPlayerFacingAngle(playerid, 270.0000);
}
/*else if(IsPlayerInRangeOfPoint(playerid,3.0,1038.2180,-1340.5763,13.7432)) //Donut Store
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 17);
SetPlayerPos(playerid, 377.1611,-191.6544,1000.6328);
SetPlayerFacingAngle(playerid, 0.0000);
GameTextForPlayer(playerid, "~w~Jim's Sticky Ring", 5000, 1);
PlayerInfo[playerid][pInt] = 17;
SetCameraBehindPlayer(playerid);
}*/
else if(IsPlayerInRangeOfPoint(playerid,3.0,1481.0209,-1770.9374,18.7958)) //City Hall
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 3);
SetPlayerPos(playerid, 384.5713,173.6477,1008.3828);
SetPlayerFacingAngle(playerid, 90.0000);
GameTextForPlayer(playerid, "~w~ City Hall", 5000, 1);
PlayerInfo[playerid][pInt] = 3;
SetCameraBehindPlayer(playerid);
}
/*else if(IsPlayerInRangeOfPoint(playerid,3.0, 1244.7333, 205.3294, 19.6454)) // Donut Store Enterance
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerVirtualWorld(playerid, 3);
SetPlayerInterior(playerid, 17);
SetPlayerPos(playerid, 377.1611,-191.6544,1000.6328);
SetPlayerFacingAngle(playerid, 0.0000);
PlayerInfo[playerid][pInt] = 17;
PlayerInfo[playerid][pVirtualWorld] = 3;
GameTextForPlayer(playerid, "~w~Montgomery ~n~~r~Cafe", 5000, 1);
SetCameraBehindPlayer(playerid);
}*/
else if(IsPlayerInRangeOfPoint(playerid,3.0, -13.0313,-335.9020,5.4297)) // Cafeteria Enterance
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 4);
SetPlayerPos(playerid, 459.2668, -88.6474, 999.5547);
SetPlayerFacingAngle(playerid, 89.9299);
PlayerInfo[playerid][pInt] = 4;
GameTextForPlayer(playerid, "~w~Cafeteria", 5000, 1);
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid,3.0,-174.2122,-247.5509,1.4297)) //Infirmary
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerPos(playerid, 268.7222,1862.8405,8.7578);
GameTextForPlayer(playerid, "~w~Infirmary One", 5000, 1);
SetPlayerFacingAngle(playerid, 180.0);
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid,3.0,-49.8847,-269.3661,6.6332)) //Doc building
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 18);
SetPlayerPos(playerid, -202.2018,-204.9514,14.0696);
GameTextForPlayer(playerid, "~w~Department of Correction", 5000, 1);
SetPlayerFacingAngle(playerid, 90.0000);
PlayerInfo[playerid][pInt] = 18;
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid,3.0,2695.6235,-1704.6960,11.8438))
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid,7);
SetPlayerPos(playerid,-1404.5299,-259.0602,1043.6563);
GameTextForPlayer(playerid, "~w~Welcome to the 8ball Track", 5000, 1);
PlayerInfo[playerid][pInt] = 7;
}
else if(IsPlayerInRangeOfPoint(playerid,8.0,-2111.5686,-443.9720,38.7344))
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid,4);
SetPlayerPos(playerid,-1443.0554,-581.1879,1055.0472);
GameTextForPlayer(playerid, "~w~Welcome to the Dirt Track", 5000, 1);
PlayerInfo[playerid][pInt] = 4;

}
else if(IsPlayerInRangeOfPoint(playerid,8.0,-2080.3079,-406.0309,38.7344))
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid,14);
SetPlayerPos(playerid,-1464.7732,1557.5533,1052.5313);
GameTextForPlayer(playerid, "~w~Welcome to the Stunting Track", 5000, 1);
PlayerInfo[playerid][pInt] = 14;
}
}
return 1;
}

Konstantinos
13/11/2013, 06:27 PM
Any callback MUST be outside of any other.

You already have OnPlayerKeyStateChange callback to your script. Just goto that callback (Ctrl + F and type: OnPlayerKeyStateChange) and add inside it:

// ...
if( ( newkeys & KEY_SPRINT) && !( oldkeys & KEY_SPRINT ) )
{
if( GetPlayerState( playerid ) == PLAYER_STATE_ONFOOT )
{
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++)
{
// rest of the code of the /enter command
}
}
}

whando
13/11/2013, 06:40 PM
26 errors again..

Konstantinos
13/11/2013, 06:41 PM
Post the errors and the code, I cannot read your mind..

whando
13/11/2013, 06:51 PM
Just got 4 errors left.

C:\Users\'Maikel\Desktop\JammingRoleplay\pawno\JRP .pwn(25871) : warning 202: number of arguments does not match definition
C:\Users\'Maikel\Desktop\JammingRoleplay\pawno\JRP .pwn(27332) : error 017: undefined symbol "string"
C:\Users\'Maikel\Desktop\JammingRoleplay\pawno\JRP .pwn(27332) : error 017: undefined symbol "string"
C:\Users\'Maikel\Desktop\JammingRoleplay\pawno\JRP .pwn(27332) : error 029: invalid expression, assumed zero
C:\Users\'Maikel\Desktop\JammingRoleplay\pawno\JRP .pwn(27332) : fatal error 107: too many error messages on one line



public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (newkeys & KEY_FIRE && GetPVarInt(playerid, "DriveThruID") != 0)
{
new
id = GetPVarInt(playerid, "DriveThruID"),
szString[192],
Float:x,
Float:y,
Float:z;

GetPlayerPos(playerid, x, y, z);
GetPVarString(playerid, "DriveThruName", szString, 192);

DriveThruInfo[id][driveThruModel] = 2353;
DriveThruInfo[id][driveThruBiz] = GetPVarInt(playerid, "DriveThruBiz");
DriveThruInfo[id][driveThruX] = GetPVarFloat(playerid, "DriveThruX");
DriveThruInfo[id][driveThruY] = GetPVarFloat(playerid, "DriveThruY");
DriveThruInfo[id][driveThruZ] = GetPVarFloat(playerid, "DriveThruZ");
DriveThruInfo[id][driveThruOrderX] = x;
DriveThruInfo[id][driveThruOrderY] = y;
DriveThruInfo[id][driveThruOrderZ] = z;
format(DriveThruInfo[id][driveThruName], 128, szString);
DriveThruInfo[id][driveThruPickup1] = CreateDynamicPickup(2353, 23, DriveThruInfo[id][driveThruX], DriveThruInfo[id][driveThruY], DriveThruInfo[id][driveThruZ]);
DriveThruInfo[id][driveThruPickup2] = CreateDynamicPickup(2353, 23, DriveThruInfo[id][driveThruOrderX], DriveThruInfo[id][driveThruOrderY], DriveThruInfo[id][driveThruOrderZ]);
format(szString, sizeof(szString), "{01FCFF}[%s]{F0CC00}\nYou can order food here!\nDrive Thru ID: %d\n[/order]", DriveThruInfo[id][driveThruName], id);
DriveThruInfo[id][driveThruLabel1] = CreateDynamic3DTextLabel(szString, COLOR_DCHAT, DriveThruInfo[id][driveThruX], DriveThruInfo[id][driveThruY], DriveThruInfo[id][driveThruZ] + 0.75, 10.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, 0, -1, -1, 100.0);
DriveThruInfo[id][driveThruLabel2] = CreateDynamic3DTextLabel("Drive into this checkpoint to get your food!", COLOR_DCHAT, DriveThruInfo[id][driveThruOrderX], DriveThruInfo[id][driveThruOrderY], DriveThruInfo[id][driveThruOrderZ] + 0.75, 10.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, 0, -1, -1, 100.0);
DriveThruInfo[id][driveThruTaken] = 1;

format(szString, sizeof(szString), "You have created a Drive Thru: %s (ID: %d).", DriveThruInfo[id][driveThruName], id);
SendClientMessage(playerid, 0x33AA33FF, szString);
DeletePVar(playerid, "DriveThruID");
SaveDriveThrus();
return 1;
}
if( ( newkeys & KEY_SPRINT) && !( oldkeys & KEY_SPRINT ) )
{
if( GetPlayerState( playerid ) == PLAYER_STATE_ONFOOT )
{
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.", RemoveUnderScore(playerid));
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,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 h = 0; h < sizeof(EntranceInfo); h++)
{
if(IsPlayerInRangeOfPoint(playerid,EntranceInfo[h][EntranceEnterRadius],EntranceInfo[h][EntranceEnterX],EntranceInfo[h][EntranceEnterY],EntranceInfo[h][EntranceEnterZ]) && GetPlayerVirtualWorld(playerid) == EntranceInfo[h][EntranceExitVW])
{
new i = h;
new bool:wait = false;
/* Added because people kept /entering as soon as an admin creates an entrance */ if (EntranceInfo[h][EntranceInsideX] == 0) return SendClientMessage(playerid, GREY, "Entrance is not set up yet.");
if (EntranceInfo[h][EntranceLocked]) return SendClientMessage(playerid, GREY, "This entrance is locked.");
if (EntranceInfo[h][EntranceFaction] != 0 && PlayerInfo[playerid][pMember] != EntranceInfo[h][EntranceFaction]) return SendClientMessage(playerid, GREY, "This entrance is restricted to a certain faction, you can't enter.");
if (EntranceInfo[h][EntranceVIP] != 0 && PlayerInfo[playerid][pDonateRank] < EntranceInfo[h][EntranceVIP]) return SendClientMessage(playerid, GREY, "This entrance is restricted to VIP's higher than your level, you can't enter.");
if (EntranceInfo[h][EntranceEnterWait]) { wait = true; }
//SetPlayerVirtualWorld(playerid, h);
//SetPlayerVirtualWorld(playerid, EntranceInfo[h][EntranceVirtualWorld]);
//SetPlayerInterior(playerid, EntranceInfo[h][EntranceInterior]);
//Enter[playerid] = h;
new vehicleid;
new Seat[MAX_PLAYERS], InCar[MAX_PLAYERS];
if (EntranceInfo[h][EntranceTeleVeh] == 1 && IsPlayerInAnyVehicle(playerid))
{
if (GetPlayerVehicleSeat(playerid) != 0) return 1;
vehicleid = GetPlayerVehicleID(playerid);
SetVehiclePos(vehicleid, EntranceInfo[i][EntranceInsideX],EntranceInfo[i][EntranceInsideY], EntranceInfo[i][EntranceInsideZ] + 0.4);
SetVehicleZAngle(vehicleid, EntranceInfo[i][EntranceInsideA]);
SetVehicleWorld(vehicleid, EntranceInfo[i][EntranceVirtualWorld]);
SetVehicleInterior(vehicleid, EntranceInfo[i][EntranceInterior]);
for(new j = 0; j < MAX_PLAYERS; j++)
{
if(IsPlayerInVehicle(j, vehicleid))
{
InCar[j] = vehicleid;
Seat[j] = GetPlayerVehicleSeat(j);
SetPlayerInterior(j, EntranceInfo[i][EntranceInterior]);
SetPlayerVirtualWorld(j, EntranceInfo[i][EntranceVirtualWorld]);
}
}
}
SetPlayerPosEx(playerid, EntranceInfo[i][EntranceInsideX],EntranceInfo[i][EntranceInsideY], EntranceInfo[i][EntranceInsideZ]);
SetPlayerFacingAngle(playerid, EntranceInfo[i][EntranceInsideA]);
SetPlayerInterior(playerid, EntranceInfo[i][EntranceInterior]);
SetPlayerVirtualWorld(playerid, EntranceInfo[i][EntranceVirtualWorld]);
if (vehicleid != 0)
{
for (new j = 0; j < MAX_PLAYERS; j++)
{
if (InCar[j] == 0) continue;
if (InCar[j] == vehicleid)
{
PutPlayerInVehicle(j, vehicleid, Seat[j]);
}
}
}
KillTimer(ObjectWaitTimer[playerid]);
if (wait == true) ObjectWait(playerid, EntranceInfo[h][EntranceInsideX], EntranceInfo[h][EntranceInsideY], EntranceInfo[h][EntranceInsideZ]);
}
}
for(new i = 0; i < sizeof(MInfo); i++)
{
if(IsPlayerInRangeOfPoint(playerid, 3, MInfo[i][mExteriorX], MInfo[i][mExteriorY], MInfo[i][mExteriorZ]))
{
if(GetPlayerInterior(playerid) == MInfo[i][mExteriorID] && GetPlayerVirtualWorld(playerid) == 0)
{
if(MInfo[i][mVIP] != 1 || PlayerInfo[playerid][pDonateRank] != 0)
{
if(MInfo[i][mLocked] == 0)
{
PlayerInfo[playerid][Inmotel] = i;
SetPlayerInterior( playerid, MInfo[i][mInteriorID]);
SetPlayerVirtualWorld( playerid, MInfo[i][mVirWorld]);
PlayerInfo[playerid][pVirtualWorld] = MInfo[i][mVirWorld];
Pause(playerid);
SetPlayerPos(playerid, MInfo[i][mInteriorX], MInfo[i][mInteriorY], MInfo[i][mInteriorZ]);
}
else
{
GameTextForPlayer(playerid, "~r~Motel Full - No Rooms Avaliable!", 1000, 5);
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You are not a VIP!");
}
}
}
}
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.", RemoveUnderScore(playerid));
}
TogglePlayerControllable(playerid, false);
Loaded[playerid] = 1;
ShowLoading(playerid);
SetTimer("LoadPlayer",3100,false);
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 have entered 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!");
PlayerPaintballing[playerid] = 1;
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 & /atmcard" );
}
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_PURPL E,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!");
}
}
}
}
for(new h = 0; h < sizeof(HQInfo); h++)
{
if(IsPlayerInRangeOfPoint(playerid,2.0,HQInfo[h][HQEnterX],HQInfo[h][HQEnterY],HQInfo[h][HQEnterZ]))
{
if(HQInfo[h][HQInsideX] == 0) return SendClientMessage(playerid, GREY, "HQ is not set up yet.");
if(HQInfo[h][HQLocked]) return SendClientMessage(playerid, GREY, "HQ is locked.");
SetPlayerVirtualWorld(playerid, h + 2000);
SetPlayerPosEx(playerid, HQInfo[h][HQInsideX],HQInfo[h][HQInsideY],HQInfo[h][HQInsideZ]);
SetPlayerInterior(playerid, HQInfo[h][HQInterior]);
SetCameraBehindPlayer(playerid);
}
}
if(IsPlayerInRangeOfPoint(playerid, 3, 9999.0685,-9999.6198,13.5382)) //Paintball Entrance
{
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);
}//-----------------------------[Prison Entrances]------------------------//
else if(IsPlayerInRangeOfPoint(playerid,2.0,1771.6210,-1547.4747,9.9129)) // Yard to Inside [Fun Time]
{
GameTextForPlayer(playerid,"~w~Objects Loading...",1000,5);
Pause(playerid);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid,1852.0464,-1732.5062,5202.5859);
}
else if(IsPlayerInRangeOfPoint(playerid,2.0,1769.3439,-1549.8958,9.9112)) // Yard to Inside [Prisoining]
{
GameTextForPlayer(playerid,"~w~Objects Loading...",1000,5);
Pause(playerid);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid,1864.7402,-1725.0553,5202.5859);
}
else if(IsPlayerInRangeOfPoint(playerid,2.0,1797.4753,-1579.0033,14.0861)) // Outside Prison to Inside
{
GameTextForPlayer(playerid,"~w~Objects Loading..",1000,5);
Pause(playerid);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1862.0128,-1700.4945,5202.5859);
}
//-----------------------------[Prison Entrances]------------------------//
else if(IsPlayerInRangeOfPoint(playerid,3.0,2755.3499,-2515.5325,13.6397)) // Gun Depot Enter Point
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerPos(playerid,2776.5386,-1492.2943,1066.2562);
GameTextForPlayer(playerid, "~w~Gun Depot", 5000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid,8.0,1765.7958,-1705.0437,13.4707)) // EMS new building
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerVirtualWorld(playerid, 101);
SetPlayerInterior(playerid,16);
SetPlayerPos(playerid,2046.1004638672,-1765.7945556641,767.94354248047);
GameTextForPlayer(playerid, "~w~E.M.S building", 5000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid,8.0,shax,shay,s haz)) //SHAMAL 1
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
if(PlayerInfo[playerid][pMask] == 1) format(string, sizeof(string), "> Stranger has entered the shamal.");
else format(string, sizeof(string), "> %s has entered the shamal.", RemoveUnderScore(playerid));
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
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
if(PlayerInfo[playerid][pMask] == 1) format(string, sizeof(string), "> Stranger has entered the shamal.");
else format(string, sizeof(string), "> %s has entered the shamal.", RemoveUnderScore(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
SetPlayerVirtualWorld(playerid, 1338);
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
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
if(PlayerInfo[playerid][pMask] == 1) format(string, sizeof(string), "> Stranger has entered the shamal.");
else format(string, sizeof(string), "> %s has entered the shamal.", RemoveUnderScore(playerid));
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, 1833.8832,-1125.6548,24.6721)) //V.I.P Lounge
{
if(PlayerInfo[playerid][pDonateRank] < 1) return SendClientMessage(playerid,COLOR_RED,"You're not VIP.");
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 10);
SetPlayerPos(playerid, 2365.81640625,-1706.4645996094,1195.7257080078);
GameTextForPlayer(playerid, "~b~V.I.P Lounge", 3000, 1);
}
/*else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1498.3635,-1580.5297,13.5498)) //Italian Resturant
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 4);
SetPlayerPos(playerid, 1564.7557373047,-1730.5688476563,1125.6225585938);
GameTextForPlayer(playerid, "~w~The Italian Resturant", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 328.2883,-1923.6836,1.4061)) //Santa Maria Resturant
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 1);
SetPlayerPos(playerid, -794.806396,497.738037,1376.195312);
GameTextForPlayer(playerid, "~w~Santa Maria Resturant", 3000, 1);
}*/
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1587.0557,-1730.1108,1441)) // Hall To Jails 2
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 5);
SetPlayerPos(playerid, 1587.4763,-1728.4971,1441);
GameTextForPlayer(playerid, "~w~Detention Facility", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1588.2921,-1745.8655,1441.2000)) // Prison Reception
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 5);
SetPlayerPos(playerid, 1589.6949,-1744.9985,1441.2000);
GameTextForPlayer(playerid, "~w~Prison Reception", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, -5.2309,-325.4293,5.4297)) // Prison Store
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 209.8902,-152.7066,-89.7323);
GameTextForPlayer(playerid, "~w~Prison Store", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, -30.8378,-361.3748,5.4297)) // Control Room
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, -27.0908,-379.4108,14.9761);
GameTextForPlayer(playerid, "~w~Control Room", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, -107.5323,-219.7949,2.0466)) // Another Infim.
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1148.3007,-1318.3501,1023.7019);
GameTextForPlayer(playerid, "~w~Infirmary Two", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, -5.2309,-325.4293,5.4297)) // Prison Store
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 5);
SetPlayerPos(playerid, 209.8902,-152.7066,-89.7323);
GameTextForPlayer(playerid, "~w~Prison Store", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1581.6827,-1730.2046,1441.2000)) // From Prison Hall to Jails
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 5);
SetPlayerPos(playerid, 1581.0818,-1728.5902,1441.1000);
GameTextForPlayer(playerid, "~w~Detention Facility", 3000, 1);
}
/*else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2233.2905,-1159.6998,25.8906)) // Jefferson Motel
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 15);
SetPlayerPos(playerid, 2215.454833,-1147.475585,1025.796875);
GameTextForPlayer(playerid, "~w~Jefferson Motel", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1547.3805,-1269.3496,17.4063)) // Tommy's Apartment
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1591.90002441,-1239.90002441,221.10000610);
GameTextForPlayer(playerid, "~w~Tommy's Apartment", 3000, 1);
}*/
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1833.8832,-1125.6548,24.6721)) // v.i.p Garage
{
if(PlayerInfo[playerid][pDonateRank] < 1) return SendClientMessage(playerid,COLOR_RED,"You're not VIP.");
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerPos(playerid, 2483.8914,2377.5178,7.5434);
SetPlayerInterior(playerid, 0);
GameTextForPlayer(playerid, "~b~ V.I.P Garage", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2297.8594,-1509.6943,26.8667)) // Royal Church Main Door
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, -2025.0823,1143.2609,18.0688);
GameTextForPlayer(playerid, "~w~Los Santos Royal Church", 3000, 1);
}
/*else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2139.1563,-1742.7773,13.5524)) // Ganton Sex Shop
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 3);
SetPlayerPos(playerid, -100.3464,-24.8610,1000.7188);
GameTextForPlayer(playerid, "~w~Ganton Sex Shop", 3000, 1);
}*/
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1524.4841,-1677.8577,6.2188)) // LSPD Training Place Enter
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 2195.96875,-1890.1411132813,903.56622314453);
GameTextForPlayer(playerid, "~b~L.S.P.D Training Range", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2034.1747,-1401.6726,17.2948)) // County Hospital
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 17);
SetPlayerPos(playerid, 2403.6315917969,-1873.8382568359,977.00183105469);
GameTextForPlayer(playerid, "~w~County Hospital", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2045.0454,-1913.2452,13.5469)) // DMV
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 3);
SetPlayerPos(playerid, -2029.798339,-106.675910,1035.171875);
GameTextForPlayer(playerid, "~w~Department Of Motor Vehicles", 3000, 1);
}
/*else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1333.4658,-1864.3909,13.5469)) // 2 Dragons Strip Club
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 3);
SetPlayerPos(playerid, -2637.0388,1402.2401,906.4609);
GameTextForPlayer(playerid, "~r~Two Dragons Strip Club", 3000, 1);
}*/
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 389.4164,-1162.6322,1227.8639)) // FBI Elevator which leads to Second Floor
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 17);
SetPlayerPos(playerid, 391.95086669922,-1159.1645507813,1235.4501953125);
GameTextForPlayer(playerid, "~r~F.B.I - Second Floor", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 393.1075,-1162.8607,1227.8639)) // FBI Elevator which leads to Prisons Floor
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 17);
SetPlayerPos(playerid, 397.96765136719,-1166.8763427734,1224.2651367188);
GameTextForPlayer(playerid, "~r~F.B.I - Prisons Floor", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2070.8240,-1793.8846,13.5533)) // Barber
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 3);
SetPlayerPos(playerid, 418.652984,-82.639793,1001.804687);
GameTextForPlayer(playerid, "~w~The Barber", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2508.3833,-2205.7219,13.5469)) // Drug Depot Enter from Outside
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 3);
SetPlayerPos(playerid, 2203.7878,-1817.9066,960.5386);
GameTextForPlayer(playerid, "~w~The Drug Depot", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2206.0955,-1821.6783,943.1324)) // Drug Depot Enter from Bottom
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 3);
SetPlayerPos(playerid, 2250.0303,-1791.3995,915.8544);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2312.1548,-1508.6281,26.8438)) // Los Santos Royal Church Interior
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 3);
SetPlayerPos(playerid, -2001.2556,1096.8164,18.8574);
GameTextForPlayer(playerid, "~w~Los Santos Royal Church", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2253.9475,-1333.1809,23.9815)) // Los Santos Church Main Door
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 6);
SetPlayerPos(playerid, 178.60601806641,-100.326538085942,1029.4976806641);
GameTextForPlayer(playerid, "~w~Los Santos Church", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1658.4365,-1691.3781,15.6094)) // FBI Door from Garage Which lead to Prisons
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 3);
SetPlayerPos(playerid, 385.1813,-1155.5437,1223.6608);
GameTextForPlayer(playerid, "~w~F.B.I Department", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1654.0979,-1655.1139,22.5156)) // FBI Door from Roof Which lead to Second Floor
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 3);
SetPlayerPos(playerid, 357.4144,-1166.8655,1234.8639);
GameTextForPlayer(playerid, "~w~F.B.I Department", 3000, 1);
}
/*else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2421.5442,-1219.2491,25.5612)) // PigPen
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 2);
SetPlayerPos(playerid, 1204.809936,-11.586799,1000.921875);
GameTextForPlayer(playerid, "~r~The PigPen", 3000, 1);
}*/
else if(IsPlayerInRangeOfPoint(playerid, 3.0, -86.0714,-299.3637,2.7646)) // Director Office of Prison
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, -220.3469,-251.2590,8.4680);
GameTextForPlayer(playerid, "~r~Director's Office", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2068.5889,-1779.9105,13.5596)) // Tatto
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 16);
SetPlayerPos(playerid, -204.439987,-26.453998,1002.273437);
GameTextForPlayer(playerid, "~r~Tatto Shop", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1742.9120,-1943.8079,13.5689)) // Unity Station from train to inside
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 17);
SetPlayerPos(playerid, -1973.2489,168.5225,539.0989);
GameTextForPlayer(playerid, "~w~Unity Station", 3000, 1);
}
/*else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2310.0693,-1643.5203,14.8270)) // Ten Green Bottles
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 11);
SetPlayerPos(playerid, 501.980987,-69.150199,998.757812);
GameTextForPlayer(playerid, "~w~Ten Green Bottles", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1296.4255,-1424.8632,14.9531)) // Bar near PB
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 1);
SetPlayerPos(playerid, 1358.6835,-488.1862,650.7677);
GameTextForPlayer(playerid, "~w~Two Elephants Resturant", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0,2105.4717,-1806.5591,13.5547)) // Pizza Stack
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 5);
SetPlayerPos(playerid, 372.2533,-133.3005,1001.4922);
GameTextForPlayer(playerid, "~w~Pizza Stack", 3000, 1);
}*/
else if(IsPlayerInRangeOfPoint(playerid, 2.5, 2487.7549,2397.2488,4.2109)) //VIP Garage to lounge / lounge to garge
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerPos(playerid, 2417.8186,-1705.3455,1195.0190);
SetPlayerInterior(playerid, 10);
GameTextForPlayer(playerid,"~b~V.I.P Lounge", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 2.5, 849.5972,-1519.9574,14.3481)) //SS
{
if(IsAnAgent(playerid))
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerPos(playerid, 2145.3159,1597.3687,1003.9677);
SetPlayerInterior(playerid, 1);
GameTextForPlayer(playerid,"~w~ The Secret Service", 3000, 1);
}
else
{
SendClientMessage(playerid, COLOR_GREY,"You are not a Member of the Secret Service Orgnization");
return 1;
}
}
else if(IsPlayerInRangeOfPoint(playerid, 2.5, 1769.8843,-1867.9167,13.5696)) //Unity Station People Entrance
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerPos(playerid, -2007.7353515625,176.60624694824,540.34661865234);
SetPlayerInterior(playerid, 15);
GameTextForPlayer(playerid,"~w~Unity Station", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 2.5, 1752.4977,-1894.1453,13.5574)) //Unity Station Workers Entrance
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerPos(playerid, -1961.6540527344,164.9091796875,546.71893310547);
SetPlayerInterior(playerid, 15);
GameTextForPlayer(playerid,"~w~Unity Station", 3000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 5.0, 2229.7354,-1721.5267,13.5639)) //Gym
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerPos(playerid, 772.111999,-3.898649,1000.728820);
SetPlayerInterior(playerid, 5);
GameTextForPlayer(playerid,"~w~Los Santos Gym", 3000, 1);
}
/*else if(IsPlayerInRangeOfPoint(playerid, 2.5, 1786.9857,-1720.8442,13.5426)) // Chinese Resturant
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerPos(playerid, 1026.8576660156,-1309.5942382813,-20.835353851318);
SetPlayerInterior(playerid, 6);
GameTextForPlayer(playerid,"~w~China Resturant", 3000, 1);
}*/
else if(IsPlayerInRangeOfPoint(playerid,3.0,626.9654,-571.7671,17.9207)) //SASD
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 5);
SetPlayerPos(playerid, 322.2817,303.3415,999.1484);
SetPlayerFacingAngle( playerid, 0.0000);
GameTextForPlayer(playerid, "~w~S.A.S.D", 5000, 1);
PlayerInfo[playerid][pInt] = 5;
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid,3.0,1676.8248,-1634.7830,14.2266)) //FBI building
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 10);
SetPlayerPos(playerid, 367.62509155273,-1149.8499755859,1228.7457275391);
SetPlayerFacingAngle(playerid, 0.0000);
GameTextForPlayer(playerid, "~w~Federal Bureau of Investigation", 5000, 1);
PlayerInfo[playerid][pInt] = 10;
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1601.9219,-2157.7139,13.7401)) //FIRE DEPARTMENT ENTERANCE
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 3);
SetPlayerPos(playerid, 368.0984,162.2898,1019.9844);
PlayerInfo[playerid][pInt] = 3;
GameTextForPlayer(playerid, "~r~E.M.S HeadQuarters", 5000, 1);
SetPlayerFacingAngle(playerid, 90.0);
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1172.6975, -1325.3914, 15.4019)) //HOSPITAL GROUND ENTER (NEW)
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 1);
SetPlayerPos(playerid, 1199.0801,-1366.3083,1017.8790);
PlayerInfo[playerid][pInt] = 1;
GameTextForPlayer(playerid, "~r~All Saints ~n~~w~Medical Center", 5000, 1);
SetPlayerFacingAngle(playerid, 271.3973);
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1154.5345, -1343.6583, 26.6953)) //HOSPITAL ROOF ENTER (NEW)
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 1);
SetPlayerPos(playerid, 1216.2145,-1379.2618,1029.4714);
PlayerInfo[playerid][pInt] = 1;
GameTextForPlayer(playerid, "~r~All Saints ~n~~w~Medical Center", 5000, 1);
SetPlayerFacingAngle(playerid, 1.0922);
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid, 3, 1568.6840,-1691.0090,5.8906)) //Garage-LSPD Enterance
{
if(IsACop(playerid))
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 6);
SetPlayerPos(playerid,246.4211,87.0546,1003.6406);
SetCameraBehindPlayer(playerid);
GameTextForPlayer(playerid, "~w~Los Santos~n~~r~Police Department", 5000, 1);
SetPlayerFacingAngle(playerid, 180.0000);
PlayerInfo[playerid][pInt] = 6;
}
}
else if(IsPlayerInRangeOfPoint(playerid, 3, 1564.8468,-1666.1549,28.3956)) //LSPD Roof-LSPD Enterance
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 6);
SetPlayerPos(playerid,242.7468,66.3155,1003.6406);
SetCameraBehindPlayer(playerid);
GameTextForPlayer(playerid, "~w~Los Santos~n~~r~Police Department", 5000, 1);
SetPlayerFacingAngle(playerid, 270.0);
PlayerInfo[playerid][pInt] = 6;
}
else if(IsPlayerInRangeOfPoint(playerid, 3, 1554.5262,-1675.7283,16.1953)) //LSPD enter
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerPos(playerid,246.7284,62.6640,1003.6406);
SetCameraBehindPlayer(playerid);
GameTextForPlayer(playerid, "~w~Los Santos~n~~r~Police Department", 5000, 1);
SetPlayerFacingAngle(playerid, 90.0000);
SetPlayerInterior(playerid, 6);
PlayerInfo[playerid][pInt] = 6;
}
else if(IsPlayerInRangeOfPoint(playerid, 3, 2447.8350,-1962.6876,13.5469)) //Los Santos Export Depot
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerPos(playerid,2573.0928,-1302.0148,1044.1250);
SetCameraBehindPlayer(playerid);
PlayerInfo[playerid][pInt] = 2;
SetPlayerInterior(playerid, 2);
GameTextForPlayer(playerid, "~w~Los Santos ~n~Export Depot building", 5000, 1);
SetPlayerFacingAngle(playerid, 270.0000);
}
/*else if(IsPlayerInRangeOfPoint(playerid,3.0,1038.2180,-1340.5763,13.7432)) //Donut Store
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 17);
SetPlayerPos(playerid, 377.1611,-191.6544,1000.6328);
SetPlayerFacingAngle(playerid, 0.0000);
GameTextForPlayer(playerid, "~w~Jim's Sticky Ring", 5000, 1);
PlayerInfo[playerid][pInt] = 17;
SetCameraBehindPlayer(playerid);
}*/
else if(IsPlayerInRangeOfPoint(playerid,3.0,1481.0209,-1770.9374,18.7958)) //City Hall
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 3);
SetPlayerPos(playerid, 384.5713,173.6477,1008.3828);
SetPlayerFacingAngle(playerid, 90.0000);
GameTextForPlayer(playerid, "~w~ City Hall", 5000, 1);
PlayerInfo[playerid][pInt] = 3;
SetCameraBehindPlayer(playerid);
}
/*else if(IsPlayerInRangeOfPoint(playerid,3.0, 1244.7333, 205.3294, 19.6454)) // Donut Store Enterance
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerVirtualWorld(playerid, 3);
SetPlayerInterior(playerid, 17);
SetPlayerPos(playerid, 377.1611,-191.6544,1000.6328);
SetPlayerFacingAngle(playerid, 0.0000);
PlayerInfo[playerid][pInt] = 17;
PlayerInfo[playerid][pVirtualWorld] = 3;
GameTextForPlayer(playerid, "~w~Montgomery ~n~~r~Cafe", 5000, 1);
SetCameraBehindPlayer(playerid);
}*/
else if(IsPlayerInRangeOfPoint(playerid,3.0, -13.0313,-335.9020,5.4297)) // Cafeteria Enterance
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 4);
SetPlayerPos(playerid, 459.2668, -88.6474, 999.5547);
SetPlayerFacingAngle(playerid, 89.9299);
PlayerInfo[playerid][pInt] = 4;
GameTextForPlayer(playerid, "~w~Cafeteria", 5000, 1);
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid,3.0,-174.2122,-247.5509,1.4297)) //Infirmary
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerPos(playerid, 268.7222,1862.8405,8.7578);
GameTextForPlayer(playerid, "~w~Infirmary One", 5000, 1);
SetPlayerFacingAngle(playerid, 180.0);
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid,3.0,-49.8847,-269.3661,6.6332)) //Doc building
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid, 18);
SetPlayerPos(playerid, -202.2018,-204.9514,14.0696);
GameTextForPlayer(playerid, "~w~Department of Correction", 5000, 1);
SetPlayerFacingAngle(playerid, 90.0000);
PlayerInfo[playerid][pInt] = 18;
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid,3.0,2695.6235,-1704.6960,11.8438))
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid,7);
SetPlayerPos(playerid,-1404.5299,-259.0602,1043.6563);
GameTextForPlayer(playerid, "~w~Welcome to the 8ball Track", 5000, 1);
PlayerInfo[playerid][pInt] = 7;
}
else if(IsPlayerInRangeOfPoint(playerid,8.0,-2111.5686,-443.9720,38.7344))
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid,4);
SetPlayerPos(playerid,-1443.0554,-581.1879,1055.0472);
GameTextForPlayer(playerid, "~w~Welcome to the Dirt Track", 5000, 1);
PlayerInfo[playerid][pInt] = 4;

}
else if(IsPlayerInRangeOfPoint(playerid,8.0,-2080.3079,-406.0309,38.7344))
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerInterior(playerid,14);
SetPlayerPos(playerid,-1464.7732,1557.5533,1052.5313);
GameTextForPlayer(playerid, "~w~Welcome to the Stunting Track", 5000, 1);
PlayerInfo[playerid][pInt] = 14;
}
}
return 1;
}
/* if(PRESSED(KEY_YES))
{
new playaveh = GetPlayerVehicleID(playerid);
if(!IsPlayerInAnyVehicle(playerid)) return 1;
if(GetVehicleModel(playaveh) != 408 && GetVehicleModel(playaveh) != 509)
{
if(Radio[playaveh] >= 0 && Radio[playaveh] < RADIOS)
{
Radio[playaveh]++;
new string[128],
playanamee[MAX_PLAYER_NAME+1];
GetPlayerName(playerid, playanamee, MAX_PLAYER_NAME);
if(Radio[playaveh] > 1)
{
format(string, sizeof(string), "* %s changes the radio station.", playanamee);
}
else if(Radio[playaveh] == 1)
{
format(string, sizeof(string), "* %s turns on the radio.", playanamee);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
for(new i=0;i<MAX_PLAYERS;i++)
{
if(GetPlayerVehicleID(i) == playaveh)
{
RadioChoose(i, Radio[playaveh]);
}
}
}
}
}
if(PRESSED(KEY_NO))
{
new playaveh = GetPlayerVehicleID(playerid);
if(!IsPlayerInAnyVehicle(playerid)) return 1;
if(GetVehicleModel(playaveh) != 408 && GetVehicleModel(playaveh) != 509)
{
if(Radio[playaveh] > 0 && Radio[playaveh] <= RADIOS)
{
Radio[playaveh]--;
new playanamee[MAX_PLAYER_NAME+1],
string[128];
GetPlayerName(playerid, playanamee,sizeof(playanamee));
if(Radio[playaveh])
{
format(string, sizeof(string), "* %s changes the radio station.", playanamee);
}
else
{
format(string, sizeof(string), "* %s turns off the radio.", playanamee);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
for(new i=0;i<MAX_PLAYERS;i++)
{
if(GetPlayerVehicleID(i) == playaveh)
{
RadioChoose(i, Radio[playaveh]);
}
}
}
}
}*/
new string[128];
if(newkeys == KEY_SECONDARY_ATTACK)
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerInRangeOfPoint(playerid, 1, 2021.9740,2235.6626,2103.9536))
{
new Float:busx, Float:busy, Float:busz, Float:angle;
if(BusID[playerid] == 1)
{
GetVehiclePos(NPCBlueBus, busx, busy, busz);
GetVehicleZAngle(NPCBlueBus, angle);
}
else
{
GetVehiclePos(NPCBlackBus, busx, busy, busz);
GetVehicleZAngle(NPCBlackBus, angle);
}
GetPlayerName(playerid, string, sizeof(string));
format(string, sizeof(string), "%s opens the door and exits the bus.", string);
for(new i=0; i<MAX_PLAYERS; i++)
{
if(BusID[i] == BusID[playerid])
{
SendClientMessage(i, COLOR_PURPLE, string);
}
}
angle = 360 - angle;
busx = floatsin(angle,degrees) * 1.5 + floatcos(angle,degrees) * 1.5 + busx;
busy = floatcos(angle,degrees) * 1 - floatsin(angle,degrees) * 1 + busy;
busz = 1 + busz;
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, busx, busy, busz);
BusID[playerid] = 0;
KillTimer(costtimer);
format(string, sizeof(string), "~r~-$%d", BusCost[playerid]);
GameTextForPlayer(playerid, string, 3000, 1);
GivePlayerMoney(playerid, -BusCost[playerid]);
BusCost[playerid] = 0;
}
}
}
if(newkeys == KEY_CROUCH)
{
if(IsPlayerNPC(playerid))
{
new npcvehicle = GetPlayerVehicleID(playerid);
if(npcvehicle == NPCBlueBus)
{
if(IsPlayerInRangeOfPoint(playerid, 100, 2868.9033,-1416.4062,11.0131))
{
format(string, sizeof(string), "[Bus Driver] The Bus has reached East Beach.");
}
else if(IsPlayerInRangeOfPoint(playerid, 100, 2636.3242,-1693.125,10.9544))
{
format(string, sizeof(string), "[Bus Driver] The Bus has reached The Stadium.");
}
else if(IsPlayerInRangeOfPoint(playerid, 100, 2243.8457,-1725.9121,13.5960))
{
format(string, sizeof(string), "[Bus Driver] The Bus has reached The Gym.");
}
else if(IsPlayerInRangeOfPoint(playerid, 100, 1948.3310,-1454.3525,13.5960))
{
format(string, sizeof(string), "[Bus Driver] The Bus has reached The County General Hospital.");
}
else if(IsPlayerInRangeOfPoint(playerid, 100, 1571.0644,-2188.0107,13.6260))
{
format(string, sizeof(string), "[Bus Driver] The Bus has reached Los Santos International Airport.");
}
else if(IsPlayerInRangeOfPoint(playerid, 100, 1712.9423,-1818.7148,13.6260))
{
format(string, sizeof(string), "[Bus Driver] The Bus has reached The Taxi Stand.");
}
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerInRangeOfPoint(i, 10, 2021.9390,2241.9487,2103.9536) && BusID[i] == 1)
{
SendClientMessage(i, COLOR_OFFWHITE, string);
PlayerPlaySound(i, 1147, 0.0, 0.0, 0.0);
}
}
}
else if(npcvehicle == NPCBlackBus)
{
if(IsPlayerInRangeOfPoint(playerid, 100, 1567.0966,-1725.4755,13.6260))
{
format(string, sizeof(string), "[Bus Driver] The Bus has reached The Police Department.");
}
else if(IsPlayerInRangeOfPoint(playerid, 100, 1503.9716,-1027.7617,23.7701))
{
format(string, sizeof(string), "[Bus Driver] The Bus has reached The Bank.");
}
else if(IsPlayerInRangeOfPoint(playerid, 100, 1188.8359,-1354.6279,13.6483))
{
format(string, sizeof(string), "[Bus Driver] The Bus has reached All Saints Hospital.");
}
else if(IsPlayerInRangeOfPoint(playerid, 100, 861.7125,-1313.3009,13.6260))
{
format(string, sizeof(string), "[Bus Driver] The Bus has reached Market Station.");
}
else if(IsPlayerInRangeOfPoint(playerid, 100, 393.6944,-1766.2702,5.6197))
{
format(string, sizeof(string), "[Bus Driver] The Bus has reached Santa Maria Beach.");
}
else if(IsPlayerInRangeOfPoint(playerid, 100, 1705.5898,-1805.8476,13.5300))
{
format(string, sizeof(string), "[Bus Driver] The Bus has reached The Taxi Stand.");
}
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerInRangeOfPoint(i, 10, 2021.9390,2241.9487,2103.9536) && BusID[i] == 2)
{
SendClientMessage(i, COLOR_OFFWHITE, string);
PlayerPlaySound(i, 1147, 0.0, 0.0, 0.0);
}
}
}
}
}
if(newkeys == KEY_FIRE)
{
if(PlayerSitting[playerid] == 1)
{
ClearAnimations(playerid, 1);
PlayerSitting[playerid] = 0;
}
}
if(IsPlayerInAnyVehicle(playerid))
{
if(newkeys & KEY_YES)
{
new vehicleid = GetPlayerVehicleID(playerid),newstation = v_VehicleInfo[vehicleid][RadioPlaying] + 1;
if(newstation == RadioCount) newstation = 0;
SetRadioStation(vehicleid,newstation);
return 1;
}
else if(newkeys & KEY_NO)
{
new vehicleid = GetPlayerVehicleID(playerid),newstation = v_VehicleInfo[vehicleid][RadioPlaying] - 1;
if(newstation == -1) newstation = RadioCount - 1;
SetRadioStation(vehicleid,newstation);
return 1;
}
}
if(PRESSED(KEY_FIRE))
{
if(HazPizza[playerid] == 1)
{
if(IsPlayerAttachedObjectSlotUsed(playerid, 0)) RemovePlayerAttachedObject(playerid, 0);
ClearAnimations(playerid);
SendClientMessage(playerid, COLOR_GREY,"Info : You have throw your Pizza [Note : your Health has increased with 30 Percent]");
HazPizza[playerid] = 0;
}
}
/*if(PRESSED(KEY_SECONDARY_ATTACK))
{
new string[128];
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
for(new i = 0; i < sizeof(ATMInfo); i++)
{
if(IsPlayerInRangeOfPoint(playerid, 2, ATMInfo[i][ATMX], ATMInfo[i][ATMY], ATMInfo[i][ATMZ]))
{
if(!(PlayerInfo[playerid][pATMcard] == 1)) return SendClientMessage(playerid,COLOR_GREY," You don't have an ATM Card - Get One from any Bank");
{
if(ATMInfo[i][ATMLocked] == 0)
{
PlayerInfo[playerid][ATMID] = i;
format(string,sizeof(string),"Los Santos ATM\nYou have a total of $%d in your Bank account\nType below the amount of money you want to withdraw:", PlayerInfo[playerid][pAccount]);
ShowPlayerDialog(playerid,59,DIALOG_STYLE_INPUT,"Los Santos ATM",string,"Withdraw","Cancel");
format(string, sizeof(string), "* %s presses a button and checks its balance.", PlayerName(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
}
else
{
GameTextForPlayer(playerid, "~r~ATM is unavailable!", 1000, 5);
}
}
}
}
}*/
if(PRESSED(KEY_FIRE))
{
if(PlantedC4OnVault[playerid] == 1)
{
TakeWeapon(playerid, 40);
RobStatus[BeingRobbed] = 1;
RobStatus[Setup] = 0;
SetPlayerCheckpoint(RobStatus[RobberID1], -1632.1014,-2238.9224,31.4766, 5);
SetPlayerCheckpoint(RobStatus[RobberID2], -1632.1014,-2238.9224,31.4766, 5);
SetPlayerCheckpoint(RobStatus[RobberID3], -1632.1014,-2238.9224,31.4766, 5);
SetPlayerCheckpoint(RobStatus[RobberID4], -1632.1014,-2238.9224,31.4766, 5);
SetPlayerCheckpoint(RobStatus[RobberID5], -1632.1014,-2238.9224,31.4766, 5);
SendClientMessage(RobStatus[RobberID1], COLOR_YELLOW, "You need to load the cash and get the safe point quickly, (( /loadcash ))");
SendClientMessage(RobStatus[RobberID2], COLOR_YELLOW, "You need to load the cash and get the safe point quickly, (( /loadcash ))");
SendClientMessage(RobStatus[RobberID3], COLOR_YELLOW, "You need to load the cash and get the safe point quickly, (( /loadcash ))");
SendClientMessage(RobStatus[RobberID4], COLOR_YELLOW, "You need to load the cash and get the safe point quickly, (( /loadcash ))");
SendClientMessage(RobStatus[RobberID5], COLOR_YELLOW, "You need to load the cash and get the safe point quickly, (( /loadcash ))");
SendFamilyMessage(1, COLOR_DBLUE, "------------------------------------------------------------");
SendFamilyMessage(2, COLOR_DBLUE, "------------------------------------------------------------");
SendFamilyMessage(3, COLOR_DBLUE, "------------------------------------------------------------");
SendFamilyMessage(4, COLOR_DBLUE, "------------------------------------------------------------");
SendFamilyMessage(5, COLOR_DBLUE, "------------------------------------------------------------");
SendFamilyMessage(6, COLOR_DBLUE, "------------------------------------------------------------");
SendFamilyMessage(7, COLOR_DBLUE, "------------------------------------------------------------");
PlayerInfo[RobStatus[RobberID1]][pWantedLevel] = 6;
PlayerInfo[RobStatus[RobberID2]][pWantedLevel] = 6;
PlayerInfo[RobStatus[RobberID3]][pWantedLevel] = 6;
PlayerInfo[RobStatus[RobberID4]][pWantedLevel] = 6;
PlayerInfo[RobStatus[RobberID5]][pWantedLevel] = 6;
SetPlayerWantedLevel(RobStatus[RobberID1], 6);
SetPlayerWantedLevel(RobStatus[RobberID2], 6);
SetPlayerWantedLevel(RobStatus[RobberID3], 6);
SetPlayerWantedLevel(RobStatus[RobberID4], 6);
SetPlayerWantedLevel(RobStatus[RobberID5], 6);
format(string, sizeof(string), "** The Los Santos Bank and Trust vault has been destroyed! **");
SendFamilyMessage(1, COLOR_DCHAT, string);
SendFamilyMessage(2, COLOR_DCHAT, string);
SendFamilyMessage(3, COLOR_DCHAT, string);
SendFamilyMessage(4, COLOR_DCHAT, string);
SendFamilyMessage(5, COLOR_DCHAT, string);
SendFamilyMessage(6, COLOR_DCHAT, string);
SendFamilyMessage(7, COLOR_DCHAT, string);
SendFamilyMessage(1, COLOR_DBLUE, "------------------------------------------------------------");
SendFamilyMessage(2, COLOR_DBLUE, "------------------------------------------------------------");
SendFamilyMessage(3, COLOR_DBLUE, "------------------------------------------------------------");
SendFamilyMessage(4, COLOR_DBLUE, "------------------------------------------------------------");
SendFamilyMessage(5, COLOR_DBLUE, "------------------------------------------------------------");
SendFamilyMessage(6, COLOR_DBLUE, "------------------------------------------------------------");
SendFamilyMessage(7, COLOR_DBLUE, "------------------------------------------------------------");
SendClientMessageToAll(COLOR_LIGHTGREEN, "|-------------------Breaking News-------------------------|");
SendClientMessageToAll(COLOR_ORANGE, "News : Los Santos Local Bank Is Currentley Being Robbed");
SendClientMessageToAll(COLOR_ORANGE, "News : We hope that the PD Reach the Place Immediatley");
SendClientMessageToAll(COLOR_ORANGE, "News : Stay with us for More News");
SendClientMessageToAll(COLOR_LIGHTGREEN, "|-------------------Breaking News-------------------------|");
CreateExplosion(2311.6367,-0.4778,26.7422, 2, 4);
DestroyDynamicObject(bankvault1);
bankvault2 = CreateDynamicObject(2634,2312.11059570,-2.66468596,26.48641968,53.75942993,296.31378174,25 4.48004150); // Vault Exploded
PlantedC4OnVault[playerid] = 0;
}
if(RampToggle[playerid] == 1)
{ // admin ramp
if((GetPlayerState(playerid) == PLAYER_STATE_DRIVER || GetPlayerState(playerid) == PLAYER_STATE_PASSENGER))
{
new Float: X, Float: Y, Float: Z, Float: A;
GetXYInFrontOfPlayer(playerid, X, Y, Z, A, 0.1);
ramp = CreateDynamicObject(RAMP, X, Y, Z, 0.0, 0.0, A);
SetTimerEx("Delete", TIME, 0, "d", ramp);
}
}
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_DRINK_SPRUNK)
{
if(UseDrinkTimer[playerid]) return 1;
new Float:health;
GetPlayerHealth(playerid,health);
if(health < 100.0)
{
if(health+5 > 100.0)
{
SetPlayerHealth(playerid, 100);
}
else
{
SetPlayerHealth(playerid, health+5);
}
UseDrinkTimer[playerid] = true;
SetTimerEx("UseDrink",2*1000,0,"i",playerid);
}
}
if(BombID[playerid] != 0)
{
if(GetPlayerWeapon(playerid) == 0)
{
if(!IsPlayerInAnyVehicle(playerid))
{
ClearAnimations(playerid);
ApplyAnimation(playerid,"PED","bomber",4.0,0,0,0,0,0);
}
new Float:X,Float:Y,Float:Z;
GetObjectPos(BombID[playerid],X,Y,Z);
DestroyDynamicObject(BombID[playerid]);
CreateExplosion(X,Y,Z,12,1);
BombID[playerid] = 0;
SetPlayerWeapons(playerid);
new killerid = GoChase[playerid];
if(IsPlayerInRangeOfPoint(killerid,3,X,Y,Z))
{
if(GoChase[playerid] == killerid)
{
if(PlayerInfo[killerid][pHeadValue] > 0)
{
new price = PlayerInfo[killerid][pHeadValue];
new name[MAX_PLAYER_NAME];
new killa[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
GetPlayerName(killerid, killa, sizeof(killa));
PlayerInfo[killerid][pCash] = PlayerInfo[killerid][pCash]-price/2;
GivePlayerMoney(killerid, -price/2);
PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]+price/2;
GivePlayerMoney(playerid, price/2);
format(string,128,"Hitman %s has fulfilled the contract on %s and collected $%d.",name,killa,price/2);
SendFamilyMessage(8, COLOR_YELLOW, string);
format(string,128,"You have been critically injured by a hitman and lost $%d.",price/2);
SendClientMessage(killerid, COLOR_YELLOW, string);
SetPlayerHealth(killerid, 0);
ClearContract(killerid);
GoChase[playerid] = 999;
PlayerInfo[playerid][pCHits]++;
}
}
}
}
}
}
if((newkeys & KEY_FIRE))
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
for(new i = 0; i < sizeof(Trashmaster); i++)
{
if(PlayerInfo[playerid][HoldingObject] == 1)
{
new Float:tmx, Float:tmy, Float:tmz;
GetVehiclePos(Trashmaster[i], tmx, tmy, tmz);
if(IsPlayerInRangeOfPoint(playerid, 5.0, tmx, tmy, tmz))
{
format(string, sizeof(string), " %s reaches into the dumpster and throws the trash bag", name);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
RemovePlayerAttachedObject(playerid, 0);
PlayerInfo[playerid][HoldingObject] = 0;
PlayerInfo[playerid][pTrash] ++;
switch(PlayerInfo[playerid][pTrash])
{
case 1:
{
SetPlayerCheckpoint(playerid, 2798.1355,-1080.6475,30.7198, 3.0);
SendClientMessage(playerid, COLOR_WHITE,"< Trash-Master Radio : Take the Trash-Master to the next Pickup >");
}
case 2:
{
SetPlayerCheckpoint(playerid, 2510.2324,-1031.1870,70.0021, 3.0);
SendClientMessage(playerid, COLOR_WHITE,"< Trash-Master Radio : Take the Trash-Master to the next Pickup >");
}
case 3:
{
SetPlayerCheckpoint(playerid, 1988.3920,-1087.9877,24.8313 , 3.0);
SendClientMessage(playerid, COLOR_WHITE,"< Trash-Master Radio : Take the Trash-Master to the next Pickup >");
}
case 4:
{
SetPlayerCheckpoint(playerid, 2113.9319,-1718.3832,13.5469, 3.0);
SendClientMessage(playerid, COLOR_WHITE,"< Trash-Master Radio : Take the Trash-Master to the next Pickup >");
}
case 5:
{
SetPlayerCheckpoint(playerid, 1936.8923,-1794.7124,13.5469, 3.0);
SendClientMessage(playerid, COLOR_WHITE,"< Trash-Master Radio : Take the Trash-Master to the next Pickup >");
}
case 6:
{
SetPlayerCheckpoint(playerid, 1325.6031,-1724.6348,13.5469, 3.0);
SendClientMessage(playerid, COLOR_WHITE,"< Trash-Master Radio : Take the Trash-Master to the next Pickup >");
}
case 7:
{
SetPlayerCheckpoint(playerid, 1362.3849,-1485.4042,13.5469, 3.0);
SendClientMessage(playerid, COLOR_WHITE,"< Trash-Master Radio : Take the Trash-Master to the next Pickup >");
}
case 8:
{
SetPlayerCheckpoint(playerid, 1204.3912,-1506.3314,13.5401, 3.0);
SendClientMessage(playerid, COLOR_WHITE,"< Trash-Master Radio : Take the Trash-Master to the next Pickup >");
}
case 9:
{
SetPlayerCheckpoint(playerid, 1392.5845,-1879.6696,13.5469, 3.0);
SendClientMessage(playerid, COLOR_WHITE,"< Trash-Master Radio : Take the Trash-Master to the next Pickup >");
}
case 10:
{
SetPlayerCheckpoint(playerid, 1828.5490,-1890.5249,13.4904, 3.0);
SendClientMessage(playerid, COLOR_WHITE,"< Trash-Master Radio : Take the Trash-Master to the next Pickup>");
}
case 11:
{
SetPlayerCheckpoint(playerid, 2196.4490,-1977.1947,13.5527, 3.0);
CP[playerid] = 1503;
SendClientMessage(playerid, COLOR_WHITE,"< Trash-Master Radio : Take the Trash-Master back to the Parking point to take your PayCheck");
}
}
}
}
}
}
if(newkeys & KEY_FIRE && newkeys & KEY_HANDBRAKE)
{
if(GetPlayerWeapon(playerid) == 34 && PlayerInfo[playerid][pScope] == 1)
{
if(RecentlyShot[playerid] == 0)
{
RecentlyShot[playerid] = 1;
SetTimerEx("AntiSpam", 1000, false, "d", playerid);
{
new Float:blahx, Float:blahy, Float:blahz;
HeadshotCheck(playerid, blahx, blahy, blahz);
}
}
}
}
if(!gPlayerUsingLoopingAnim[playerid]) { return 1; }
if(IsKeyJustDown(KEY_SPRINT,newkeys,oldkeys))
{
PlayerHurt[playerid] = 0;
StopLoopingAnim(playerid);
TextDrawHideForPlayer(playerid,txtAnimHelper);
}
if(PRESSED(newkeys, KEY_SUBMISSION)&&(IsPlayerInAnyVehicle(playerid))&&(GetPlayerState(playerid) == PLAYER_STATE_DRIVER))
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 525)
{
new Float:ppX,Float:ppY,Float:ppZ;
GetPlayerPos(playerid,ppX,ppY,ppZ);
new Float:vvX,Float:vvY,Float:vvZ;
new Found=0;
new vid=0;
while((vid<MAX_VEHICLES)&&(!Found))
{
vid++;
GetVehiclePos(vid,vvX,vvY,vvZ);
if ((floatabs(ppX-vvX)<7.0)&&(floatabs(ppY-vvY)<7.0)&&(floatabs(ppZ-vvZ)<7.0)&&(vid!=GetPlayerVehicleID(playerid)))
{
Found=1;
if (IsTrailerAttachedToVehicle(GetPlayerVehicleID(pla yerid)))
{
DetachTrailerFromVehicle(GetPlayerVehicleID(player id));
}
else
{
AttachTrailerToVehicle(vid,GetPlayerVehicleID(play erid));
}
}
}
if (!Found)
{
SendClientMessage(playerid,COLOR_GREY," There is no car in range !");
}
}
}
return 1;
}

Konstantinos
13/11/2013, 06:57 PM
You're missing a closed bracket } at the end.

Just declare string before, so replace:

if( ( newkeys & KEY_SPRINT) && !( oldkeys & KEY_SPRINT ) )
{
if( GetPlayerState( playerid ) == PLAYER_STATE_ONFOOT )
{
new Float:shax, Float:shay, Float:shaz;
new Float:shbx, Float:shby, Float:shbz;
new Float:shcx, Float:shcy, Float:shcz;

to:

if( ( newkeys & KEY_SPRINT) && !( oldkeys & KEY_SPRINT ) )
{
if( GetPlayerState( playerid ) == PLAYER_STATE_ONFOOT )
{
new Float:shax, Float:shay, Float:shaz;
new Float:shbx, Float:shby, Float:shbz;
new Float:shcx, Float:shcy, Float:shcz;
new string[128];


And the line 25871?

whando
13/11/2013, 07:01 PM
if(PlayerInfo[playerid][pSafeSpawn] == 1)
{//FINISHED TUTORIAL
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid, 0);
//SetSpawnInfo(playerid, -1, 59, 1733.1367,-1911.9568,13.5621, 1.0, -1, -1, -1, -1, -1, -1);
SetPlayerPos(playerid,1685.8459,-2238.4226,13.5469,2.4474);
SetPlayerFacingAngle(playerid, 90);
SetCameraBehindPlayer(playerid);
PlayerInfo[playerid][pSafeSpawn] = 0;
StopAudioStreamForPlayer(playerid);
}


SetPlayerPos(playerid,1685.8459,-2238.4226,13.5469,2.4474);

Konstantinos
13/11/2013, 07:07 PM
SetPlayerPos uses 4 parameters (playerid, x, y and z), not 5.

Change to:

SetPlayerPos(playerid,1685.8459,-2238.4226,13.5469);


I assume the 2.4474 was the angle that you set to 90 below.

whando
13/11/2013, 07:13 PM
Okay thanks! Just one more thing, how do I get my /exit also in there?


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.", RemoveUnderScore(playerid));
}
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)
{
PlayerPaintballing[playerid] = 0;
TogglePlayerControllable(playerid, 1);
SetPlayerArmour(playerid, pKevlar[playerid]);
SetPlayerHealth(playerid, pHP[playerid]);
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,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_PURPL E,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(MInfo); i++)
{
if(IsPlayerInRangeOfPoint(playerid, 3, MInfo[PlayerInfo[playerid][Inmotel]][mInteriorX], MInfo[PlayerInfo[playerid][Inmotel]][mInteriorY], MInfo[i][mInteriorZ]))
{
if(GetPlayerInterior(playerid) == MInfo[PlayerInfo[playerid][Inmotel]][mInteriorID] && GetPlayerVirtualWorld(playerid) >= 0)
{
if(PlayerInfo[playerid][Inmotel] != 0)
{
PlayerInfo[playerid][pVirtualWorld] = 0;
SetPlayerVirtualWorld( playerid, 0 );
SetPlayerInterior( playerid, MInfo[PlayerInfo[playerid][Inmotel]][mExteriorID]);
SetPlayerPos( playerid, MInfo[PlayerInfo[playerid][Inmotel]][mExteriorX], MInfo[PlayerInfo[playerid][Inmotel]][mExteriorY], MInfo[PlayerInfo[playerid][Inmotel]][mExteriorZ]);
PlayerInfo[playerid][Inmotel] = 0;
}
else
{
PlayerInfo[playerid][pVirtualWorld] = 0;
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, MInfo[i][mExteriorID]);
SetPlayerPos(playerid, MInfo[i][mExteriorX], MInfo[i][mExteriorY], MInfo[i][mExteriorZ]);
}
}
}
}
for(new h = 0; h < sizeof(HQInfo); h++)
{
if(IsPlayerInRangeOfPoint(playerid,2.0,HQInfo[h][HQInsideX],HQInfo[h][HQInsideY],HQInfo[h][HQInsideZ]))
{
if(GetPlayerVirtualWorld(playerid) == h + 2000)
{
if(HQInfo[h][HQLocked]) return SendClientMessage(playerid, GREY, "HQ is locked.");
SetPlayerPosEx(playerid, HQInfo[h][HQEnterX],HQInfo[h][HQEnterY],HQInfo[h][HQEnterZ]);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
SetCameraBehindPlayer(playerid);
}
}
}
for(new h = 0; h < sizeof(EntranceInfo); h++)
{
if(IsPlayerInRangeOfPoint(playerid,EntranceInfo[h][EntranceExitRadius],EntranceInfo[h][EntranceInsideX],EntranceInfo[h][EntranceInsideY],EntranceInfo[h][EntranceInsideZ]))
{
if(GetPlayerVirtualWorld(playerid) == EntranceInfo[h][EntranceVirtualWorld])
{
if (EntranceInfo[h][EntranceLocked]) return SendClientMessage(playerid, GREY, "This entrance is locked.");
if (EntranceInfo[h][EntranceTeleVeh] == 1)
{
new i = h;
new vehicleid;
new Seat[MAX_PLAYERS], InCar[MAX_PLAYERS];
if(GetPlayerState(playerid) == 2)
{
vehicleid = GetPlayerVehicleID(playerid);
for(new j = 0; j < MAX_PLAYERS; j++)
{
if(IsPlayerInVehicle(j, vehicleid))
{
InCar[j] = vehicleid;
Seat[j] = GetPlayerVehicleSeat(playerid);
SetPlayerInterior(j, EntranceInfo[i][EntranceExitInt]);
SetPlayerVirtualWorld(j, EntranceInfo[i][EntranceExitVW]);
}
}
SetVehiclePos(vehicleid, EntranceInfo[h][EntranceEnterX],EntranceInfo[h][EntranceEnterY],EntranceInfo[h][EntranceEnterZ]);
SetVehicleZAngle(vehicleid, EntranceInfo[h][EntranceEnterA]);
SetVehicleWorld(vehicleid, EntranceInfo[i][EntranceExitVW]);
SetVehicleInterior(vehicleid, EntranceInfo[i][EntranceExitInt]);
}
SetPlayerFacingAngle(playerid, EntranceInfo[h][EntranceEnterA]);
SetPlayerInterior(playerid, EntranceInfo[h][EntranceExitInt]);
SetPlayerVirtualWorld(playerid, EntranceInfo[h][EntranceExitVW]);
if(vehicleid != 0)
{
for (new j = 0; j < MAX_PLAYERS; j++)
{
if (InCar[j] == 0) continue;
if (InCar[j] == vehicleid)
{
PutPlayerInVehicle(j, vehicleid, Seat[j]);
}
}
PutPlayerInVehicle(playerid, vehicleid, 0);
}
}
SetPlayerFacingAngle(playerid, EntranceInfo[h][EntranceEnterA]);
SetPlayerInterior(playerid, EntranceInfo[h][EntranceExitInt]);
SetPlayerVirtualWorld(playerid, EntranceInfo[h][EntranceExitVW]);
SetCameraBehindPlayer(playerid);
if (ObjectWaiting[playerid])
{
ObjectWaiting[playerid] = 0;
KillTimer(ObjectWaitTimer[playerid]);
TogglePlayerControllable(playerid, 1);
}
if (EntranceInfo[h][EntranceEnterWait])
{
ObjectWait(playerid, EntranceInfo[h][EntranceEnterX],EntranceInfo[h][EntranceEnterY],EntranceInfo[h][EntranceEnterZ]);
}
else
{
SetPlayerPosEx(playerid, EntranceInfo[h][EntranceEnterX],EntranceInfo[h][EntranceEnterY],EntranceInfo[h][EntranceEnterZ]);
}
}
}
}
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.", RemoveUnderScore(playerid));
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,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_PURPL E,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(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]);
}
}
}
}
if(PlayerPaintballing[playerid] != 0) //paintball
{
SetPlayerWeapons(playerid);
PlayerPaintballing[playerid] = 0;
SetPlayerPos(playerid,1310.0685,-1367.6198,13.5382);
TogglePlayerControllable(playerid, 1);
PaintballPlayers --;
return 1;
}
if(IsPlayerInRangeOfPoint(playerid,3.0,367.6250915 5273,-1149.8499755859,1228.7457275391)) //FBI building
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1676.8248,-1634.7830,14.2266);
PlayerInfo[playerid][pInt] = 0;
SetPlayerFacingAngle(playerid, 125.0000);
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid,3.0,386.2718,17 3.6472,1008.3828)) //City Hall
{
if(GetPlayerInterior(playerid) == 101)
{
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerPos(playerid, 1481.2781,-1774.8430,15.3466);
SetPlayerFacingAngle(playerid, 181.8075);
SetCameraBehindPlayer(playerid);
}
}
else if(IsPlayerInRangeOfPoint(playerid,3.0,2776.5386,-1492.2943,1066.2562)) // Gun Depot Exit Point
{
GameTextForPlayer(playerid,"~w~Objects Loading....",1000,5);
Pause(playerid);
SetPlayerPos(playerid,2755.3499,-2515.5325,13.6397);
GameTextForPlayer(playerid, "~w~Gun Depot", 5000, 1);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2365.81640625,-1706.4645996094,1195.7257080078)) //V.I.P Lounge
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1833.8832,-1125.6548,24.6721);
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 391.95086669922,-1159.1645507813,1235.4501953125)) // FBI Second Floor which lead back to Elevator
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 389.4391,-1162.3976,1227.8639);
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 397.96765136719,-1166.8763427734,1224.2651367188)) // FBI Prisons Floor which lead back to Elevator
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 393.1075,-1162.8607,1227.8639);
SetCameraBehindPlayer(playerid);
}
//--------------------------------[Prison Exits]----------------------------//
else if(IsPlayerInRangeOfPoint(playerid, 2.0, 1864.7402,-1725.0553,5202.5859))
{
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerPos(playerid, 1769.3439,-1549.8958,9.9112);
}
else if(IsPlayerInRangeOfPoint(playerid, 2.0, 1852.0464,-1732.5062,5202.5859))
{
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerPos(playerid, 1771.6210,-1547.4747,9.9129);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1862.0128,-1700.4945,5202.5859))
{
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerPos(playerid, 1797.4753,-1579.0033,14.0861);
}
//--------------------------------[Prison Exits]----------------------------//
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1581.0818,-1728.5902,1441.1000)) // From Jails to Hall 1
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1581.6827,-1730.2046,1441.2000);
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1780.5570,-1576.6642,1734.9430)) // Prisons Hall New
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1758.2068,-1577.8342,1641.1377);
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2203.7878,-1817.9066,960.5386)) // Drug Depot Exit To outside
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 2508.3833,-2205.7219,13.5469);
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2250.0303,-1791.3995,915.8544)) // Drug Depot Exit to Bottom
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 2206.0955,-1821.6783,943.1324);
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1589.6949,-1744.9985,1441.2000)) // Prison Reception
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1588.2921,-1745.8655,1441.2000);
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, -27.0908,-379.4108,14.9761)) // Control Room
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, -30.8378,-361.3748,5.4297);
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1587.4763,-1728.4971,1441)) // Jails to Hall 2
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1587.0557,-1730.1108,1441);
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 209.8902,-152.7066,-89.7323)) // Prison Store
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, -5.2309,-325.4293,5.4297);
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2403.6315917969,-1873.8382568359,977.00183105469)) // County Hospital
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 2034.1747,-1401.6726,17.2948);
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, -220.3469,-251.2590,8.4680)) // Director's officer of DoC
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, -86.0714,-299.3637,2.7646);
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1148.3007,-1318.3501,1023.7019)) // New Infim.
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, -107.5323,-219.7949,2.0466);
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2046.1004638672,-1765.7945556641,767.94354248047)) // EMS new building
{
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerPos(playerid, 1765.7958,-1705.0437,13.4707);
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2195.96875,-1890.1411132813,903.56622314453)) // LSPD training Range Exit
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1524.4841,-1677.8577,6.2188);
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, -2025.0823,1143.2609,18.0688)) // Church Main Door
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 2297.8594,-1509.6943,26.8667);
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 178.60601806641,-100.326538085942,1029.4976806641)) // Los Santos Church main door
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 2253.9475,-1333.1809,23.9815);
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, -2027.0004,-103.7371,1035.1719)) // DMV
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 2045.0454,-1913.2452,13.5469);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2417.8186,-1705.3455,1195.0190)) //VIP lounge to garage
{
SetPlayerPos(playerid, 2487.7549,2397.2488,4.2109);
SetPlayerInterior(playerid,0);
SetCameraBehindPlayer(playerid);
}
else if (IsPlayerInRangeOfPoint(playerid, 3.0, 357.4144,-1166.8655,1234.8639)) // FBI Door to Roof inside
{
SetPlayerPos(playerid, 1654.0979,-1655.1139,22.5156);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,0);
}
else if (IsPlayerInRangeOfPoint(playerid, 3.0, -2001.2556,1096.8164,18.8574)) // Church back door
{
SetPlayerPos(playerid, 2312.1548,-1508.6281,26.8438);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,0);
}
else if (IsPlayerInRangeOfPoint(playerid, 3.0, 385.1813,-1155.5437,1223.6608)) // FBI Door to Garage Inside
{
SetPlayerPos(playerid, 1658.4365,-1691.3781,15.6094);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,0);
}
else if (IsPlayerInRangeOfPoint(playerid, 3.0, -1973.2489,168.5225,539.0989)) //Unity From Inside to train
{
SetPlayerPos(playerid, 1742.9120,-1943.8079,13.5689);
SetPlayerInterior(playerid,0);
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2145.3159,1597.3687,1003.9677)) //Secret Service
{
SetPlayerPos(playerid,849.5972,-1519.9574,14.3481);
SetPlayerInterior(playerid, 0);
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 418.652984,-82.639793,1001.804687)) //The Barber
{
SetPlayerPos(playerid,2070.8240,-1793.8846,13.5533);
SetPlayerInterior(playerid, 0);
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, -204.439987,-26.453998,1002.273437)) //Tatto shop
{
SetPlayerPos(playerid,2068.5889,-1779.9105,13.5596);
SetPlayerInterior(playerid, 0);
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid, 2.5, -2007.7353515625,176.60624694824,540.34661865234)) // Unity Normal People Exit
{
SetPlayerPos(playerid,1769.8843,-1867.9167,13.5696);
SetPlayerInterior(playerid, 0);
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid, 2.5, -1961.6540527344,164.9091796875,546.71893310547)) // Unity Workers Exit
{
SetPlayerPos(playerid,1752.4977,-1894.1453,13.5574);
SetPlayerInterior(playerid, 0);
SetCameraBehindPlayer(playerid);
}
else if (IsPlayerInRangeOfPoint(playerid, 3.0,772.111999,-3.898649,1000.728820)) // Gym
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 2229.7354,-1721.5267,13.5639);
SetCameraBehindPlayer(playerid);
}
else if (IsPlayerInRangeOfPoint(playerid, 6.0,385.8938,173.8353,1008.3828)) // City Hall
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid,1481.0209,-1770.9374,18.7958);
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid, 2.5, 367.1499,162.3410,1019.9844)) //FIRE DEPARTMENT building
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1601.9219,-2157.7139,13.7401);
PlayerInfo[playerid][pInt] = 0;
SetPlayerFacingAngle(playerid, 270.0);
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1199.0801, -1366.3083, 1017.8790)) //HOSPITAL GROUND EXIT (NEW)
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1173.7834, -1325.3622, 15.1953);
PlayerInfo[playerid][pInt] = 0;
SetPlayerFacingAngle(playerid, 270.5877);
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1216.2145, -1379.2618, 1029.4714)) //HOSPITAL ROOF EXIT (NEW)
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1154.5394, -1344.0690, 26.7013);
PlayerInfo[playerid][pInt] = 0;
SetPlayerFacingAngle(playerid, 181.0622);
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 246.4612,87.5870,1003.6406)) //LSPD-Garage Exit 228.3012,114.3316,999.0156
{
SetPlayerPos(playerid,1568.5718,-1691.0177,5.8906);
SetPlayerFacingAngle(playerid, 180.0000);
SetCameraBehindPlayer(playerid);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
PlayerInfo[playerid][pInt] = 0;
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 242.6159,66.1745,1003.6406)) //LSPD-Roof Exit
{
SetPlayerPos(playerid,1564.8464,-1666.1444,28.3956);
SetPlayerFacingAngle(playerid, 0.0000);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid, 0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerVirtualWorld(playerid,0);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 246.7284,62.6640,1003.6406)) // LSPD Exit
{
SetPlayerPos(playerid,1554.5262,-1675.7283,16.1953);
SetPlayerFacingAngle(playerid, 0.0000);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid, 0);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pVirtualWorld] = 0;
SetPlayerVirtualWorld(playerid, 0);
}
else if(IsPlayerInRangeOfPoint(playerid, 8.0,2.57, 33.14, 1200)) // SHAMAL
{
new
vwcheck = GetPlayerVirtualWorld(playerid),
Float:px,
Float:py,
Float:pz,
Float:za,
Float:vx,
Float:vy,
Float:vz,
vehicle
;

switch(vwcheck)
{
case 1337: vehicle = EnterableShamals[0];
case 1338: vehicle = EnterableShamals[1];
case 1339: vehicle = EnterableShamals[2];
}

if(vehicle)
{
if(PlayerInfo[playerid][pMask] == 1) format(string, sizeof(string), "* Stranger has left the shamal.");
else format(string, sizeof(string), "* %s has left the shamal.", sendername);
GetVehiclePos(vehicle,px,py,pz);
GetVehicleZAngle(vehicle,za);
GetVehicleVelocity(vehicle,vx,vy,vz);

px -= (10 * floatsin(-za, degrees));
py -= (10 * floatcos(-za, degrees));

SetPlayerVirtualWorld(playerid,0);
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,px,py,pz);
SetPlayerFacingAngle(playerid,za);
SetPlayerVelocity(playerid,vx,vy,vz);
}
}
else if(IsPlayerInRangeOfPoint(playerid, 1.5, 2573.0266,-1301.9242,1044.1250)) //Los Santos Export Depot
{
SetPlayerPos(playerid,2447.7971,-1963.3649,13.5469);
SetPlayerFacingAngle(playerid, 180.0000);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid, 0);
PlayerInfo[playerid][pInt] = 0;
}
else if(IsPlayerInRangeOfPoint(playerid,3.0,322.2817,30 3.3415,999.1484)) //SASD
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 626.9654,-571.7671,17.9207);
PlayerInfo[playerid][pInt] = 0;
SetPlayerFacingAngle(playerid, 180.0000);
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid,3.0,269.0183,18 63.1827,8.7578)) //Infirmary
{
SetPlayerPos(playerid, -174.2122,-247.5509,1.4297);
SetPlayerFacingAngle(playerid, 0.0);
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 460.4763,-88.6080,999.5547)) // Cafeteria Exit
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, -13.0313,-335.9020,5.4297);
SetPlayerFacingAngle(playerid, 0.0);
PlayerInfo[playerid][pInt] = 0;
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid,0.5,-202.2018,-204.9514,14.0696)) //Doc building
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, -49.8847,-269.3661,6.6332);
PlayerInfo[playerid][pInt] = 0;
SetPlayerFacingAngle(playerid, 270.0);
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid,3.0,385.9389,17 3.6596,1008.3828)) //Cityhall
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1481.0366,-1769.9780,18.7958);
PlayerInfo[playerid][pInt] = 0;
SetPlayerFacingAngle(playerid, 0.0000);
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid,6.0,-1404.5299,-259.0602,1043.6563))
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,2695.6235,-1704.6960,11.8438);
}
else if(IsPlayerInRangeOfPoint(playerid,8.0,-1443.0554,-581.1879,1055.0472))
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,-2111.5686,-443.9720,38.7344);
}
else if(IsPlayerInRangeOfPoint(playerid,8.0,-1464.7732,1557.5533,1052.5313))
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,-2080.3079,-406.0309,38.7344);
}
else if(NoFuel[playerid] == 1)
{
TogglePlayerControllable(playerid, 1);
RemovePlayerFromVehicle(playerid);
NoFuel[playerid] = 0;
}
}
return 1;
}



Whole OnPlayerKeyStateChange is on the previous page, cannot paste it all in here :/.. Hopefully you can help me!

Konstantinos
13/11/2013, 07:31 PM
If you want it with another key, then just check if the newkeys is that specific key and add the code of /exit like before.

If you want it with the same key (space), you'll need to use a variable to store when they're in and when they're not.


// global
new
bool: EnteredHouse[ MAX_PLAYERS char ]
;

// OnPlayerConnect:
EnteredHouse{ playerid } = false;

// when they enter a house:
EnteredHouse{ playerid } = true;

// when they exit a house:
EnteredHouse{ playerid } = false;

// When they press space (in the check)
if( !EnteredHouse{ playerid } )
{
// code for /enter command
}
else
{
// code for /exit command
}

whando
13/11/2013, 07:33 PM
Yes I want both to use the Space bar to enter/exit, well.. I am still kinda new to scripting, and I really don't get it. Could you please put the code together for me? And if possible also explain how you did it? Thank you very much!

Konstantinos
13/11/2013, 08:47 PM
That's something I cannot do because you've many checks and you'll need to use:

EnteredHouse{ playerid } = true;

when they entered a house, so you have to add it to each line you set the position because if it failed, then it'd fail the variable as well. Same goes when a player exits a house.

What it basically does is:

There's an array for each player and it's by default false (that they're not entered any house - by default I mean in OnPlayerConnect, we reset it). When a player enters a house, we set it to true. When a player exits a house, we set it to false.

So in OnPlayerKeyStateChange after checking if the key is KEY_SPRINT and the state is on foot, you need to check the variable is false or true? If it's false, that means that the player is not in any house so you add the code of the /enter command into that statement. Else, the variable is true, that means the player is in a house so you add the code of the /exit command.

It's just that you have too many checks.

whando
13/11/2013, 08:49 PM
Keep getting 26 errors.. :/

whando
13/11/2013, 08:56 PM
Could you put the code together and do 1-2 at enter and 1-2 at exit, I will understand it then :P.

with 1-2 I mean ; EnteredHouse{ playerid } = true; :p

whando
13/11/2013, 09:56 PM
Really can't solve it, still trying but nothing works xD.

Pottus
13/11/2013, 10:12 PM
I don't know how you deal with a script with as many lines as this script has in a single pawn file (majorly flawed design), must be a real pain in the ass to work with.

newbie scripter
14/11/2013, 03:14 AM
Keep getting 26 errors.. :/


as i know 26 errors = mostly missing brackets