[Pomoc]Smrt, bolnica

Započeo 032.Marcus, Januar 30, 2013, 18:14:39 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Scripta: Ravens RolePlay
Problem: Kada igrac umre ne spawnuje ga u bolnici vec na neku lokaciju na kojoj je vec bio pre. Spawnovalo je samo kada sam igraca ubio puskom
Code: /

Tako je na tom modu,ako sam sebe ubijes ili te spawnuje na obicni spawn ili na mjesto koje si izabrao da ga spawnuje. Sada objasni sta ti zelis tu ispraviti




Balkan Ulice RPG opis servera: Click



-Tutorial za mijesanje ID-ova na vozilima: Click

predpostavljam da zelis to ukloniti, e ovako, odes pod public SetPlayerSpawn, i tamo ces naci kod koji proverava ukoliko je igrac negrupisan, znaci ukoliko nije u organizaciji, ili admin, ili gm, da mu stavlja istu poziciju, epa, ti samo tu liniju obrises, i umesto nje, stavis SetPlayerPos(playerid, i ovde tvoje koordinate);

Mislis ovde? Posto za svakog igraca je isto,bar ja tako hocu. Nema nigde ta provera za org.

if(JustDied[playerid] == 1)
{
    if(GetPlayerVirtualWorld(playerid) != 0 || PlayerInfo[playerid][pVirWorld] != 0)
    {
        SetPlayerVirtualWorld(playerid, 0);
        PlayerInfo[playerid][pVirWorld] = 0;
    }
    SafeSetPlayerPos(playerid, 1182.5638,-1323.5256,13.5790);
    SetPlayerFacingAngle(playerid, 270.0);
    SafeSetPlayerInterior(playerid,0);
    TogglePlayerControllable(playerid, 1);
    return 1;
}


A ima i ovo, dal da ovo stavim ispod justdied?
if(MedicBill[playerid] == 1 && PlayerInfo[playerid][pJailed] == 0)
{
if(PlayerInfo[playerid][pAdminDuty] == 1) return 1;
    if(FirstSpawn[playerid] != 1)
    {
        SetRealMoney(playerid, ScriptMoney[playerid]);
PlayerInfo[playerid][pDeaths] += 1;
SetPlayerHealth(playerid, 50.0);
    SafeSetPlayerInterior(playerid, 3);
        rand = random(sizeof(gMedicSpawns));
SafeSetPlayerPos(playerid, gMedicSpawns[rand][0], gMedicSpawns[rand][1], gMedicSpawns[rand][2]); // Warp the player
SetPlayerFacingAngle(playerid, 0);
        TogglePlayerControllable(playerid, 0);
        GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~w~You need to rest now ...", 5000, 3);
        ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
        if(PlayerInfo[playerid][pRegularRank] == 1)
        {
        SetTimerEx("ReleaseFromHospital", 20000, 0, "i", playerid);
}
else if(PlayerInfo[playerid][pRegularRank] == 2)
        {
        SetTimerEx("ReleaseFromHospital", 17500, 0, "i", playerid);
}
else if(PlayerInfo[playerid][pRegularRank] == 3)
        {
        SetTimerEx("ReleaseFromHospital", 15000, 0, "i", playerid);
}
else if(PlayerInfo[playerid][pAdmin] >= 1)
        {
        SetTimerEx("ReleaseFromHospital", 12500, 0, "i", playerid);
}
else if(PlayerInfo[playerid][pAdmin] >= 4)
        {
        SetTimerEx("ReleaseFromHospital", 10000, 0, "i", playerid);
}
else
{
    SetTimerEx("ReleaseFromHospital", 25000, 0, "i", playerid);
}
        PlayerPlaySound(playerid, 1062, 0.0, 0.0, 0.0);
    return 1;
}
}

mislim na public SetPlayerSpawn, a ne OnPlayerDeath

A ja mislim da je ovo sto sam ti dao pod SetPlayerSpawn.

da, ali to nije ceo public, meni treba ceo

