#include <a_samp>
#include <streamer>
new iconehosp1, iconehosp2, iconehosp3, iconehosp4, iconehosp5, iconesairhosp;
public OnGameModeInit()
{
iconehosp1 = CreatePickup(1318, 23, 1172.4631,-1323.2786,15.4029); //HOSP LS 1
iconehosp2 = CreatePickup(1318, 23, 2034.1473,-1402.5370,17.2946); //HOSP LS 2
iconehosp3 = CreatePickup(1318, 23, -320.1926,1049.4722,20.3403); //FC
iconehosp4 = CreatePickup(1318, 23, -2655.1528,638.8937,14.4531); //SF
iconehosp5 = CreatePickup(1318, 23, 1607.3455,1816.4760,10.8203); //LV
iconesairhosp = CreatePickup(1239, 23, 1177.3695,-1340.4095,9280.5693,-1); //INTERIOR HOSP
Create3DTextLabel("Hospital de LS", 0xFFFFFFFF, 1172.4631,-1323.2786,15.4029, 50, 0, 0);
Create3DTextLabel("Hospital de LS2", 0xFFFFFFFF, 2034.1473,-1402.5370,17.2946, 50, 0, 0);
Create3DTextLabel("Hospital de FC", 0xFFFFFFFF, -320.1926,1049.4722,20.3403, 50, 0, 0); //FC
Create3DTextLabel("Hospital de SF", 0xFFFFFFFF, -2655.1528,638.8937,14.4531, 50, 0, 0); //SF
Create3DTextLabel("Hospital de LV", 0xFFFFFFFF, 1607.3455,1816.4760,10.8203, 50, 0, 0); //LV
Create3DTextLabel("Sair Hospital\n{1e90ff}/SairHosp", 0xFFFFFFFF, 1177.3695,-1340.4095,9280.5693, 50, 0, 0);
//Hospital - Interior
CreateObject(14595,1175.05078125,-1328.92089844,9283.52246094,0.00000000,0.00000000,0.00000000); //object(paperchase02) (1)
CreateObject(5020,1178.11718750,-1340.39355469,9281.22070312,0.00000000,0.00000000,0.00000000); //object(mul_las) (1)
CreateObject(5020,1178.11621094,-1340.39746094,9282.38867188,0.00000000,0.00000000,0.00000000); //object(mul_las) (2)
CreateObject(14598,1175.03491211,-1328.92651367,9283.51562500,0.00000000,0.00000000,0.00000000); //object(paperchase_glass) (1)
CreateObject(1523,1174.26074219,-1315.62304688,9279.56933594,0.00000000,0.00000000,0.00000000); //object(gen_doorext10) (1)
CreateObject(1704,1170.88537598,-1333.26599121,9279.56933594,0.00000000,0.00000000,180.00000000); //object(kb_chair03) (1)
CreateObject(1704,1167.13879395,-1325.55065918,9279.56933594,0.00000000,0.00000000,59.99938965); //object(kb_chair03) (2)
CreateObject(1726,1169.29589844,-1324.67285156,9279.56933594,0.00000000,0.00000000,0.00000000); //object(mrk_seating2) (1)
CreateObject(2293,1170.42285156,-1331.69628906,9279.49316406,0.00000000,0.00000000,0.00000000); //object(swk_1_fstool) (1)
CreateObject(3383,1170.69042969,-1305.55371094,9279.56933594,0.00000000,0.00000000,270.00000000); //object(a51_labtable1_) (1)
CreateObject(1671,1180.88574219,-1332.81640625,9280.02929688,0.00000000,0.00000000,159.99938965); //object(swivelchair_a) (1)
CreateObject(1705,1182.30761719,-1329.62500000,9279.56933594,0.00000000,0.00000000,319.49890137); //object(kb_chair04) (1)
CreateObject(2008,1180.47851562,-1331.94335938,9279.56933594,0.00000000,0.00000000,0.00000000); //object(officedesk1) (1)
CreateObject(1705,1179.29589844,-1330.18066406,9279.56933594,0.00000000,0.00000000,50.74584961); //object(kb_chair04) (2)
CreateObject(1808,1183.95117188,-1324.01953125,9279.56933594,0.00000000,0.00000000,319.99877930); //object(cj_watercooler2) (1)
CreateObject(1808,1177.81542969,-1334.52636719,9279.54980469,0.00000000,0.00000000,265.99548340); //object(cj_watercooler2) (2)
CreateObject(630,1179.38964844,-1324.77050781,9280.59472656,0.00000000,0.00000000,0.00000000); //object(veg_palmkb8) (1)
CreateObject(632,1165.56054688,-1325.03710938,9280.01855469,0.00000000,0.00000000,0.00000000); //object(veg_palmkb7) (1)
CreateObject(2245,1169.67956543,-1326.65368652,9280.30957031,0.00000000,0.00000000,0.00000000); //object(plant_pot_11) (1)
CreateObject(2251,1167.75500488,-1331.84020996,9280.84375000,0.00000000,0.00000000,0.00000000); //object(plant_pot_20) (1)
CreateObject(8659,1158.04785156,-1329.11425781,9280.56933594,0.00000000,0.00000000,90.00000000); //object(shbbyhswall11_lvs) (1)
CreateObject(8659,1158.03710938,-1329.11816406,9282.56542969,0.00000000,0.00000000,90.00000000); //object(shbbyhswall11_lvs) (2)
CreateObject(1997,1159.63012695,-1304.87231445,9279.56933594,0.00000000,0.00000000,0.00000000); //object(hos_trolley) (1)
CreateObject(1997,1161.32995605,-1304.96093750,9279.56933594,0.00000000,0.00000000,0.00000000); //object(hos_trolley) (2)
CreateObject(1997,1163.31799316,-1304.97705078,9279.56933594,0.00000000,0.00000000,0.00000000); //object(hos_trolley) (3)
CreateObject(1997,1165.15136719,-1304.99511719,9279.56933594,0.00000000,0.00000000,0.00000000); //object(hos_trolley) (4)
CreateObject(1997,1166.90063477,-1305.08386230,9279.56933594,0.00000000,0.00000000,0.00000000); //object(hos_trolley) (5)
CreateObject(1997,1168.62402344,-1305.17089844,9279.56933594,0.00000000,0.00000000,0.00000000); //object(hos_trolley) (6)
CreateObject(1663,1161.26855469,-1340.80761719,9280.03613281,0.00000000,0.00000000,129.99572754); //object(swivelchair_b) (1)
CreateObject(2009,1161.20410156,-1339.68261719,9279.56933594,0.00000000,0.00000000,270.00000000); //object(officedesk2l) (1)
CreateObject(2182,1160.41992188,-1342.13964844,9279.76660156,0.00000000,0.00000000,90.00000000); //object(med_office5_desk_1) (1)
CreateObject(1727,1164.51782227,-1340.79711914,9279.57617188,0.00000000,0.00000000,239.99818420); //object(mrk_seating2b) (1)
CreateObject(1727,1163.76611328,-1338.29174805,9279.56933594,0.00000000,0.00000000,309.99572754); //object(mrk_seating2b) (2)
CreateObject(1808,1162.06445312,-1342.57324219,9279.54980469,0.00000000,0.00000000,185.99304199); //object(cj_watercooler2) (3)
CreateObject(2921,1177.98413086,-1345.60217285,9282.83789062,0.00000000,0.00000000,330.00000000); //object(kmb_cam) (1)
CreateObject(2921,1158.33374023,-1324.11962891,9282.86621094,0.00000000,0.00000000,189.99633789); //object(kmb_cam) (2)
CreateObject(2921,1158.86291504,-1342.73022461,9282.51660156,0.00000000,0.00000000,259.99206543); //object(kmb_cam) (3)
CreateObject(2921,1183.56713867,-1323.83264160,9282.76855469,0.00000000,0.00000000,89.99145508); //object(kmb_cam) (4)
CreateObject(2921,1171.99426270,-1316.56140137,9282.96093750,0.00000000,0.00000000,139.98901367); //object(kmb_cam) (5)
CreateObject(3391,1175.07373047,-1305.24548340,9279.56933594,0.00000000,0.00000000,0.00000000); //object(a51_sdsk_ncol2_) (1)
CreateObject(3390,1175.03552246,-1308.79077148,9279.56933594,0.00000000,0.00000000,0.00000000); //object(a51_sdsk_ncol1_) (1)
CreateObject(3395,1173.14868164,-1304.05212402,9279.56933594,0.00000000,0.00000000,90.00000000); //object(a51_sdsk_3_) (1)
CreateObject(1726,1165.95532227,-1333.03588867,9279.56933594,0.00000000,0.00000000,90.00000000); //object(mrk_seating2) (3)
CreateObject(2370,1167.54455566,-1332.17419434,9279.16308594,0.00000000,0.00000000,0.00000000); //object(shop_set_1_table) (1)
CreateObject(2370,1169.28820801,-1327.00036621,9279.18847656,0.00000000,0.00000000,0.00000000); //object(shop_set_1_table) (2)
CreateObject(2855,1168.29309082,-1331.32019043,9280.00976562,0.00000000,0.00000000,0.00000000); //object(gb_bedmags05) (1)
CreateObject(2852,1170.00463867,-1326.30114746,9280.03515625,0.00000000,0.00000000,0.00000000); //object(gb_bedmags02) (1)
CreateObject(1997,1160.23461914,-1335.54052734,9279.56933594,0.00000000,0.00000000,90.00000000); //object(hos_trolley) (6)
CreateObject(1240,1174.99108887,-1315.88146973,9282.52148438,0.00000000,0.00000000,0.00000000); //object(health) (1)
CreateObject(1241,1164.36645508,-1333.81457520,9282.55859375,0.00000000,0.00000000,0.00000000); //object(adrenaline) (1)
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/sairhosp", true)==0)
{
if(PlayerToPoint(1.0, playerid, 1177.3695,-1340.4095,9280.5693))
{
SetPlayerInterior(playerid, 0);
if(PlayerNoHospital[playerid] == 1) SetPlayerPos(playerid, 1176.3164,-1324.1117,14.0154);
else if(PlayerNoHospital[playerid] == 2) SetPlayerPos(playerid, 2032.5037,-1407.6497,17.1777);
else if(PlayerNoHospital[playerid] == 3) SetPlayerPos(playerid, -315.8423,1055.3075,19.7422);
else if(PlayerNoHospital[playerid] == 4) SetPlayerPos(playerid, 2655.7764,634.6095,14.4531);
else if(PlayerNoHospital[playerid] == 5) SetPlayerPos(playerid, 1608.4662,1819.7620,10.8280);
PlayerNoHospital[playerid] = 0;
SetPlayerArmedWeapon(playerid, 1);
GivePlayerWeaponsEx(playerid, -1);
}
else SendClientMessage(playerid, CORX1, "| ERRO | Você não está perto da porta.");
return 1;
}
return 0;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == iconesairhosp)
{
SetPlayerInterior(playerid, 0);
//SetPlayerVirtualWorld(playerid, 0);
if(PlayerNoHospital[playerid] == 1) SetPlayerPos(playerid, 1176.3164,-1324.1117,14.0154);
else if(PlayerNoHospital[playerid] == 2) SetPlayerPos(playerid, 2032.5037,-1407.6497,17.1777);
else if(PlayerNoHospital[playerid] == 3) SetPlayerPos(playerid, -315.8423,1055.3075,19.7422);
else if(PlayerNoHospital[playerid] == 4) SetPlayerPos(playerid, 2655.7764,634.6095,14.4531);
else if(PlayerNoHospital[playerid] == 5) SetPlayerPos(playerid, 1608.4662,1819.7620,10.8280);
PlayerNoHospital[playerid] = 0;
SetPlayerFacingAngle(playerid, 90);
SetCameraBehindPlayer(playerid);
SetPlayerArmedWeapon(playerid, 1);
GivePlayerWeaponsEx(playerid, -1);
}
if(pickupid == iconehosp1)
{
//SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 10);//1
SetPlayerPos(playerid, 1175.0066,-1334.8163,9280.5693);
PlayerNoHospital[playerid] = 1;
SetPlayerFacingAngle(playerid, 90);
SetCameraBehindPlayer(playerid);
SetPlayerArmedWeapon(playerid, 0);
ResetPlayerWeaponsEx(playerid, -1);
}
if(pickupid == iconehosp2)
{
//SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 10);
SetPlayerPos(playerid, 1175.0066,-1334.8163,9280.5693);
PlayerNoHospital[playerid] = 2;
SetPlayerFacingAngle(playerid, 90);
SetCameraBehindPlayer(playerid);
SetPlayerArmedWeapon(playerid, 0);
ResetPlayerWeaponsEx(playerid, -1);
}
if(pickupid == iconehosp3)
{
//SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 10);
SetPlayerPos(playerid, 1175.0066,-1334.8163,9280.5693);
PlayerNoHospital[playerid] = 3;
SetPlayerFacingAngle(playerid, 90);
SetCameraBehindPlayer(playerid);
SetPlayerArmedWeapon(playerid, 0);
ResetPlayerWeaponsEx(playerid, -1);
}
if(pickupid == iconehosp4)
{
//SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 10);
SetPlayerPos(playerid, 1175.0066,-1334.8163,9280.5693);
PlayerNoHospital[playerid] = 4;
SetPlayerFacingAngle(playerid, 90);
SetCameraBehindPlayer(playerid);
SetPlayerArmedWeapon(playerid, 0);
ResetPlayerWeaponsEx(playerid, -1);
}
if(pickupid == iconehosp5)
{
//SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 10);
SetPlayerPos(playerid, 1175.0066,-1334.8163,9280.5693);
PlayerNoHospital[playerid] = 5;
SetPlayerFacingAngle(playerid, 90);
SetCameraBehindPlayer(playerid);
SetPlayerArmedWeapon(playerid, 0);
ResetPlayerWeaponsEx(playerid, -1);
}
return 1;
}