Basically i can enter with the interiors by pressing the "HOTKEY ENTER" or "F"
Код:
CMD:enter(playerid, params[])
{
if(CheckGMX(playerid)) return 1;
if(GetPVarInt(playerid, "PBM") > 0) {
SendClientMessage(playerid, COLOR_WHITE, "You can't do this while being in a arena!");
return 1;
}
if(PlayerCuffed[playerid] >= 1)
{
SendClientMessage(playerid, COLOR_WHITE, "You can't do this right now.");
return 1;
}
if(PlayerInfo[playerid][pJailed] > 0)
{
SendClientMessage(playerid, COLOR_WHITE, "You can't do this right now.");
return 1;
}
new string[128];
for(new i = 0; i < sizeof(DDoorsInfo); i++)
{
if(IsPlayerInRangeOfPoint(playerid,3.0,DDoorsInfo[i][ddExteriorX], DDoorsInfo[i][ddExteriorY], DDoorsInfo[i][ddExteriorZ]) && PlayerInfo[playerid][pVW] == DDoorsInfo[i][ddExteriorVW])
{
if(DDoorsInfo[i][ddVIP] > 0 && PlayerInfo[playerid][pDonator] < DDoorsInfo[i][ddVIP]) {
SendClientMessage(playerid, COLOR_GRAD2, "You can't enter, you're not a high enough Donator level.");
return 1;
}
if(DDoorsInfo[i][ddGang] > 0) {
if(PlayerInfo[playerid][pGang] != DDoorsInfo[i][ddGang]) {
SendClientMessage(playerid, COLOR_GRAD2, "You can't enter, this door is gang restricted.");
return 1;
}
}
if(DDoorsInfo[i][ddFaction] > 0) {
if(PlayerInfo[playerid][pFaction] != DDoorsInfo[i][ddFaction])
{
SendClientMessage(playerid, COLOR_GRAD2, "You can't enter, this door is faction restricted.");
return 1;
}
}
if(DDoorsInfo[i][ddAdmin] > 0 && PlayerInfo[playerid][pAdmin] < DDoorsInfo[i][ddAdmin]) {
SendClientMessage(playerid, COLOR_GRAD2, "You can't enter, you're not a high enough admin level.");
return 1;
}
if(DDoorsInfo[i][ddWanted] > 0 && PlayerInfo[playerid][pWantedLevel] != 0) {
SendClientMessage(playerid, COLOR_GRAD2, "You can't enter, this door restricts those with wanted levels.");
return 1;
}
if(DDoorsInfo[i][ddLocked] == 1) {
return SendClientMessage(playerid, COLOR_GRAD2, "This door is currently locked.");
}
format(string, sizeof(string), "* %s has entered %s.", GetPlayerNameEx(playerid), DDoorsInfo[i][ddDescription]);
ProxDetector(25.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetPlayerInterior(playerid,DDoorsInfo[i][ddInteriorInt]);
PlayerInfo[playerid][pInt] = DDoorsInfo[i][ddInteriorInt];
PlayerInfo[playerid][pVW] = DDoorsInfo[i][ddInteriorVW];
SetPlayerVirtualWorld(playerid, DDoorsInfo[i][ddInteriorVW]);
if(DDoorsInfo[i][ddCustomInterior]) {
TogglePlayerControllable(playerid, 0);
for(new o = 0; o < 6; o++)
{
TextDrawShowForPlayer(playerid, ObjectsLoadingTD[o]);
}
SetPVarInt(playerid, "LoadingObjects", 1);
SetTimerEx("SafeLoadObjects", 3000, 0, "d", playerid);
}
if(DDoorsInfo[i][ddVehicleAble] > 0 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) {
SetVehiclePos(GetPlayerVehicleID(playerid), DDoorsInfo[i][ddInteriorX],DDoorsInfo[i][ddInteriorY],DDoorsInfo[i][ddInteriorZ]);
SetVehicleZAngle(GetPlayerVehicleID(playerid), DDoorsInfo[i][ddInteriorA]);
SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), DDoorsInfo[i][ddInteriorVW]);
LinkVehicleToInterior(GetPlayerVehicleID(playerid), DDoorsInfo[i][ddInteriorInt]);
}
else {
SetPlayerPos(playerid,DDoorsInfo[i][ddInteriorX],DDoorsInfo[i][ddInteriorY],DDoorsInfo[i][ddInteriorZ]);
SetPlayerFacingAngle(playerid,DDoorsInfo[i][ddInteriorA]);
SetCameraBehindPlayer(playerid);
}
foreach(Player, x)
{
if(IsABoomboxNearby(DDoorsInfo[i][ddInteriorX] ,DDoorsInfo[i][ddInteriorY], DDoorsInfo[i][ddInteriorZ], x) < 150.0 && DDoorsInfo[i][ddInteriorVW] == BoomboxInfo[x][bbVW] && DDoorsInfo[i][ddInteriorInt] == BoomboxInfo[x][bbInt])
{
PlayAudioStreamForPlayer(playerid, VehicleRadioListing[BoomboxInfo[x][bbStation]-1][radiourl], BoomboxInfo[x][bbPosX], BoomboxInfo[x][bbPosY], BoomboxInfo[x][bbPosZ], 50.0, 1);
}
}
return Streamer_UpdateEx(playerid, DDoorsInfo[i][ddInteriorX],DDoorsInfo[i][ddInteriorY],DDoorsInfo[i][ddInteriorZ]);
}
}
for(new i = 0; i < sizeof(HouseInfo); i++)
{
if(IsPlayerInRangeOfPoint(playerid,3,HouseInfo[i][hExteriorX], HouseInfo[i][hExteriorY], HouseInfo[i][hExteriorZ]))
{
if(PlayerInfo[playerid][pHouse] == i || PlayerInfo[playerid][pHouse2] == i || HouseInfo[i][hLock] == 0 || PlayerInfo[playerid][pRenting] == i)
{
if(PlayerInfo[playerid][pHouse] == i || PlayerInfo[playerid][pHouse2] == i)
{
format(string, sizeof(string), "* %s has entered their house.", GetPlayerNameEx(playerid));
ProxDetector(25.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else
{
format(string, sizeof(string), "* %s has entered %s's house.", GetPlayerNameEx(playerid), HouseInfo[i][hOwner]);
ProxDetector(25.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
SetPlayerInterior(playerid,HouseInfo[i][hHInteriorWorld]);
PlayerInfo[playerid][pInt] = HouseInfo[i][hHInteriorWorld];
PlayerInfo[playerid][pVW] = i+60000;
SetPlayerVirtualWorld(playerid, i+60000);
if(HouseInfo[i][hCustomInterior] == 1)
{
TogglePlayerControllable(playerid, 0);
for(new o = 0; o < 6; o++)
{
TextDrawShowForPlayer(playerid, ObjectsLoadingTD[o]);
}
SetPVarInt(playerid, "LoadingObjects", 1);
SetTimerEx("SafeLoadObjects", 3000, 0, "d", playerid);
}
SetPlayerPos(playerid,HouseInfo[i][hInteriorX],HouseInfo[i][hInteriorY],HouseInfo[i][hInteriorZ]);
SetPlayerFacingAngle(playerid,HouseInfo[i][hInteriorA]);
SetCameraBehindPlayer(playerid);
if(PlayerInfo[playerid][pHouse] == i || PlayerInfo[playerid][pHouse2] == i)
{
GameTextForPlayer(playerid, "~w~Welcome Home", 5000, 1);
}
foreach(Player, x)
{
if(IsABoomboxNearby(HouseInfo[i][hInteriorX], HouseInfo[i][hInteriorY], HouseInfo[i][hInteriorZ], x) < 150.0 && i+60000 == BoomboxInfo[x][bbVW] && HouseInfo[i][hHInteriorWorld] == BoomboxInfo[x][bbInt])
{
PlayAudioStreamForPlayer(playerid, VehicleRadioListing[BoomboxInfo[x][bbStation]-1][radiourl], BoomboxInfo[x][bbPosX], BoomboxInfo[x][bbPosY], BoomboxInfo[x][bbPosZ], 50.0, 1);
}
}
Streamer_UpdateEx(playerid, HouseInfo[i][hInteriorX],HouseInfo[i][hInteriorY],HouseInfo[i][hInteriorZ]);
}
else
{
GameTextForPlayer(playerid, "~r~Locked", 5000, 1);
}
return 1;
}
}
// Hitman HQ
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1938.545898, 165.629531, 37.281250))
{
if(PlayerInfo[playerid][pFaction] == 4 || PlayerInfo[playerid][pLeader] == 4)
{
SetPlayerVirtualWorld(playerid, 666420);
PlayerInfo[playerid][pVW] = 666420;
SetPlayerInterior(playerid, 42);
PlayerInfo[playerid][pInt] = 42;
SetPlayerPos(playerid, 1277.019165, -758.428771, 5080.750000);
SetPlayerFacingAngle(playerid, 358.16);
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid, 0);
for(new o = 0; o < 6; o++)
{
TextDrawShowForPlayer(playerid, ObjectsLoadingTD[o]);
}
SetPVarInt(playerid, "LoadingObjects", 1);
SetTimerEx("SafeLoadObjects", 3000, 0, "d", playerid);
SendClientMessage(playerid, COLOR_WHITE, "You can /order weaponry in the armory room.");
}
}
// The Lubu Gentlemen's Club
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 511.817230, -1510.971679, 14.566996))
{
format(string, sizeof(string), "* %s has entered The Lubu Gentlemen's Club.", GetPlayerNameEx(playerid));
ProxDetector(25.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetPlayerVirtualWorld(playerid, 373737);
PlayerInfo[playerid][pVW] = 373737;
SetPlayerInterior(playerid, 37);
PlayerInfo[playerid][pInt] = 37;
SetPlayerPos(playerid, -1077.946533, 613.206665, 1116.507812);
SetPlayerFacingAngle(playerid, 92.42);
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid, 0);
for(new o = 0; o < 6; o++)
{
TextDrawShowForPlayer(playerid, ObjectsLoadingTD[o]);
}
SetPVarInt(playerid, "LoadingObjects", 1);
SetTimerEx("SafeLoadObjects", 3000, 0, "d", playerid);
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=242774", -1087.677978, 615.239807, 1116.507812, 40.0, 1);
}
// The Tableau Club
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 561.802795, -1506.722412, 14.548986))
{
format(string, sizeof(string), "* %s has entered The Tableau Club.", GetPlayerNameEx(playerid));
ProxDetector(25.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetPlayerVirtualWorld(playerid, 363636);
PlayerInfo[playerid][pVW] = 363636;
SetPlayerInterior(playerid, 36);
PlayerInfo[playerid][pInt] = 36;
SetPlayerPos(playerid, 308.045654, 1053.886840, 1098.540039);
SetPlayerFacingAngle(playerid, 267.57);
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid, 0);
for(new o = 0; o < 6; o++)
{
TextDrawShowForPlayer(playerid, ObjectsLoadingTD[o]);
}
SetPVarInt(playerid, "LoadingObjects", 1);
SetTimerEx("SafeLoadObjects", 3000, 0, "d", playerid);
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1377200", 321.139465, 1034.947753, 1098.914062, 120.0, 1);
}
// The Tableau Club (VIP ROOM)
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 307.904296, 1025.602294, 1098.540039))
{
if(GetPlayerCash(playerid) >= 100)
{
format(string, sizeof(string), "* %s has entered The Tableau VIP Room.", GetPlayerNameEx(playerid));
ProxDetector(25.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GivePlayerCash(playerid, -100);
GameTextForPlayer(playerid, "~r~-$100", 3000, 1);
SetPlayerVirtualWorld(playerid, 363636);
PlayerInfo[playerid][pVW] = 363636;
SetPlayerInterior(playerid, 36);
PlayerInfo[playerid][pInt] = 36;
SetPlayerPos(playerid, 293.066436, 1029.785278, 1104.560058);
SetPlayerFacingAngle(playerid, 352.47);
SetCameraBehindPlayer(playerid);
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You do not have the cash for that.");
}
}
// Santa Maria Surfer's Lounge
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 387.958374, -1870.688110, 7.835937))
{
format(string, sizeof(string), "* %s has entered Santa Maria Surfer's Lounge.", GetPlayerNameEx(playerid));
ProxDetector(25.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetPlayerVirtualWorld(playerid, 353535);
PlayerInfo[playerid][pVW] = 353535;
SetPlayerInterior(playerid, 35);
PlayerInfo[playerid][pInt] = 35;
SetPlayerPos(playerid, 271.742034, 1074.419677, 5096.750000);
SetPlayerFacingAngle(playerid, 86.54);
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid, 0);
for(new o = 0; o < 6; o++)
{
TextDrawShowForPlayer(playerid, ObjectsLoadingTD[o]);
}
SetPVarInt(playerid, "LoadingObjects", 1);
SetTimerEx("SafeLoadObjects", 3000, 0, "d", playerid);
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=21585", 271.742034, 1074.419677, 5096.750000, 120.0, 1);
}
new vehicleid = GetPlayerVehicleID(playerid);
new closestcar = GetClosestCar(playerid, vehicleid);
if(IsPlayerInRangeOfVehicle(playerid, closestcar, 6.0) && GetVehicleModel(closestcar) == 519)
{
if(VehicleStatus{closestcar} == 1) return SendClientMessage(playerid, COLOR_WHITE, "You're not allowed to enter this Shamal as it's been damaged!");
format(string, sizeof(string), "* %s enters the Shamal airplane as a passenger.", GetPlayerNameEx(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetPlayerPos(playerid, 2.509036, 23.118730, 1199.593750);
SetPlayerFacingAngle(playerid, 82.14);
SetCameraBehindPlayer(playerid);
PlayerInfo[playerid][pVW] = closestcar;
SetPlayerVirtualWorld(playerid, closestcar);
PlayerInfo[playerid][pInt] = 1;
SetPlayerInterior(playerid, 1);
InsideShamal[playerid] = closestcar;
SendClientMessage(playerid, COLOR_WHITE, "Type /exit near the door to exit the vehicle, or /window to look outside.");
foreach(Player, x)
{
if(IsABoomboxNearby(2.509036, 23.118730, 1199.593750, x) < 150.0 && closestcar == BoomboxInfo[x][bbVW] && BoomboxInfo[x][bbInt] == 1)
{
PlayAudioStreamForPlayer(playerid, VehicleRadioListing[BoomboxInfo[x][bbStation]-1][radiourl], BoomboxInfo[x][bbPosX], BoomboxInfo[x][bbPosY], BoomboxInfo[x][bbPosZ], 50.0, 1);
}
}
}
return 1;
}
Код:
CMD:exit(playerid, params[])
{
if(CheckGMX(playerid)) return 1;
if(GetPVarInt(playerid, "PBM") > 0) {
SendClientMessage(playerid, COLOR_WHITE, "You can't do this while being in a arena!");
return 1;
}
if(PlayerInfo[playerid][pJailed] > 0)
{
SendClientMessage(playerid, COLOR_WHITE, "You can't do this right now.");
return 1;
}
new string[128];
for(new i = 0; i < sizeof(DDoorsInfo); i++) {
if(IsPlayerInRangeOfPoint(playerid,3,DDoorsInfo[i][ddInteriorX], DDoorsInfo[i][ddInteriorY], DDoorsInfo[i][ddInteriorZ]) && PlayerInfo[playerid][pVW] == DDoorsInfo[i][ddInteriorVW])
{
format(string, sizeof(string), "* %s has exited the building.", GetPlayerNameEx(playerid));
ProxDetector(25.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetPlayerInterior(playerid,DDoorsInfo[i][ddExteriorInt]);
PlayerInfo[playerid][pInt] = DDoorsInfo[i][ddExteriorInt];
SetPlayerVirtualWorld(playerid, DDoorsInfo[i][ddExteriorVW]);
PlayerInfo[playerid][pVW] = DDoorsInfo[i][ddExteriorVW];
if(DDoorsInfo[i][ddCustomExterior]) {
TogglePlayerControllable(playerid, 0);
for(new o = 0; o < 6; o++)
{
TextDrawShowForPlayer(playerid, ObjectsLoadingTD[o]);
}
SetPVarInt(playerid, "LoadingObjects", 1);
SetTimerEx("SafeLoadObjects", 3000, 0, "d", playerid);
}
if(DDoorsInfo[i][ddVehicleAble] > 0 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) {
SetVehiclePos(GetPlayerVehicleID(playerid), DDoorsInfo[i][ddExteriorX],DDoorsInfo[i][ddExteriorY],DDoorsInfo[i][ddExteriorZ]);
SetVehicleZAngle(GetPlayerVehicleID(playerid), DDoorsInfo[i][ddExteriorA]);
SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), DDoorsInfo[i][ddExteriorVW]);
LinkVehicleToInterior(GetPlayerVehicleID(playerid), DDoorsInfo[i][ddExteriorInt]);
}
else {
SetPlayerPos(playerid,DDoorsInfo[i][ddExteriorX],DDoorsInfo[i][ddExteriorY],DDoorsInfo[i][ddExteriorZ]);
SetPlayerFacingAngle(playerid, DDoorsInfo[i][ddExteriorA]);
SetCameraBehindPlayer(playerid);
}
return Streamer_UpdateEx(playerid, DDoorsInfo[i][ddInteriorX],DDoorsInfo[i][ddInteriorY],DDoorsInfo[i][ddInteriorZ]);
}
}
for(new i = 0; i < sizeof(HouseInfo); i++) {
if(IsPlayerInRangeOfPoint(playerid,3,HouseInfo[i][hInteriorX], HouseInfo[i][hInteriorY], HouseInfo[i][hInteriorZ]) && PlayerInfo[playerid][pVW] == i+60000)
{
format(string, sizeof(string), "* %s has exited the house.", GetPlayerNameEx(playerid));
ProxDetector(25.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
if(HouseInfo[i][hCustomExterior])
{
TogglePlayerControllable(playerid, 0);
for(new o = 0; o < 6; o++)
{
TextDrawShowForPlayer(playerid, ObjectsLoadingTD[o]);
}
SetPVarInt(playerid, "LoadingObjects", 1);
SetTimerEx("SafeLoadObjects", 3000, 0, "d", playerid);
}
SetPlayerPos(playerid,HouseInfo[i][hExteriorX],HouseInfo[i][hExteriorY],HouseInfo[i][hExteriorZ]);
SetPlayerFacingAngle(playerid, HouseInfo[i][hExteriorA]);
SetCameraBehindPlayer(playerid);
SetPlayerVirtualWorld(playerid, 0);
PlayerInfo[playerid][pVW] = 0;
return Streamer_UpdateEx(playerid, HouseInfo[i][hExteriorX],HouseInfo[i][hExteriorY],HouseInfo[i][hExteriorZ]);
}
}
// Hitman HQ
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1277.019165, -758.428771, 5080.750000) && (GetPlayerVirtualWorld(playerid) == 666420))
{
if(PlayerInfo[playerid][pFaction] == 4 || PlayerInfo[playerid][pLeader] == 4)
{
SetPlayerVirtualWorld(playerid, 0);
PlayerInfo[playerid][pVW] = 0;
SetPlayerInterior(playerid, 0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerPos(playerid, 1938.545898, 165.629531, 37.281250);
SetPlayerFacingAngle(playerid, 338.54);
SetCameraBehindPlayer(playerid);
}
}
// The Lubu Gentlemen's Club
else if(IsPlayerInRangeOfPoint(playerid, 3.0, -1077.946533, 613.206665, 1116.507812) && (GetPlayerVirtualWorld(playerid) == 373737))
{
format(string, sizeof(string), "* %s has exited the building.", GetPlayerNameEx(playerid));
ProxDetector(25.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetPlayerVirtualWorld(playerid, 0);
PlayerInfo[playerid][pVW] = 0;
SetPlayerInterior(playerid, 0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerPos(playerid, 511.817230, -1510.971679, 14.566996);
SetPlayerFacingAngle(playerid, 272.11);
SetCameraBehindPlayer(playerid);
StopAudioStreamForPlayer(playerid);
}
// The Tableau Club
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 308.045654, 1053.886840, 1098.540039) && (GetPlayerVirtualWorld(playerid) == 363636))
{
format(string, sizeof(string), "* %s has exited the building.", GetPlayerNameEx(playerid));
ProxDetector(25.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetPlayerVirtualWorld(playerid, 0);
PlayerInfo[playerid][pVW] = 0;
SetPlayerInterior(playerid, 0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerPos(playerid, 561.802795, -1506.722412, 14.548986);
SetPlayerFacingAngle(playerid, 86.78);
SetCameraBehindPlayer(playerid);
StopAudioStreamForPlayer(playerid);
}
// The Tableau Club (VIP ROOM)
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 293.066436, 1029.785278, 1104.560058) && (GetPlayerVirtualWorld(playerid) == 363636))
{
SetPlayerVirtualWorld(playerid, 363636);
PlayerInfo[playerid][pVW] = 363636;
SetPlayerInterior(playerid, 36);
PlayerInfo[playerid][pInt] = 36;
SetPlayerPos(playerid, 307.904296, 1025.602294, 1098.540039);
SetPlayerFacingAngle(playerid, 264.06);
SetCameraBehindPlayer(playerid);
}
// Santa Maria Surfer's Lounge
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 271.742034, 1074.419677, 5096.750000) && (GetPlayerVirtualWorld(playerid) == 353535))
{
format(string, sizeof(string), "* %s has exited the building.", GetPlayerNameEx(playerid));
ProxDetector(25.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetPlayerVirtualWorld(playerid, 0);
PlayerInfo[playerid][pVW] = 0;
SetPlayerInterior(playerid, 0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerPos(playerid, 387.958374, -1870.688110, 7.835937);
SetPlayerFacingAngle(playerid, 89.99);
SetCameraBehindPlayer(playerid);
StopAudioStreamForPlayer(playerid);
}
// Shamal
else if(InsideShamal[playerid] != INVALID_VEHICLE_ID && IsPlayerInRangeOfPoint(playerid,3,2.509036, 23.118730, 1199.593750))
{
format(string, sizeof(string), "* %s exits the Shamal airplane.", GetPlayerNameEx(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
if(InsideShamal[playerid] == INVALID_VEHICLE_ID || GetVehicleModel(InsideShamal[playerid]) != 519) {
PlayerInfo[playerid][pAGuns][GetWeaponSlot(46)] = 46;
GivePlayerValidWeapon(playerid, 46, 60000);
SetPlayerPos(playerid, 0.000000, 0.000000, 420.000000);
}
else {
new Float:X, Float:Y, Float:Z;
GetVehiclePos(InsideShamal[playerid], X, Y, Z);
SetPlayerPos(playerid, X-4, Y-2.3, Z);
new Float:XB, Float:YB, Float:ZB;
GetVehiclePos(InsideShamal[playerid], XB, YB, ZB);
if(ZB > 50.0) {
PlayerInfo[playerid][pAGuns][GetWeaponSlot(46)] = 46;
GivePlayerValidWeapon(playerid, 46, 60000);
}
}
PlayerInfo[playerid][pVW] = 0;
SetPlayerVirtualWorld(playerid, 0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerInterior(playerid, 0);
InsideShamal[playerid] = INVALID_VEHICLE_ID;
}
return 1;
}
Remove the code if the newkeys is KEY_SECONDARY_ATTACK about entering/exiting.