Evo ceo
public SetPlayerSpawn(playerid)
{
new string[128], rand;
if(IsPlayerConnected(playerid))
{
    if(!IsPlayerNPC(playerid))
    {
        if(MedicBill[playerid] == 1 && PlayerInfo[playerid][pJailed] == 0)
{
if(PlayerInfo[playerid][pAdminDuty] == 1) return 1;
    if(FirstSpawn[playerid] != 1)
    {
        SetRealMoney(playerid, ScriptMoney[playerid]);
PlayerInfo[playerid][pDeaths] += 1;
SetPlayerHealth(playerid, 50.0);
    SafeSetPlayerInterior(playerid, 3);
        rand = random(sizeof(gMedicSpawns));
SafeSetPlayerPos(playerid, gMedicSpawns[rand][0], gMedicSpawns[rand][1], gMedicSpawns[rand][2]); // Warp the player
SetPlayerFacingAngle(playerid, 0);
        TogglePlayerControllable(playerid, 0);
        GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~w~You need to rest now ...", 5000, 3);
        ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
        if(PlayerInfo[playerid][pRegularRank] == 1)
        {
        SetTimerEx("ReleaseFromHospital", 20000, 0, "i", playerid);
}
else if(PlayerInfo[playerid][pRegularRank] == 2)
        {
        SetTimerEx("ReleaseFromHospital", 17500, 0, "i", playerid);
}
else if(PlayerInfo[playerid][pRegularRank] == 3)
        {
        SetTimerEx("ReleaseFromHospital", 15000, 0, "i", playerid);
}
else if(PlayerInfo[playerid][pAdmin] >= 1)
        {
        SetTimerEx("ReleaseFromHospital", 12500, 0, "i", playerid);
}
else if(PlayerInfo[playerid][pAdmin] >= 4)
        {
        SetTimerEx("ReleaseFromHospital", 10000, 0, "i", playerid);
}
else
{
    SetTimerEx("ReleaseFromHospital", 25000, 0, "i", playerid);
}
        PlayerPlaySound(playerid, 1062, 0.0, 0.0, 0.0);
    return 1;
}
}
    if(PlayerInfo[playerid][pAdminDuty] == 1 && PlayerInfo[playerid][pAdmin] >= 3)
{
SetPlayerSkin(playerid, 294);
if(PlayerInfo[playerid][pAdmin] >= 6)
{
SafeResetPlayerWeapons(playerid);
SetPlayerHealth(playerid, 99999);
SetPlayerArmour(playerid, 99999);
}
}
    if(Spectate[playerid] != 255)
{
    SafeSetPlayerPos(playerid, TeleportDest[playerid][0],TeleportDest[playerid][1],TeleportDest[playerid][2]);
    SafeSetPlayerInterior(playerid, Interior[playerid]);
    SetPlayerVirtualWorld(playerid, VirWorld[playerid]);
    if(PlayerInfo[playerid][pAdmin] >= 6)
    {
        if(PlayerInfo[playerid][pAdminDuty] == 1)
        {
    SetPlayerHealth(playerid, SpHealth[playerid]);
    SetPlayerArmour(playerid, SpArmour[playerid]);
}
else
{
SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
    SetPlayerArmour(playerid, PlayerInfo[playerid][pArmour]);
}
}
else
{
    SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
    SetPlayerArmour(playerid, PlayerInfo[playerid][pArmour]);
}
    SetPlayerWeapons(playerid);
    SetPlayerToTeamColor(playerid);
    Spectate[playerid] = 255;
    TextDrawShowForPlayer(playerid, Textdraw44);
    TextDrawShowForPlayer(playerid, Textdraw45);
TextDrawShowForPlayer(playerid, Textdraw55);
    TextDrawShowForPlayer(playerid, Textdraw51[playerid]);
    TextDrawHideForPlayer(playerid, Textdraw54[playerid]);
    if(PlayerInfo[playerid][pWatch] == 1)
{
TextDrawShowForPlayer(playerid, Textdraw56);
TextDrawShowForPlayer(playerid, Textdraw57);
TextDrawShowForPlayer(playerid, Textdraw58);
}
    return 1;
}
    if(PlayerInfo[playerid][pAndro] == 1)
{
    SendClientMessage(playerid, COLOR_GREY, "US Airlines: Medics Saved You, Returning to Your Trip!");
      SafeSetPlayerInterior(playerid, PlayerInfo[playerid][pInt]);
      SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][pVirWorld]);
      SafeSetPlayerPos(playerid, 315.745,984.969,1958.919);
      return 1;
}
if(PlayerInfo[playerid][pJet] == 1)
{
    SendClientMessage(playerid, COLOR_GREY, "US Airlines: Medics Saved You, Returning to Your Trip!");
    SafeSetPlayerInterior(playerid, PlayerInfo[playerid][pInt]);
      SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][pVirWorld]);
      SafeSetPlayerPos(playerid, 3.7333,23.0483,1199.6012);
      return 1;
}
    if(PlayerInfo[playerid][pTut] == 0)
    {
gOoc[playerid] = 1; gNews[playerid] = 1; gFam[playerid] = 1;
SafeSetPlayerInterior(playerid, 3);
SafeSetPlayerPos(playerid, 330.6825,163.6688,1014.1875);
SetPlayerFacingAngle(playerid, 280);
TogglePlayerControllable(playerid, 0);
RegistrationStep[playerid] = 1;
SendClientMessage(playerid, COLOR_LIGHTRED, "Dobrodosli na SA-MP Underground Server. Sada cete biti smesteni u Los Santo Imigracioni centar.");
SendClientMessage(playerid, COLOR_LIGHTRED, "Zdravo ! Dobrodosao u Los Santo Imigracioni Centar. Pitacemo vas par pitanja");
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Kojeg ste pola?", "Musko \nZensko", "U redu", "");
TextDrawShowForPlayer(playerid, TextdrawREG[playerid]);
PlayerInfo[playerid][pRegularCount] = 144000;
    SafeResetPlayerMoney(playerid);
return 1;
    }
    if(PlayerInfo[playerid][pTutDone] == 0 && PlayerInfo[playerid][pTut] != 0)
    {
SendClientMessage(playerid, COLOR_LIGHTRED, "TIP: You haven't done your tutorial yet!");
SendClientMessage(playerid, COLOR_LIGHTRED, "Type /tutorial if you want to proceed with it!");
SendClientMessage(playerid, COLOR_LIGHTRED, "TIP: By finishing your tutorial you will get $7,500 and -500 Seconds at Regular!");
}
new house = PlayerInfo[playerid][pPhousekey];
if(PlayerInfo[playerid][pJailed] == 1)
{
    SafeSetPlayerInterior(playerid, 6);
SafeSetPlayerPos(playerid,264.6288,77.5742,1001.0391);
SendClientMessage(playerid, COLOR_LIGHTRED, "Incomplete Jail Sentence, back to jail.");
return 1;
}
if(PlayerInfo[playerid][pJailed] == 2)
{
    SafeSetPlayerInterior(playerid, 0);
SafeSetPlayerPos(playerid,268.5777,1857.9351,9.8133);
SetPlayerWorldBounds(playerid, 337.5694,101.5826,1940.9759,1798.7453); //285.3481,96.9720,1940.9755,1799.0811
return 1;
}
if(PlayerInfo[playerid][pJailed] == 3)
{
    SafeSetPlayerInterior(playerid, 3);
SafeSetPlayerPos(playerid,197.7956,175.0676,1003.0234);
SendClientMessage(playerid, COLOR_LIGHTRED, "Incomplete Jail Sentence, back to jail.");
return 1;
}
if(PlayerInfo[playerid][pJailed] == 4)
{
    SafeSetPlayerInterior(playerid, 10);
SafeSetPlayerPos(playerid,214.8052,108.9046,999.0156);
SendClientMessage(playerid, COLOR_LIGHTRED, "Incomplete Jail Sentence, back to jail.");
return 1;
}
if(JustDied[playerid] == 1)
{
    if(GetPlayerVirtualWorld(playerid) != 0 || PlayerInfo[playerid][pVirWorld] != 0)
    {
        SetPlayerVirtualWorld(playerid, 0);
        PlayerInfo[playerid][pVirWorld] = 0;
    }
    SafeSetPlayerPos(playerid, 1182.5638,-1323.5256,13.5790);
    SetPlayerFacingAngle(playerid, 270.0);
    SafeSetPlayerInterior(playerid,0);
    TogglePlayerControllable(playerid, 1);
    return 1;
}
    if(TutTime[playerid] == 0 && PlayerInfo[playerid][pTut] == 1 && RegistrationStep[playerid] == 0 && AfterTutorial[playerid] == 0 && FirstSpawn[playerid] == 1)
    {
        new plname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, plname, sizeof(plname));
      SetPlayerVirtualWorld(playerid,PlayerInfo[playerid][pVirWorld]);
        SafeSetPlayerInterior(playerid,PlayerInfo[playerid][pInt]);
    SafeSetPlayerPos(playerid, PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z] + 1);
format(string, sizeof(string), "Welcome to Los Santos, %s... Returning where have you been",plname);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "~w~Welcome, ~b~%s. ~n~~y~Returning where have you been!", plname);
    GameTextForPlayer(playerid, string, 5000, 1);
    return 1;
}
if(house != 9999)
{
    if(PlayerInfo[playerid][pSpawn] == 1) //If 1, then you get to your house, else spawn somewhere else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerInterior(playerid,HouseInfo[house][hInt]);
SetPlayerVirtualWorld(playerid,HouseInfo[house][hWorld]);
SafeSetPlayerPos(playerid, HouseInfo[house][hExitx], HouseInfo[house][hExity],HouseInfo[house][hExitz]); // Warp the player
PlayerInfo[playerid][pLocal] = house;
HouseEntered[playerid] = house;
return 1;
}
else if(PlayerInfo[playerid][pSpawn] == 0)
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
else if(PlayerInfo[playerid][pSpawn] == 2)
{
    new family = PlayerInfo[playerid][pFMember];
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, FamilyInfo[family][FamilyInterior]);
    SafeSetPlayerPos(playerid, FamilyInfo[family][FamilySpawn][0],FamilyInfo[family][FamilySpawn][1],FamilyInfo[family][FamilySpawn][2]);
    SetPlayerFacingAngle(playerid, FamilyInfo[family][FamilySpawn][3]);
    return 1;
}
else
{
if (PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)//Police Force spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
SetPlayerToTeamColor(playerid);
SafeSetPlayerInterior(playerid,6);
    rand = random(sizeof(gCopPlayerSpawns));
SafeSetPlayerPos(playerid, gCopPlayerSpawns[rand][0], gCopPlayerSpawns[rand][1], gCopPlayerSpawns[rand][2]); // Warp the player
SetPlayerFacingAngle(playerid, 270.0);
return 1;
}
else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
    }
    if (PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)//FBI spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
SetPlayerToTeamColor(playerid);
SafeSetPlayerInterior(playerid,3);
SafeSetPlayerPos(playerid, 299.7097,183.1322,1007.1719);
SetPlayerFacingAngle(playerid, 90);
return 1;
}
else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
    }
if (PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)//National Guard spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 0);
    SafeSetPlayerPos(playerid, 2731.5229,-2451.3643,17.5937);
    return 1;
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if (PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)//Fire/Ambulance spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerPos(playerid, 1174.9027,-1326.7284,14.5938);
SetPlayerFacingAngle(playerid, 0);
    return 1;
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if (PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)//Surenos spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 5);
    SafeSetPlayerPos(playerid, 2345.6570,-1185.5266,1027.9766);
    return 1;
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if (PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)//La Famiglia Sinatra spawn
{
if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 5);
    SafeSetPlayerPos(playerid, 1265.4475,-794.9257,1084.0078);
    return 1;
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if(PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pLeader] == 7)//Mayor spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
    {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 3);
    SafeSetPlayerPos(playerid, 356.2998,151.9914,1025.7891);
PlayerInfo[playerid][pLocal] = 241;
    return 1;
}
else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
    if (PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8) //Hitman spawn
    {
        if(PlayerInfo[playerid][pSpawn] == 3)
        {
        SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid, 1102.7017,-299.0774,73.9922);
SafeSetPlayerInterior(playerid,0);
        return 1;
    }
        else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
    }
    if (PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9) //News spawn
    {
        if(PlayerInfo[playerid][pSpawn] == 3)
        {
        SetPlayerToTeamColor(playerid);
        SafeSetPlayerInterior(playerid,3);
SafeSetPlayerPos(playerid, 355.7899,204.0173,1008.3828);
SafeGivePlayerWeapon(playerid, 43, 20);
        return 1;
    }
        else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
    }
    if (PlayerInfo[playerid][pJob] == 13  || PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10) //Taxi Cab Company spawn
    {
        if(PlayerInfo[playerid][pSpawn] == 3)
        {
        SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid, 1754.99,-1894.19,13.55);
SafeSetPlayerInterior(playerid,0);
        return 1;
}
        else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
    }
    if(IsAnInstructor(playerid) || PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11) //Driving/Flying School spawn
    {
        if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid,3);
SafeSetPlayerPos(playerid, 1494.4991,1308.9163,1093.2845);
SetPlayerFacingAngle(playerid, 180);
        return 1;
}
        else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
    }
    if (PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12) //Firemen
    {
        if(PlayerInfo[playerid][pSpawn] == 3)
        {
        SetPlayerToTeamColor(playerid);
        SafeSetPlayerInterior(playerid,0);
SafeSetPlayerPos(playerid, 616.9447,-1538.7158,15.2904);
        return 1;
    }
        else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
    }
    if (PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13) //Sons of Anarchy spawn
    {
        if(PlayerInfo[playerid][pSpawn] == 3)
        {
        SetPlayerToTeamColor(playerid);
        SafeSetPlayerInterior(playerid,0);
SafeSetPlayerPos(playerid, 683.0686,-473.8775,16.5363);
        return 1;
    }
        else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
    }
    if (PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14)//Yamaguchi spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 3);
    SafeSetPlayerPos(playerid, 962.8333,-60.0172,1001.1246);
    return 1;
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if (PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)//Chornaya Bratva spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 2);
    SafeSetPlayerPos(playerid, 2569.4744,-1284.6810,1065.3749);
    return 1;
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if (PlayerInfo[playerid][pMember] == 16 || PlayerInfo[playerid][pLeader] == 16)//La Vice spawn
{
if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 2);
    SafeSetPlayerPos(playerid, 455.8776,1413.6802,1084.3080);
    return 1;
}
else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
}
}
if (PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)//Police Force spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
SetPlayerToTeamColor(playerid);
SafeSetPlayerInterior(playerid,6);
    rand = random(sizeof(gCopPlayerSpawns));
SafeSetPlayerPos(playerid, gCopPlayerSpawns[rand][0], gCopPlayerSpawns[rand][1], gCopPlayerSpawns[rand][2]); // Warp the player
SetPlayerFacingAngle(playerid, 270.0);
return 1;
}
else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
    }
    if (PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)//FBI spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
SetPlayerToTeamColor(playerid);
SafeSetPlayerInterior(playerid,3);
SafeSetPlayerPos(playerid, 299.7097,183.1322,1007.1719);
SetPlayerFacingAngle(playerid, 90);
return 1;
}
else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
    }
if (PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)//National Guard spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 0);
    SafeSetPlayerPos(playerid, 2731.5229,-2451.3643,17.5937);
    return 1;
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if (PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)//Fire/Ambulance spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerPos(playerid, 1174.9027,-1326.7284,14.5938);
SetPlayerFacingAngle(playerid, 0);
    return 1;
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if (PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)//Surenos spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 5);
    SafeSetPlayerPos(playerid, 2345.6570,-1185.5266,1027.9766);
    return 1;
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if (PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)//La Famiglia Sinatra spawn
{
if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 5);
    SafeSetPlayerPos(playerid, 1265.4475,-794.9257,1084.0078);
    return 1;
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if(PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pLeader] == 7)//Mayor spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
    {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 3);
    SafeSetPlayerPos(playerid, 356.2998,151.9914,1025.7891);
PlayerInfo[playerid][pLocal] = 241;
    return 1;
}
else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
    if (PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8) //Hitman spawn
    {
        if(PlayerInfo[playerid][pSpawn] == 3)
        {
        SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid, 1102.7017,-299.0774,73.9922);
SafeSetPlayerInterior(playerid,0);
        return 1;
    }
        else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
    }
    if (PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9) //News spawn
    {
        if(PlayerInfo[playerid][pSpawn] == 3)
        {
        SetPlayerToTeamColor(playerid);
        SafeSetPlayerInterior(playerid,3);
SafeSetPlayerPos(playerid, 355.7899,204.0173,1008.3828);
SafeGivePlayerWeapon(playerid, 43, 20);
        return 1;
    }
        else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
    }
    if (PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10 || PlayerInfo[playerid][pJob] == 13) //Taxi Cab Company spawn
    {
        if(PlayerInfo[playerid][pSpawn] == 3)
        {
        SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid, 1754.99,-1894.19,13.55);
SafeSetPlayerInterior(playerid,0);
        return 1;
}
        else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
    }
    if(PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11 || IsAnInstructor(playerid)) //Driving/Flying School spawn
    {
        if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid,3);
SafeSetPlayerPos(playerid, 1494.4991,1308.9163,1093.2845);
SetPlayerFacingAngle(playerid, 180);
        return 1;
}
        else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
    }
    if (PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12)//Yamaguchi spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 0);
    SafeSetPlayerPos(playerid, 616.9447,-1538.7158,15.2904);
    return 1;
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if (PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13)//Yamaguchi spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 0);
    SafeSetPlayerPos(playerid, 683.0686,-473.8775,16.5363);
    return 1;
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
    if (PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14)//Yamaguchi spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 3);
    SafeSetPlayerPos(playerid, 962.8333,-60.0172,1001.1246);
    return 1;
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if (PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)//Chornaya Bratva spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 2);
    SafeSetPlayerPos(playerid, 2569.4744,-1284.6810,1065.3749);
    return 1;
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if (PlayerInfo[playerid][pMember] == 16 || PlayerInfo[playerid][pLeader] == 16)//La Vice spawn
{
if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 2);
    SafeSetPlayerPos(playerid, 455.8776,1413.6802,1084.3080);
    return 1;
}
else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if(PlayerInfo[playerid][pFMember] != 255)
{
    if(PlayerInfo[playerid][pSpawn] == 2)
    {
    new family = PlayerInfo[playerid][pFMember];
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, FamilyInfo[family][FamilyInterior]);
    SafeSetPlayerPos(playerid, FamilyInfo[family][FamilySpawn][0],FamilyInfo[family][FamilySpawn][1],FamilyInfo[family][FamilySpawn][2]);
    SetPlayerFacingAngle(playerid, FamilyInfo[family][FamilySpawn][3]);
    return 1;
}
else if(PlayerInfo[playerid][pSpawn] == 0)
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
else if(PlayerInfo[playerid][pSpawn] == 3)
{
                    if (PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)//Police Force spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
SetPlayerToTeamColor(playerid);
SafeSetPlayerInterior(playerid,6);
    rand = random(sizeof(gCopPlayerSpawns));
SafeSetPlayerPos(playerid, gCopPlayerSpawns[rand][0], gCopPlayerSpawns[rand][1], gCopPlayerSpawns[rand][2]); // Warp the player
SetPlayerFacingAngle(playerid, 270.0);
return 1;
}
else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
    }
    if (PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)//FBI spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
SetPlayerToTeamColor(playerid);
SafeSetPlayerInterior(playerid,3);
SafeSetPlayerPos(playerid, 299.7097,183.1322,1007.1719);
SetPlayerFacingAngle(playerid, 90);
return 1;
}
else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
    }
if (PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)//National Guard spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 0);
    SafeSetPlayerPos(playerid, 2731.5229,-2451.3643,17.5937);
    return 1;
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if (PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)//Fire/Ambulance spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerPos(playerid, 1174.9027,-1326.7284,14.5938);
SetPlayerFacingAngle(playerid, 0);
    return 1;
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if (PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)//Surenos spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 5);
    SafeSetPlayerPos(playerid, 2345.6570,-1185.5266,1027.9766);
    return 1;
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if (PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)//La Famiglia Sinatra spawn
{
if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 5);
    SafeSetPlayerPos(playerid, 1265.4475,-794.9257,1084.0078);
    return 1;
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if(PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pLeader] == 7)//Mayor spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
    {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 3);
    SafeSetPlayerPos(playerid, 356.2998,151.9914,1025.7891);
PlayerInfo[playerid][pLocal] = 241;
    return 1;
}
else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
    if (PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8) //Hitman spawn
    {
        if(PlayerInfo[playerid][pSpawn] == 3)
        {
        SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid, 1102.7017,-299.0774,73.9922);
SafeSetPlayerInterior(playerid,0);
        return 1;
    }
        else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
    }
    if (PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9) //News spawn
    {
        if(PlayerInfo[playerid][pSpawn] == 3)
        {
        SetPlayerToTeamColor(playerid);
        SafeSetPlayerInterior(playerid,3);
SafeSetPlayerPos(playerid, 355.7899,204.0173,1008.3828);
SafeGivePlayerWeapon(playerid, 43, 20);
        return 1;
    }
        else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
    }
    if (PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10 || PlayerInfo[playerid][pJob] == 13) //Taxi Cab Company spawn
    {
        if(PlayerInfo[playerid][pSpawn] == 3)
        {
        SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid, 1754.99,-1894.19,13.55);
SafeSetPlayerInterior(playerid,0);
        return 1;
}
        else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
    }
    if(PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11 || IsAnInstructor(playerid)) //Driving/Flying School spawn
    {
        if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid,3);
SafeSetPlayerPos(playerid, 1494.4991,1308.9163,1093.2845);
SetPlayerFacingAngle(playerid, 180);
        return 1;
}
        else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
    }
    if (PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12)//Yamaguchi spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 0);
    SafeSetPlayerPos(playerid, 616.9447,-1538.7158,15.2904);
    return 1;
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if (PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13)//Yamaguchi spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 0);
    SafeSetPlayerPos(playerid, 683.0686,-473.8775,16.5363);
    return 1;
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
    if (PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14)//Yamaguchi spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 3);
    SafeSetPlayerPos(playerid, 962.8333,-60.0172,1001.1246);
    return 1;
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if (PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)//Chornaya Bratva spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 2);
    SafeSetPlayerPos(playerid, 2569.4744,-1284.6810,1065.3749);
    return 1;
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if (PlayerInfo[playerid][pMember] == 16 || PlayerInfo[playerid][pLeader] == 16)//La Vice spawn
{
if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 2);
    SafeSetPlayerPos(playerid, 455.8776,1413.6802,1084.3080);
    return 1;
}
else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
}
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
}
return 1;
}

public SetPlayerSpawn(playerid)
{
new string[128], rand;
if(IsPlayerConnected(playerid))
{
    if(!IsPlayerNPC(playerid))
    {
        if(MedicBill[playerid] == 1 && PlayerInfo[playerid][pJailed] == 0)
{
if(PlayerInfo[playerid][pAdminDuty] == 1) return 1;
    if(FirstSpawn[playerid] != 1)
    {
        SetRealMoney(playerid, ScriptMoney[playerid]);
PlayerInfo[playerid][pDeaths] += 1;
SetPlayerHealth(playerid, 50.0);
    SafeSetPlayerInterior(playerid, 3);
        rand = random(sizeof(gMedicSpawns));
SafeSetPlayerPos(playerid, gMedicSpawns[rand][0], gMedicSpawns[rand][1], gMedicSpawns[rand][2]); // Warp the player
SetPlayerFacingAngle(playerid, 0);
        TogglePlayerControllable(playerid, 0);
        GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~w~You need to rest now ...", 5000, 3);
        ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
        if(PlayerInfo[playerid][pRegularRank] == 1)
        {
        SetTimerEx("ReleaseFromHospital", 20000, 0, "i", playerid);
}
else if(PlayerInfo[playerid][pRegularRank] == 2)
        {
        SetTimerEx("ReleaseFromHospital", 17500, 0, "i", playerid);
}
else if(PlayerInfo[playerid][pRegularRank] == 3)
        {
        SetTimerEx("ReleaseFromHospital", 15000, 0, "i", playerid);
}
else if(PlayerInfo[playerid][pAdmin] >= 1)
        {
        SetTimerEx("ReleaseFromHospital", 12500, 0, "i", playerid);
}
else if(PlayerInfo[playerid][pAdmin] >= 4)
        {
        SetTimerEx("ReleaseFromHospital", 10000, 0, "i", playerid);
}
else
{
    SetTimerEx("ReleaseFromHospital", 25000, 0, "i", playerid);
}
        PlayerPlaySound(playerid, 1062, 0.0, 0.0, 0.0);
    return 1;
}
}
    if(PlayerInfo[playerid][pAdminDuty] == 1 && PlayerInfo[playerid][pAdmin] >= 3)
{
SetPlayerSkin(playerid, 294);
if(PlayerInfo[playerid][pAdmin] >= 6)
{
SafeResetPlayerWeapons(playerid);
SetPlayerHealth(playerid, 99999);
SetPlayerArmour(playerid, 99999);
}
}
    if(Spectate[playerid] != 255)
{
    SafeSetPlayerPos(playerid, TeleportDest[playerid][0],TeleportDest[playerid][1],TeleportDest[playerid][2]);
    SafeSetPlayerInterior(playerid, Interior[playerid]);
    SetPlayerVirtualWorld(playerid, VirWorld[playerid]);
    if(PlayerInfo[playerid][pAdmin] >= 6)
    {
        if(PlayerInfo[playerid][pAdminDuty] == 1)
        {
    SetPlayerHealth(playerid, SpHealth[playerid]);
    SetPlayerArmour(playerid, SpArmour[playerid]);
}
else
{
SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
    SetPlayerArmour(playerid, PlayerInfo[playerid][pArmour]);
}
}
else
{
    SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
    SetPlayerArmour(playerid, PlayerInfo[playerid][pArmour]);
}
    SetPlayerWeapons(playerid);
    SetPlayerToTeamColor(playerid);
    Spectate[playerid] = 255;
    TextDrawShowForPlayer(playerid, Textdraw44);
    TextDrawShowForPlayer(playerid, Textdraw45);
TextDrawShowForPlayer(playerid, Textdraw55);
    TextDrawShowForPlayer(playerid, Textdraw51[playerid]);
    TextDrawHideForPlayer(playerid, Textdraw54[playerid]);
    if(PlayerInfo[playerid][pWatch] == 1)
{
TextDrawShowForPlayer(playerid, Textdraw56);
TextDrawShowForPlayer(playerid, Textdraw57);
TextDrawShowForPlayer(playerid, Textdraw58);
}
    return 1;
}
    if(PlayerInfo[playerid][pAndro] == 1)
{
    SendClientMessage(playerid, COLOR_GREY, "US Airlines: Medics Saved You, Returning to Your Trip!");
      SafeSetPlayerInterior(playerid, PlayerInfo[playerid][pInt]);
      SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][pVirWorld]);
      SafeSetPlayerPos(playerid, 315.745,984.969,1958.919);
      return 1;
}
if(PlayerInfo[playerid][pJet] == 1)
{
    SendClientMessage(playerid, COLOR_GREY, "US Airlines: Medics Saved You, Returning to Your Trip!");
    SafeSetPlayerInterior(playerid, PlayerInfo[playerid][pInt]);
      SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][pVirWorld]);
      SafeSetPlayerPos(playerid, 3.7333,23.0483,1199.6012);
      return 1;
}
    if(PlayerInfo[playerid][pTut] == 0)
    {
gOoc[playerid] = 1; gNews[playerid] = 1; gFam[playerid] = 1;
SafeSetPlayerInterior(playerid, 3);
SafeSetPlayerPos(playerid, 330.6825,163.6688,1014.1875);
SetPlayerFacingAngle(playerid, 280);
TogglePlayerControllable(playerid, 0);
RegistrationStep[playerid] = 1;
SendClientMessage(playerid, COLOR_LIGHTRED, "Dobrodosli na SA-MP Underground Server. Sada cete biti smesteni u Los Santo Imigracioni centar.");
SendClientMessage(playerid, COLOR_LIGHTRED, "Zdravo ! Dobrodosao u Los Santo Imigracioni Centar. Pitacemo vas par pitanja");
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Kojeg ste pola?", "Musko \nZensko", "U redu", "");
TextDrawShowForPlayer(playerid, TextdrawREG[playerid]);
PlayerInfo[playerid][pRegularCount] = 144000;
    SafeResetPlayerMoney(playerid);
return 1;
    }
    if(PlayerInfo[playerid][pTutDone] == 0 && PlayerInfo[playerid][pTut] != 0)
    {
SendClientMessage(playerid, COLOR_LIGHTRED, "TIP: You haven't done your tutorial yet!");
SendClientMessage(playerid, COLOR_LIGHTRED, "Type /tutorial if you want to proceed with it!");
SendClientMessage(playerid, COLOR_LIGHTRED, "TIP: By finishing your tutorial you will get $7,500 and -500 Seconds at Regular!");
}
new house = PlayerInfo[playerid][pPhousekey];
if(PlayerInfo[playerid][pJailed] == 1)
{
    SafeSetPlayerInterior(playerid, 6);
SafeSetPlayerPos(playerid,264.6288,77.5742,1001.0391);
SendClientMessage(playerid, COLOR_LIGHTRED, "Incomplete Jail Sentence, back to jail.");
return 1;
}
if(PlayerInfo[playerid][pJailed] == 2)
{
    SafeSetPlayerInterior(playerid, 0);
SafeSetPlayerPos(playerid,268.5777,1857.9351,9.8133);
SetPlayerWorldBounds(playerid, 337.5694,101.5826,1940.9759,1798.7453); //285.3481,96.9720,1940.9755,1799.0811
return 1;
}
if(PlayerInfo[playerid][pJailed] == 3)
{
    SafeSetPlayerInterior(playerid, 3);
SafeSetPlayerPos(playerid,197.7956,175.0676,1003.0234);
SendClientMessage(playerid, COLOR_LIGHTRED, "Incomplete Jail Sentence, back to jail.");
return 1;
}
if(PlayerInfo[playerid][pJailed] == 4)
{
    SafeSetPlayerInterior(playerid, 10);
SafeSetPlayerPos(playerid,214.8052,108.9046,999.0156);
SendClientMessage(playerid, COLOR_LIGHTRED, "Incomplete Jail Sentence, back to jail.");
return 1;
}
if(JustDied[playerid] == 1)
{
    if(GetPlayerVirtualWorld(playerid) != 0 || PlayerInfo[playerid][pVirWorld] != 0)
    {
        SetPlayerVirtualWorld(playerid, 0);
        PlayerInfo[playerid][pVirWorld] = 0;
    }
    SafeSetPlayerPos(playerid, 1182.5638,-1323.5256,13.5790);
    SetPlayerFacingAngle(playerid, 270.0);
    SafeSetPlayerInterior(playerid,0);
    TogglePlayerControllable(playerid, 1);
    return 1;
}
    if(TutTime[playerid] == 0 && PlayerInfo[playerid][pTut] == 1 && RegistrationStep[playerid] == 0 && AfterTutorial[playerid] == 0 && FirstSpawn[playerid] == 1)
    {
        new plname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, plname, sizeof(plname));
      SetPlayerVirtualWorld(playerid,PlayerInfo[playerid][pVirWorld]);
        SafeSetPlayerInterior(playerid,PlayerInfo[playerid][pInt]);
    SafeSetPlayerPos(playerid, PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z] + 1);
format(string, sizeof(string), "Welcome to Los Santos, %s... Returning where have you been",plname);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "~w~Welcome, ~b~%s. ~n~~y~Returning where have you been!", plname);
    GameTextForPlayer(playerid, string, 5000, 1);
    return 1;
}
if(house != 9999)
{
    if(PlayerInfo[playerid][pSpawn] == 1) //If 1, then you get to your house, else spawn somewhere else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerInterior(playerid,HouseInfo[house][hInt]);
SetPlayerVirtualWorld(playerid,HouseInfo[house][hWorld]);
SafeSetPlayerPos(playerid, HouseInfo[house][hExitx], HouseInfo[house][hExity],HouseInfo[house][hExitz]); // Warp the player
PlayerInfo[playerid][pLocal] = house;
HouseEntered[playerid] = house;
return 1;
}
else if(PlayerInfo[playerid][pSpawn] == 0)
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
else if(PlayerInfo[playerid][pSpawn] == 2)
{
    new family = PlayerInfo[playerid][pFMember];
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, FamilyInfo[family][FamilyInterior]);
    SafeSetPlayerPos(playerid, FamilyInfo[family][FamilySpawn][0],FamilyInfo[family][FamilySpawn][1],FamilyInfo[family][FamilySpawn][2]);
    SetPlayerFacingAngle(playerid, FamilyInfo[family][FamilySpawn][3]);
    return 1;
}
else
{
if (PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)//Police Force spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
SetPlayerToTeamColor(playerid);
SafeSetPlayerInterior(playerid,6);
    rand = random(sizeof(gCopPlayerSpawns));
SafeSetPlayerPos(playerid, gCopPlayerSpawns[rand][0], gCopPlayerSpawns[rand][1], gCopPlayerSpawns[rand][2]); // Warp the player
SetPlayerFacingAngle(playerid, 270.0);
return 1;
}
else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
    }
    if (PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)//FBI spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
SetPlayerToTeamColor(playerid);
SafeSetPlayerInterior(playerid,3);
SafeSetPlayerPos(playerid, 299.7097,183.1322,1007.1719);
SetPlayerFacingAngle(playerid, 90);
return 1;
}
else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
    }
if (PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)//National Guard spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 0);
    SafeSetPlayerPos(playerid, 2731.5229,-2451.3643,17.5937);
    return 1;
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if (PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)//Fire/Ambulance spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerPos(playerid, 1174.9027,-1326.7284,14.5938);
SetPlayerFacingAngle(playerid, 0);
    return 1;
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if (PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)//Surenos spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 5);
    SafeSetPlayerPos(playerid, 2345.6570,-1185.5266,1027.9766);
    return 1;
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if (PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)//La Famiglia Sinatra spawn
{
if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 5);
    SafeSetPlayerPos(playerid, 1265.4475,-794.9257,1084.0078);
    return 1;
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if(PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pLeader] == 7)//Mayor spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
    {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 3);
    SafeSetPlayerPos(playerid, 356.2998,151.9914,1025.7891);
PlayerInfo[playerid][pLocal] = 241;
    return 1;
}
else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
    if (PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8) //Hitman spawn
    {
        if(PlayerInfo[playerid][pSpawn] == 3)
        {
        SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid, 1102.7017,-299.0774,73.9922);
SafeSetPlayerInterior(playerid,0);
        return 1;
    }
        else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
    }
    if (PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9) //News spawn
    {
        if(PlayerInfo[playerid][pSpawn] == 3)
        {
        SetPlayerToTeamColor(playerid);
        SafeSetPlayerInterior(playerid,3);
SafeSetPlayerPos(playerid, 355.7899,204.0173,1008.3828);
SafeGivePlayerWeapon(playerid, 43, 20);
        return 1;
    }
        else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
    }
    if (PlayerInfo[playerid][pJob] == 13  || PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10) //Taxi Cab Company spawn
    {
        if(PlayerInfo[playerid][pSpawn] == 3)
        {
        SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid, 1754.99,-1894.19,13.55);
SafeSetPlayerInterior(playerid,0);
        return 1;
}
        else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
    }
    if(IsAnInstructor(playerid) || PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11) //Driving/Flying School spawn
    {
        if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid,3);
SafeSetPlayerPos(playerid, 1494.4991,1308.9163,1093.2845);
SetPlayerFacingAngle(playerid, 180);
        return 1;
}
        else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
    }
    if (PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12) //Firemen
    {
        if(PlayerInfo[playerid][pSpawn] == 3)
        {
        SetPlayerToTeamColor(playerid);
        SafeSetPlayerInterior(playerid,0);
SafeSetPlayerPos(playerid, 616.9447,-1538.7158,15.2904);
        return 1;
    }
        else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
    }
    if (PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13) //Sons of Anarchy spawn
    {
        if(PlayerInfo[playerid][pSpawn] == 3)
        {
        SetPlayerToTeamColor(playerid);
        SafeSetPlayerInterior(playerid,0);
SafeSetPlayerPos(playerid, 683.0686,-473.8775,16.5363);
        return 1;
    }
        else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
    }
    if (PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14)//Yamaguchi spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 3);
    SafeSetPlayerPos(playerid, 962.8333,-60.0172,1001.1246);
    return 1;
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if (PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)//Chornaya Bratva spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 2);
    SafeSetPlayerPos(playerid, 2569.4744,-1284.6810,1065.3749);
    return 1;
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if (PlayerInfo[playerid][pMember] == 16 || PlayerInfo[playerid][pLeader] == 16)//La Vice spawn
{
if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 2);
    SafeSetPlayerPos(playerid, 455.8776,1413.6802,1084.3080);
    return 1;
}
else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
}
}
if (PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)//Police Force spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
SetPlayerToTeamColor(playerid);
SafeSetPlayerInterior(playerid,6);
    rand = random(sizeof(gCopPlayerSpawns));
SafeSetPlayerPos(playerid, gCopPlayerSpawns[rand][0], gCopPlayerSpawns[rand][1], gCopPlayerSpawns[rand][2]); // Warp the player
SetPlayerFacingAngle(playerid, 270.0);
return 1;
}
else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
    }
    if (PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)//FBI spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
SetPlayerToTeamColor(playerid);
SafeSetPlayerInterior(playerid,3);
SafeSetPlayerPos(playerid, 299.7097,183.1322,1007.1719);
SetPlayerFacingAngle(playerid, 90);
return 1;
}
else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
    }
if (PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)//National Guard spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 0);
    SafeSetPlayerPos(playerid, 2731.5229,-2451.3643,17.5937);
    return 1;
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if (PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)//Fire/Ambulance spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerPos(playerid, 1174.9027,-1326.7284,14.5938);
SetPlayerFacingAngle(playerid, 0);
    return 1;
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if (PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)//Surenos spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 5);
    SafeSetPlayerPos(playerid, 2345.6570,-1185.5266,1027.9766);
    return 1;
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if (PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)//La Famiglia Sinatra spawn
{
if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 5);
    SafeSetPlayerPos(playerid, 1265.4475,-794.9257,1084.0078);
    return 1;
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if(PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pLeader] == 7)//Mayor spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
    {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 3);
    SafeSetPlayerPos(playerid, 356.2998,151.9914,1025.7891);
PlayerInfo[playerid][pLocal] = 241;
    return 1;
}
else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
    if (PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8) //Hitman spawn
    {
        if(PlayerInfo[playerid][pSpawn] == 3)
        {
        SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid, 1102.7017,-299.0774,73.9922);
SafeSetPlayerInterior(playerid,0);
        return 1;
    }
        else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
    }
    if (PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9) //News spawn
    {
        if(PlayerInfo[playerid][pSpawn] == 3)
        {
        SetPlayerToTeamColor(playerid);
        SafeSetPlayerInterior(playerid,3);
SafeSetPlayerPos(playerid, 355.7899,204.0173,1008.3828);
SafeGivePlayerWeapon(playerid, 43, 20);
        return 1;
    }
        else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
    }
    if (PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10 || PlayerInfo[playerid][pJob] == 13) //Taxi Cab Company spawn
    {
        if(PlayerInfo[playerid][pSpawn] == 3)
        {
        SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid, 1754.99,-1894.19,13.55);
SafeSetPlayerInterior(playerid,0);
        return 1;
}
        else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
    }
    if(PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11 || IsAnInstructor(playerid)) //Driving/Flying School spawn
    {
        if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid,3);
SafeSetPlayerPos(playerid, 1494.4991,1308.9163,1093.2845);
SetPlayerFacingAngle(playerid, 180);
        return 1;
}
        else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
    }
    if (PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12)//Yamaguchi spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 0);
    SafeSetPlayerPos(playerid, 616.9447,-1538.7158,15.2904);
    return 1;
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if (PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13)//Yamaguchi spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 0);
    SafeSetPlayerPos(playerid, 683.0686,-473.8775,16.5363);
    return 1;
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
    if (PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14)//Yamaguchi spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 3);
    SafeSetPlayerPos(playerid, 962.8333,-60.0172,1001.1246);
    return 1;
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if (PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)//Chornaya Bratva spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 2);
    SafeSetPlayerPos(playerid, 2569.4744,-1284.6810,1065.3749);
    return 1;
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if (PlayerInfo[playerid][pMember] == 16 || PlayerInfo[playerid][pLeader] == 16)//La Vice spawn
{
if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 2);
    SafeSetPlayerPos(playerid, 455.8776,1413.6802,1084.3080);
    return 1;
}
else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if(PlayerInfo[playerid][pFMember] != 255)
{
    if(PlayerInfo[playerid][pSpawn] == 2)
    {
    new family = PlayerInfo[playerid][pFMember];
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, FamilyInfo[family][FamilyInterior]);
    SafeSetPlayerPos(playerid, FamilyInfo[family][FamilySpawn][0],FamilyInfo[family][FamilySpawn][1],FamilyInfo[family][FamilySpawn][2]);
    SetPlayerFacingAngle(playerid, FamilyInfo[family][FamilySpawn][3]);
    return 1;
}
else if(PlayerInfo[playerid][pSpawn] == 0)
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
else if(PlayerInfo[playerid][pSpawn] == 3)
{
                    if (PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)//Police Force spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
SetPlayerToTeamColor(playerid);
SafeSetPlayerInterior(playerid,6);
    rand = random(sizeof(gCopPlayerSpawns));
SafeSetPlayerPos(playerid, gCopPlayerSpawns[rand][0], gCopPlayerSpawns[rand][1], gCopPlayerSpawns[rand][2]); // Warp the player
SetPlayerFacingAngle(playerid, 270.0);
return 1;
}
else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
    }
    if (PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)//FBI spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
SetPlayerToTeamColor(playerid);
SafeSetPlayerInterior(playerid,3);
SafeSetPlayerPos(playerid, 299.7097,183.1322,1007.1719);
SetPlayerFacingAngle(playerid, 90);
return 1;
}
else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
    }
if (PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)//National Guard spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 0);
    SafeSetPlayerPos(playerid, 2731.5229,-2451.3643,17.5937);
    return 1;
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if (PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)//Fire/Ambulance spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerPos(playerid, 1174.9027,-1326.7284,14.5938);
SetPlayerFacingAngle(playerid, 0);
    return 1;
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if (PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)//Surenos spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 5);
    SafeSetPlayerPos(playerid, 2345.6570,-1185.5266,1027.9766);
    return 1;
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if (PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)//La Famiglia Sinatra spawn
{
if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 5);
    SafeSetPlayerPos(playerid, 1265.4475,-794.9257,1084.0078);
    return 1;
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if(PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pLeader] == 7)//Mayor spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
    {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 3);
    SafeSetPlayerPos(playerid, 356.2998,151.9914,1025.7891);
PlayerInfo[playerid][pLocal] = 241;
    return 1;
}
else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
    if (PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8) //Hitman spawn
    {
        if(PlayerInfo[playerid][pSpawn] == 3)
        {
        SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid, 1102.7017,-299.0774,73.9922);
SafeSetPlayerInterior(playerid,0);
        return 1;
    }
        else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
    }
    if (PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9) //News spawn
    {
        if(PlayerInfo[playerid][pSpawn] == 3)
        {
        SetPlayerToTeamColor(playerid);
        SafeSetPlayerInterior(playerid,3);
SafeSetPlayerPos(playerid, 355.7899,204.0173,1008.3828);
SafeGivePlayerWeapon(playerid, 43, 20);
        return 1;
    }
        else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
    }
    if (PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10 || PlayerInfo[playerid][pJob] == 13) //Taxi Cab Company spawn
    {
        if(PlayerInfo[playerid][pSpawn] == 3)
        {
        SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid, 1754.99,-1894.19,13.55);
SafeSetPlayerInterior(playerid,0);
        return 1;
}
        else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
    }
    if(PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11 || IsAnInstructor(playerid)) //Driving/Flying School spawn
    {
        if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid,3);
SafeSetPlayerPos(playerid, 1494.4991,1308.9163,1093.2845);
SetPlayerFacingAngle(playerid, 180);
        return 1;
}
        else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
    }
    if (PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12)//Yamaguchi spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 0);
    SafeSetPlayerPos(playerid, 616.9447,-1538.7158,15.2904);
    return 1;
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if (PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13)//Yamaguchi spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 0);
    SafeSetPlayerPos(playerid, 683.0686,-473.8775,16.5363);
    return 1;
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
    if (PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14)//Yamaguchi spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 3);
    SafeSetPlayerPos(playerid, 962.8333,-60.0172,1001.1246);
    return 1;
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if (PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)//Chornaya Bratva spawn
{
    if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 2);
    SafeSetPlayerPos(playerid, 2569.4744,-1284.6810,1065.3749);
    return 1;
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if (PlayerInfo[playerid][pMember] == 16 || PlayerInfo[playerid][pLeader] == 16)//La Vice spawn
{
if(PlayerInfo[playerid][pSpawn] == 3)
        {
    SetPlayerToTeamColor(playerid);
    SafeSetPlayerInterior(playerid, 2);
    SafeSetPlayerPos(playerid, 455.8776,1413.6802,1084.3080);
    return 1;
}
else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
}
}
    else
    {
SetPlayerToTeamColor(playerid);
SafeSetPlayerPos(playerid,1612.3240,-2330.1670,13.5469);
SetPlayerVirtualWorld(playerid, SpawnWorld[playerid]);
SafeSetPlayerInterior(playerid, SpawnInterior[playerid]);
TogglePlayerControllable(playerid, 1);
return 1;
}
}
}
return 1;
}

Ok, sad cu da izmenim koordinate. Ali onda bih sad trebao da stavim ovo za bolnicu code? Mislim da bude zatvoren u bolnici nekoliko sekundi pa za npr 5 sekundi da mu izabere spawn izmedju glavne ili skejt bolnice? Jel tako?

to je tvoja dobra volja, neobavezno