Spawn PD/INT posle smrti u bazi

Započeo LuGiCH, Oktobar 23, 2024, 23:31:44 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Pozdrav, zanima me kako bih mogao da stavim da se PD/INT clanovi/lideri spawnuju u njihovoj bazi nakon smrti. Ovo sam pokusao ali ne uspeva, spawnuju se u bolnici
CB: SpawnIgraca(playerid)
           else if(PlayerInfo[playerid][pClan] == 1 &&	PlayerInfo[playerid][pLider] == 1 ) 
	{
	    BolnicaSpawn[playerid] == false;
	    Ucitavanje_NaSpawnu(playerid);
	    F_SetPlayerPos(playerid, 315.1484,1824.9572,2241.5850);
	    F_ResetPlayerWeapons(playerid);
	    ac_SetPlayerInterior(playerid, 0);
	    SetPlayerVirtualWorld(playerid, 0);
	}


OnPlayerDeath posalji ovdje
Heaven Community [IN PROGRESS]

Citat: V01D poslato Oktobar 24, 2024, 15:49:25 POSLE PODNEDaj ceo callback
CB: SpawnIgraca(playerid)
{
    if(PlayerInfo[playerid][pZatvor] == 1) //DODAVATI I U PRVI_SPAWN SETSPAWNINFO
    {
        new rand = random(sizeof(RandomZatvor)), string[80];
        Zatvor_Bjezanje[playerid] = 4;
        Ucitavanje_NaSpawnu(playerid);
        F_SetPlayerPos(playerid, RandomZatvor[rand][0], RandomZatvor[rand][1], RandomZatvor[rand][2]);
        F_ResetPlayerWeapons(playerid);
        ac_SetPlayerInterior(playerid, 0);
        SetPlayerVirtualWorld(playerid, 500);
        SCM(playerid, -1,""CRVENA"-------------------------------------------------------------------------------------------------------------");
        F_SCMF(playerid, -1, "- Niste odsluzili zatvorsku kaznu ostalo Vam je jos %s min -", KonvertBroj(PlayerInfo[playerid][pZatvorVreme]));
        SCM(playerid, -1,""CRVENA"-------------------------------------------------------------------------------------------------------------");
        format(string, sizeof(string), "VRACEN NA ODSLUZENJE ZATVORSKE KAZNE | Igrac: %s", GetName(playerid));
        UpisiLog(LOG_ANTICHEAT, string);
        return 1;
    }
    else if(PlayerInfo[playerid][pZatvor] == 2) //DODAVATI I U PRVI_SPAWN SETSPAWNINFO
    {
        new string[150];
        Ucitavanje_NaSpawnu(playerid);
        SetPlayerWorldBounds(playerid, 337.5694,101.5826,1940.9759,1798.7453);
        F_SetPlayerPos(playerid, 107.2300, 1920.6311, 18.5208);
        F_ResetPlayerWeapons(playerid);
        ac_SetPlayerInterior(playerid, 0);
        SetPlayerVirtualWorld(playerid, 0);
        SCM(playerid, -1,""CRVENA"-------------------------------------------------------------------------------------------");
        F_SCMF(playerid, -1, "Niste odsluzili zatvorsku kaznu ostalo Vam je jos %s min.", KonvertBroj(PlayerInfo[playerid][pZatvorVreme]));
        SCM(playerid, -1,""CRVENA"-------------------------------------------------------------------------------------------");
        format(string, sizeof(string), "Niste odsluzili zatvorsku kaznu~n~ ostalo Vam je jos~n~ ~r~%s min !", KonvertBroj(PlayerInfo[playerid][pZatvorVreme]));
        GameTextForPlayer(playerid, string, 5000, 3);
        format(string, sizeof(string), "VRACEN NA ODSLUZENJE ZATVORSKE KAZNE | Igrac: %s", GetName(playerid));
        UpisiLog(LOG_ANTICHEAT, string);
        return 1;
    }
    else if(PlayerInfo[playerid][pCrash] == 1) //DODAVATI I U PRVI_SPAWN SETSPAWNINFO
    {
         if(AC_Info[gCrash] == 1)
        {
            Ucitavanje_NaSpawnu(playerid);
            PlayerInfo[playerid][pCrash] = 0; SacuvajKorisnike(playerid);
            F_SetPlayerPos(playerid, PlayerInfo[playerid][pSpawnX], PlayerInfo[playerid][pSpawnY], PlayerInfo[playerid][pSpawnZ]);
            ac_SetPlayerInterior(playerid, PlayerInfo[playerid][pCrash_INT]);
            SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][pCrash_VW]);
            GameTextForPlayer(playerid, "~r~Zadnji put ste imali crash~n~~w~vraceni ste na staru poziciju.", 5000, 3);
            if(PlayerInfo[playerid][pVip] == 3) { F_SetPlayerArmour(playerid, 50.0); }
            if(PlayerInfo[playerid][pVip] == 4) { F_SetPlayerArmour(playerid, 99.0); }
            return 1;
        }
          return 1;
    }
     else if(Spectate_Info[playerid][sp_Spectating] == true)
    {
        KillTimer(Spectate_Info[playerid][sp_Timer]);
        ac_SetPlayerInterior(playerid, Spectate_Info[playerid][sp_Int]);
        SetPlayerVirtualWorld(playerid, Spectate_Info[playerid][sp_VW]);
        SetPlayerPos(playerid, Spectate_Info[playerid][sp_Pos][0], Spectate_Info[ playerid][sp_Pos][1], Spectate_Info[playerid][sp_Pos][2]);
        GameTextForPlayer(playerid, "~b~spec ugasen~n~~w~vraceni ste na staru poziciju", 5000, 3);
        UnistiSpecTD(playerid);
        Spectate_Info[playerid][sp_ID] = -1;
        Spectate_Info[playerid][sp_Int] = 0;
        Spectate_Info[playerid][sp_VW] = 0;
        Spectate_Info[playerid][sp_Pos][0] = 0.0;
        Spectate_Info[playerid][sp_Pos][1] = 0.0;
        Spectate_Info[playerid][sp_Pos][2] = 0.0;
        Spectate_Info[playerid][sp_Spectating] = false;
        Spectate_Info[playerid][sp_GetTime] = 0;
        if(PlayerInfo[playerid][pVip] == 3) { F_SetPlayerArmour(playerid, 50.0); }
        if(PlayerInfo[playerid][pVip] == 4) { F_SetPlayerArmour(playerid, 99.0); }
        return 1;
    }
    else if(BolnicaSpawn[playerid] == true) //NAKON SMRTI
    {
        new rand_bolnica = random(sizeof(Bolnica_Krevet));
        F_SetPlayerPos(playerid, Bolnica_Krevet[rand_bolnica][0], Bolnica_Krevet[rand_bolnica][1], Bolnica_Krevet[rand_bolnica][2]);
        SetPlayerFacingAngle(playerid, Bolnica_Krevet[rand_bolnica][3]);
        ac_SetPlayerInterior(playerid, 50);
        SetPlayerVirtualWorld(playerid, 654);
        F_SetPlayerHealth(playerid, 99.0);
        F_TogglePlayerControllable(playerid, 1);
        BolnicaSpawn[playerid] = false;
        if(PlayerInfo[playerid][pVip] == 3) { F_SetPlayerArmour(playerid, 50.0); }
        if(PlayerInfo[playerid][pVip] == 4) { F_SetPlayerArmour(playerid, 99.0); }
        BolnicaVreme[playerid] = 1; SetTimerEx("Bolnica_Novac", 1000, false, "i", playerid);
        return 1;
    }
    else if(WARPInfo[playerid][war_ID] != -1)
    {
        new w = WARPInfo[playerid][war_ID], rand1 = random(sizeof(WarMap_Team1)), rand2 = random(sizeof(WarMap_Team2));
        ac_SetPlayerInterior(playerid, 10);
        SetPlayerVirtualWorld(playerid, w);
        F_SetPlayerHealth(playerid, 99);
        F_SetPlayerArmour(playerid, 99);
        if(WARPInfo[playerid][war_Team][0] == true) { F_SetPlayerPos(playerid, WarMap_Team1[rand1][0], WarMap_Team1[rand1][1], WarMap_Team1[rand1][2]); F_SetPlayerSkin(playerid, 285); }
        else { F_SetPlayerPos(playerid, WarMap_Team2[rand2][0], WarMap_Team2[rand2][1], WarMap_Team2[rand2][2]); F_SetPlayerSkin(playerid, 287); }
        F_GivePlayerWeapon(playerid, WARInfo[w][war_Guns][0], 300);
        F_GivePlayerWeapon(playerid, WARInfo[w][war_Guns][1], 300);
        F_GivePlayerWeapon(playerid, WARInfo[w][war_Guns][2], 300);
        F_GivePlayerWeapon(playerid, WARInfo[w][war_Guns][3], 300);
        return 1;
    }
    else if(BolnicaSpawn[playerid] == true)
    {
        new rand_bolnica = random(sizeof(Bolnica_Krevet));
        new string[150], skinid = GetPlayerSkin(playerid);
        F_SetPlayerPos(playerid, Bolnica_Krevet[rand_bolnica][0], Bolnica_Krevet[rand_bolnica][1], Bolnica_Krevet[rand_bolnica][2]);
        SetPlayerFacingAngle(playerid, Bolnica_Krevet[rand_bolnica][3]);
        ac_SetPlayerInterior(playerid, 0);
        SetPlayerVirtualWorld(playerid, 0);
        LoopingAnim(playerid,"BEACH", "bather", 4.0, 1, 0, 0, 0, 0);
        SakrijInGameTD(playerid);
        KreirajBolnicaTD(playerid);
        format(string, sizeof(string), "HITNA POMOC");
           PlayerTextDrawSetString(playerid, Bolnica_PTD[playerid][1], string);
           PlayerTextDrawHide(playerid, Bolnica_PTD[playerid][7]);
        PlayerTextDrawSetPreviewModel(playerid, Bolnica_PTD[playerid][7], skinid);
        PlayerTextDrawShow(playerid, Bolnica_PTD[playerid][7]);
        format(string, sizeof(string), "U KOMI STE ...");
        PlayerTextDrawSetString(playerid, Bolnica_PTD[playerid][8], string);
        format(string, sizeof(string), "Vozilom hitne pomoci ste prevezeni u bolnicu~n~gde Vam se pruza lijecnicka pomoc");
        PlayerTextDrawSetString(playerid, Bolnica_PTD[playerid][9], string);
        format(string, sizeof(string), "Bicete izijeceni za    sekundi");
        PlayerTextDrawSetString(playerid, Bolnica_PTD[playerid][10], string);
        PlayerTextDrawSetString(playerid, Bolnica_PTD[playerid][11], "15"); //obicno
        BolnicaVreme[playerid] = 15+1;
        F_SetPlayerHealth(playerid, 99.0);
        return 1;
    }
    else //DODAVATI I U PRVI_SPAWN SETSPAWNINFO
    {
        if(PlayerInfo[playerid][pSpawn] == SPAWN_MARKET) //DODAVATI I U PRVI_SPAWN SETSPAWNINFO
        {
            new rand;
            #if SPOREDNI_SPAWNOVI == 1
            {
                rand = random(sizeof(RandomSpawnGradjanin));
            }
               #else
               {
                  rand = random(7);
            }
            #endif
            Ucitavanje_NaSpawnu(playerid);
            F_SetPlayerPos(playerid, RandomSpawnGradjanin[rand][0], RandomSpawnGradjanin[rand][1], RandomSpawnGradjanin[rand][2]);
            SetPlayerFacingAngle(playerid, RandomSpawnGradjanin[rand][3]);
            ac_SetPlayerInterior(playerid, 0);
            SetPlayerVirtualWorld(playerid, 0);
            if(PlayerInfo[playerid][pVip] == 3) { F_SetPlayerArmour(playerid, 50.0); }
            if(PlayerInfo[playerid][pVip] == 4) { F_SetPlayerArmour(playerid, 99.0); }
        }
        else if(PlayerInfo[playerid][pSpawn] == SPAWN_ORGANIZACIJA) //DODAVATI I U PRVI_SPAWN SETSPAWNINFO
        {
            if(PlayerInfo[playerid][pLider] != 0 || PlayerInfo[playerid][pClan ] != 0)
            {
                new OrgID = PlayerInfo[playerid][pClan];
                Ucitavanje_NaSpawnu(playerid);
                F_SetPlayerPos(playerid, OrgInfo[OrgID][oPozSpawnX], OrgInfo[OrgID][oPozSpawnY], OrgInfo[OrgID][oPozSpawnZ]);
                ac_SetPlayerInterior(playerid, OrgInfo[OrgID][oInt]);
                SetPlayerVirtualWorld(playerid, OrgInfo[OrgID][oVw]);
            }
            else
            {
                PlayerInfo[playerid][pSpawn] = SPAWN_MARKET;
                SacuvajKorisnike(playerid);
                new rand;
                #if SPOREDNI_SPAWNOVI == 1
                {
                    rand = random(sizeof(RandomSpawnGradjanin));
                }
                   #else
                   {
                      rand = random(7);
                }
                #endif
                Ucitavanje_NaSpawnu(playerid);
                F_SetPlayerPos(playerid, RandomSpawnGradjanin[rand][0], RandomSpawnGradjanin[rand][1], RandomSpawnGradjanin[rand][2]);
                SetPlayerFacingAngle(playerid, RandomSpawnGradjanin[rand][3]);
                ac_SetPlayerInterior(playerid, 0);
                SetPlayerVirtualWorld(playerid, 0);
                if(PlayerInfo[playerid][pVip] == 3) { F_SetPlayerArmour(playerid, 50.0); }
                if(PlayerInfo[playerid][pVip] == 4) { F_SetPlayerArmour(playerid, 99.0); }
                SCM(playerid, -1, "* "ZUTA"Spawn Vam je postavljen na 'Gradjanin spawn' jer vise niste clan organizacije!");
            }
        }
        else if(PlayerInfo[playerid][pSpawn] == SPAWN_AHBAZA) //DODAVATI I U PRVI_SPAWN SETSPAWNINFO
        {
            if(PlayerInfo[playerid][pAdmin] != 0 || PlayerInfo[playerid][pHelper] != 0)
            {
                Ucitavanje_NaSpawnu(playerid);
                F_SetPlayerPos(playerid, 1419.6647, 730.8020, 10.8203);
                ac_SetPlayerInterior(playerid, 0);
                SetPlayerVirtualWorld(playerid, 0);
            }
            else
            {
                PlayerInfo[playerid][pSpawn] = SPAWN_MARKET;
                SacuvajKorisnike(playerid);
                new rand = random(sizeof(RandomSpawnGradjanin));
                Ucitavanje_NaSpawnu(playerid);
                F_SetPlayerPos(playerid, RandomSpawnGradjanin[rand][0], RandomSpawnGradjanin[rand][1], RandomSpawnGradjanin[rand][2]);
                SetPlayerFacingAngle(playerid, RandomSpawnGradjanin[rand][3]);
                ac_SetPlayerInterior(playerid, 0);
                SetPlayerVirtualWorld(playerid, 0);
                SCM(playerid, -1, "* "ZUTA"Spawn Vam je postavljen na 'Gradjanin spawn' jer vise niste dio A/H Tima!");
            }
        }
        else if(PlayerInfo[playerid][pSpawn] == SPAWN_RENTKUCA) //DODAVATI I U PRVI_SPAWN SETSPAWNINFO
        {
            if(PlayerInfo[playerid][pRent_Kuce] != -1)
            {
                new i = PlayerInfo[playerid][pRent_Kuce];
                Ucitavanje_NaSpawnu(playerid);
                ac_SetPlayerInterior(playerid, KucaInfo[i][k_Int]);
                SetPlayerVirtualWorld(playerid, KucaInfo[i][k_VW]);
                F_SetPlayerPos(playerid, KucaInfo[i][k_IzlazX], KucaInfo[i][k_IzlazY], KucaInfo[i][k_IzlazZ]);
                SetPlayerFacingAngle(playerid, KucaInfo[i][k_Angle]);
                if(PlayerInfo[playerid][pVip] == 3) { F_SetPlayerArmour(playerid, 50.0); }
                if(PlayerInfo[playerid][pVip] == 4) { F_SetPlayerArmour(playerid, 99.0); }
            }
            else
            {
                PlayerInfo[playerid][pSpawn] = SPAWN_MARKET;
                SacuvajKorisnike(playerid);
                new rand = random(sizeof(RandomSpawnGradjanin));
                Ucitavanje_NaSpawnu(playerid);
                F_SetPlayerPos(playerid, RandomSpawnGradjanin[rand][0], RandomSpawnGradjanin[rand][1], RandomSpawnGradjanin[rand][2]);
                SetPlayerFacingAngle(playerid, RandomSpawnGradjanin[rand][3]);
                ac_SetPlayerInterior(playerid, 0);
                SetPlayerVirtualWorld(playerid, 0);
                if(PlayerInfo[playerid][pVip] == 3) { F_SetPlayerArmour(playerid, 50.0); }
                if(PlayerInfo[playerid][pVip] == 4) { F_SetPlayerArmour(playerid, 99.0); }
                SCM(playerid, -1, "* "ZUTA"Spawn Vam je postavljen na 'Gradjanin spawn' jer vise ne iznajmljujete sobu!");
            }
        }
        else if(PlayerInfo[playerid][pSpawn] == SPAWN_KUCA) //DODAVATI I U PRVI_SPAWN SETSPAWNINFO
        {
            if(PlayerInfo[playerid][pKuca] != -1)
            {
                new i = PlayerInfo[playerid][pKuca];
                Ucitavanje_NaSpawnu(playerid);
                ac_SetPlayerInterior(playerid, KucaInfo[i][k_Int]);
                SetPlayerVirtualWorld(playerid, KucaInfo[i][k_VW]);
                F_SetPlayerPos(playerid, KucaInfo[i][k_IzlazX], KucaInfo[i][k_IzlazY], KucaInfo[i][k_IzlazZ]);
                SetPlayerFacingAngle(playerid, KucaInfo[i][k_Angle]);
                if(PlayerInfo[playerid][pVip] == 3) { F_SetPlayerArmour(playerid, 50.0); }
                if(PlayerInfo[playerid][pVip] == 4) { F_SetPlayerArmour(playerid, 99.0); }
            }
            else
            {
                PlayerInfo[playerid][pSpawn] = SPAWN_MARKET;
                SacuvajKorisnike(playerid);
                new rand = random(sizeof(RandomSpawnGradjanin));
                Ucitavanje_NaSpawnu(playerid);
                F_SetPlayerPos(playerid, RandomSpawnGradjanin[rand][0], RandomSpawnGradjanin[rand][1], RandomSpawnGradjanin[rand][2]);
                SetPlayerFacingAngle(playerid, RandomSpawnGradjanin[rand][3]);
                ac_SetPlayerInterior(playerid, 0);
                SetPlayerVirtualWorld(playerid, 0);
                if(PlayerInfo[playerid][pVip] == 3) { F_SetPlayerArmour(playerid, 50.0); }
                if(PlayerInfo[playerid][pVip] == 4) { F_SetPlayerArmour(playerid, 99.0); }
                SCM(playerid, -1, "* "ZUTA"Spawn Vam je postavljen na 'Gradjanin spawn' jer vise nemate kucu!");
            }
        }
        else if(PlayerInfo[playerid][pSpawn] == SPAWN_STAN) //DODAVATI I U PRVI_SPAWN SETSPAWNINFO
        {
            if(PlayerInfo[playerid][pStan] != -1)
            {
                new i = PlayerInfo[playerid][pStan];
                Ucitavanje_NaSpawnu(playerid);
                ac_SetPlayerInterior(playerid, StanInfo[i][s_Int]);
                SetPlayerVirtualWorld(playerid,StanInfo[i][s_VW]);
                F_SetPlayerPos(playerid, StanInfo[i][s_IzlazX], StanInfo[i][s_IzlazY], StanInfo[i][s_IzlazZ]);
                SetPlayerFacingAngle(playerid, StanInfo[i][s_Angle]);
                if(PlayerInfo[playerid][pVip] == 3) { F_SetPlayerArmour(playerid, 50.0); }
                if(PlayerInfo[playerid][pVip] == 4) { F_SetPlayerArmour(playerid, 99.0); }
            }
            else
            {
                PlayerInfo[playerid][pSpawn] = SPAWN_MARKET;
                SacuvajKorisnike(playerid);
                new rand = random(sizeof(RandomSpawnGradjanin));
                Ucitavanje_NaSpawnu(playerid);
                F_SetPlayerPos(playerid, RandomSpawnGradjanin[rand][0], RandomSpawnGradjanin[rand][1], RandomSpawnGradjanin[rand][2]);
                SetPlayerFacingAngle(playerid, RandomSpawnGradjanin[rand][3]);
                ac_SetPlayerInterior(playerid, 0);
                SetPlayerVirtualWorld(playerid, 0);
                if(PlayerInfo[playerid][pVip] == 3) { F_SetPlayerArmour(playerid, 50.0); }
                if(PlayerInfo[playerid][pVip] == 4) { F_SetPlayerArmour(playerid, 99.0); }
                SCM(playerid, -1, "* "ZUTA"Spawn Vam je postavljen na 'Gradjanin spawn' jer vise nemate stan!");
            }
        }
        else if(PlayerInfo[playerid][pSpawn] == SPAWN_VIKENDICA) //DODAVATI I U PRVI_SPAWN SETSPAWNINFO
        {
            if(PlayerInfo[playerid][pVikendica] != -1)
            {
                new i = PlayerInfo[playerid][pVikendica];
                Ucitavanje_NaSpawnu(playerid);
                ac_SetPlayerInterior(playerid, VikendicaInfo[i][v_Int]);
                SetPlayerVirtualWorld(playerid,VikendicaInfo[i][v_VW]);
                F_SetPlayerPos(playerid, VikendicaInfo[i][v_IzlazX], VikendicaInfo[i][v_IzlazY], VikendicaInfo[i][v_IzlazZ]);
                SetPlayerFacingAngle(playerid, VikendicaInfo[i][v_Angle]);
                if(PlayerInfo[playerid][pVip] == 3) { F_SetPlayerArmour(playerid, 50.0); }
                if(PlayerInfo[playerid][pVip] == 4) { F_SetPlayerArmour(playerid, 99.0); }
            }
            else
            {
                PlayerInfo[playerid][pSpawn] = SPAWN_MARKET;
                SacuvajKorisnike(playerid);
                new rand = random(sizeof(RandomSpawnGradjanin));
                Ucitavanje_NaSpawnu(playerid);
                F_SetPlayerPos(playerid, RandomSpawnGradjanin[rand][0], RandomSpawnGradjanin[rand][1], RandomSpawnGradjanin[rand][2]);
                SetPlayerFacingAngle(playerid, RandomSpawnGradjanin[rand][3]);
                ac_SetPlayerInterior(playerid, 0);
                SetPlayerVirtualWorld(playerid, 0);
                if(PlayerInfo[playerid][pVip] == 3) { F_SetPlayerArmour(playerid, 50.0); }
                if(PlayerInfo[playerid][pVip] == 4) { F_SetPlayerArmour(playerid, 99.0); }
                SCM(playerid, -1, "* "ZUTA"Spawn Vam je postavljen na 'Gradjanin spawn' jer vise nemate vikendicu!");
            }
        }
        else if(PlayerInfo[playerid][pSpawn] == SPAWN_GANGSTER) //DODAVATI I U PRVI_SPAWN SETSPAWNINFO
        {
            new rand;
            #if SPOREDNI_SPAWNOVI == 1
            {
                rand = random(sizeof(RandomSpawnGangster));
            }
               #else
               {
                  rand = random(7);
            }
            #endif
            Ucitavanje_NaSpawnu(playerid);
            F_SetPlayerPos(playerid, RandomSpawnGangster[rand][0], RandomSpawnGangster[rand][1], RandomSpawnGangster[rand][2]);
            SetPlayerFacingAngle(playerid, RandomSpawnGangster[rand][3]);
            SetPlayerVirtualWorld(playerid, 0); ac_SetPlayerInterior(playerid, 0);
            if(PlayerInfo[playerid][pVip] == 3) { F_SetPlayerArmour(playerid, 50.0); }
            if(PlayerInfo[playerid][pVip] == 4) { F_SetPlayerArmour(playerid, 99.0); }
        }
        else if(PlayerInfo[playerid][pSpawn] == SPAWN_FARMER) //DODAVATI I U PRVI_SPAWN SETSPAWNINFO
        {
            new rand;
            #if SPOREDNI_SPAWNOVI == 1
            {
                rand = random(sizeof(RandomSpawnFarmer));
            }
               #else
               {
                  rand = random(7);
            }
            #endif
            Ucitavanje_NaSpawnu(playerid);
            F_SetPlayerPos(playerid, RandomSpawnFarmer[rand][0], RandomSpawnFarmer[rand][1], RandomSpawnFarmer[rand][2]);
            SetPlayerFacingAngle(playerid, RandomSpawnFarmer[rand][3]);
            SetPlayerVirtualWorld(playerid, 0); ac_SetPlayerInterior(playerid, 0);
            if(PlayerInfo[playerid][pVip] == 3) { F_SetPlayerArmour(playerid, 50.0); }
            if(PlayerInfo[playerid][pVip] == 4) { F_SetPlayerArmour(playerid, 99.0); }
        }
        else if(PlayerInfo[playerid][pClan] == 1 &&    PlayerInfo[playerid][pLider] == 1 ) //DODAVATI I U PRVI_SPAWN SETSPAWNINFO
    {
        BolnicaSpawn[playerid] == false;

        Ucitavanje_NaSpawnu(playerid);
        F_SetPlayerPos(playerid, 315.1484,1824.9572,2241.5850);
        F_ResetPlayerWeapons(playerid);
        ac_SetPlayerInterior(playerid, 0);
        SetPlayerVirtualWorld(playerid, 0);
    }
        else if(PlayerInfo[playerid][pClan] == 2 &&    PlayerInfo[playerid][pLider] == 2 ) //DODAVATI I U PRVI_SPAWN SETSPAWNINFO
    {
        BolnicaSpawn[playerid] == false;
        Ucitavanje_NaSpawnu(playerid);
        F_SetPlayerPos(playerid, 530.3623,-71.5535,998.9804);
        F_ResetPlayerWeapons(playerid);
        ac_SetPlayerInterior(playerid, 0);
        SetPlayerVirtualWorld(playerid, 0);
    }
    return 1;
}
}

Citat: 𝓒𝓪𝓼𝓮𝔂 poslato Oktobar 24, 2024, 20:58:26 POSLE PODNEOnPlayerDeath posalji ovdje
public OnPlayerDeath(playerid, killerid, reason)
{
	if(Ulogovan[playerid] == 0)
	{

		SCM(playerid, -1, ""KICKBOJA"[ BM - KICK ] "BIJELA"Umrli ste pre nego sto ste se ulogovali pa ste kikovani!");
		F_Kick(playerid);
		return 1;
	}
	// -------------------------------------------------------------------------
	if(Ima_Ranjavanje_TD[playerid] == 1) { UnistiRanjavanjeTD(playerid); }
	// -------------------------------------------------------------------------
    if(Ima_Radar_TD[playerid] == 1) { UnistiRadarTD(playerid); }
    // -------------------------------------------------------------------------
    if(killerid != IPI)
	{
		if(WARPInfo[killerid][war_ID] == -1) PlayerInfo[killerid][pUbistava] ++; PlayerInfo[playerid][pSmrti] ++;
		if(!ClanPolicije(killerid) && IsPlayerConnected(playerid) && PlayerInfo[killerid][pAdmin] == 0 && PlayerInfo[killerid][pHelper] == 0 && PlayerInfo[killerid][pLevel] != 1 && PlayerInfo[killerid][pZatvor] == 0 && WARPInfo[killerid][war_ID] == -1)
		{
			Wanted_Level[killerid] = 6;
			if(Wanted_Level[killerid] > 6) { Wanted_Level[killerid] = 6; }
			F_SetPlayerWantedLevel(killerid, Wanted_Level[killerid]);
			PostaviWanted(killerid, "Ubistvo", "Nepoznat");
		}
		if(Wanted_Level[playerid] != 0)
		{
			Wanted_Level[playerid] = 0;
			F_SetPlayerWantedLevel(playerid, Wanted_Level[playerid]);
		}
    // ---------------------------------------------------------------------
  	if(killerid == IPI)
		{
	    if(Wanted_Level[playerid] > 0 && WARPInfo[killerid][war_ID] == -1)
     	{
     	    if(PlayerInfo[playerid][pZatvor] == 0)
     	    {
	      		new string[256];
	    		new izgnovac = Wanted_Level[playerid]*4500;
				F_SCMF(playerid, -1, ""IGBOJA"BM: {FFFFFF}Izvrsio si samoubistvo sa %d wl-om/wl-a i izgubio si $%d!", Wanted_Level[playerid],izgnovac);
				Wanted_Level[playerid] = 0;
				F_SetPlayerWantedLevel(playerid, Wanted_Level[playerid]);
				F_NovacMinus(playerid, izgnovac);
				format(string, sizeof(string),"[PD / Interventna JedinicaCentral Dispatch]: %s je izvrsio samoubistvo i izgubio/la je $%d.",GetName(playerid),izgnovac);
				KeroviPoruka(PDPLAVA, string);
			}
		}
	}
 	    if(ClanPolicije(killerid))
      	{
       		if(PolicijaDuznost[killerid] == 1)
       	{
					    new string[256];
					    if(Wanted_Level[playerid] < 1)
					    {
						    format(string,256,"[PD / Interventna JedinicaCentral Dispatch]: Policajac %s je ubio gradjanina %s.",GetName(killerid),GetName(playerid));
						    KeroviPoruka(PDPLAVA, string);
						}
					    else if(Wanted_Level[playerid] > 0)
					    {
					        new lova = Wanted_Level[playerid]*3500;
					        new lovapd = Wanted_Level[playerid]*3500;
							F_SCMF(playerid, -1, ""IGBOJA"BM: {FFFFFF}Policajac %s te je ubio sa %d wanted level-om/a i izgubio si $%d.", GetName(killerid),Wanted_Level[playerid],lova);
							Wanted_Level[playerid] = 0;
							F_SetPlayerWantedLevel(playerid, Wanted_Level[playerid]);
							F_NovacMinus(playerid, lova);
							F_NovacPlus(killerid, lovapd);
							format(string,256,"[PD / Interventna JedinicaCentral Dispatch]: Policajac %s je ubio gradjanina %s i dobio $%d.",GetName(killerid),GetName(playerid),lovapd);
						    KeroviPoruka(PDPLAVA, string);
						    F_SCMF(killerid, -1, ""IGBOJA"BM: {FFFFFF}Ubili ste kriminalca %s.",GetName(playerid));
					    }
					}
				}
		// ---------------------------------------------------------------------
  		for(new w = 1; w < MAX_WARS; w ++)
		{
			if(WARInfo[w][war_Aktivan] == true && WARPInfo[playerid][war_ID] == w && WARPInfo[killerid][war_ID] == w)
			{
			    new string[144];
				WARPInfo[killerid][war_Ubistva] ++;
			   	WARPInfo[playerid][war_Smrti] ++;
				if(WARPInfo[playerid][war_Team][0] == true && WARPInfo[killerid][war_Team][0] == true)
				{
					WARInfo[w][war_Team_Score][0] -= 2;
                    format(string, sizeof(string), ""CRVENA"[WAR]: "BIJELA"%s(Tim 1) je ubio svog saigraca %s pa je njegov tim izgubio 2 poena.", GetName(killerid), GetName(playerid));
					WARPoruka(w, -1, string);
			        UpdateWarTD(w);
				}
				if(WARPInfo[playerid][war_Team][1] == true && WARPInfo[killerid][war_Team][1] == true)
				{
					WARInfo[w][war_Team_Score][1] -= 2;
			        format(string, sizeof(string), ""CRVENA"[WAR]: "BIJELA"%s(Tim 2) je ubio svog saigraca %s pa je njegov tim izgubio 2 poena.", GetName(killerid), GetName(playerid));
			        WARPoruka(w, -1, string);
			        UpdateWarTD(w);
				}
				if(WARPInfo[killerid][war_Team][0] == true && WARPInfo[playerid][war_Team][1] == true)
				{
			        WARInfo[w][war_Team_Score][0] ++;
		           	format(string, sizeof(string), ""PLJACKA_COL"[WAR KILL]: "SVIJETLOSIVA"%s(Tim 1) je ubio protivnika %s.", GetName(killerid), GetName(playerid));
					WARPoruka(w, -1, string);
					format(string, sizeof(string), "~r~Ubistva: %d", WARPInfo[killerid][war_Ubistva]);
					GameTextForPlayer(killerid, string, 3000, 6);
			        UpdateWarTD(w);
				}
				if(WARPInfo[killerid][war_Team][1] == true && WARPInfo[playerid][war_Team][0] == true)
				{
			        WARInfo[w][war_Team_Score][1] ++;
                    format(string, sizeof(string), ""PLJACKA_COL"[WAR KILL]: "SVIJETLOSIVA"%s(Tim 2) je ubio protivnika %s.", GetName(killerid), GetName(playerid));
					WARPoruka(w, -1, string);
 					format(string, sizeof(string), "~r~Ubistva: %d", WARPInfo[killerid][war_Ubistva]);
					GameTextForPlayer(killerid, string, 3000, 6);
			        UpdateWarTD(w);
				}
			}
		}
	}
	// -------------------------------------------------------------------------
 	if(WARPInfo[playerid][war_ID] == -1)
 	{
 		PlayerInfo[playerid][pSmrti] ++;
 	}
 	// -------------------------------------------------------------------------
 	/*if(PubgEventProvera[playerid] == 1)
  		{
			PlayerInfo[killerid][pTrazeniLevel] = 0;
	}*/
 	// -------------------------------------------------------------------------
 	if(PlayerInfo[playerid][pZatvor] == 0 && WARPInfo[playerid][war_ID] == -1)
	{
 		BolnicaSpawn[playerid] = true;
	}
	// -------------------------------------------------------------------------
	if(IgracVuce[playerid] != -1)
	{
	    KillTimer(VuciTimer[IgracVuce[playerid]]);
	    KillTimer(VuciTimer[playerid]);
		if(StavljeneLisice[IgracVuce[playerid]] != 0)
		{
			StavljeneLisice[IgracVuce[playerid]] = 0; IgracTazovan[IgracVuce[playerid]] = 0; F_TogglePlayerControllable(IgracVuce[playerid], 1);
	    	ac_SetPlayerSpecialAction(IgracVuce[playerid], SPECIAL_ACTION_NONE); RPAO(IgracVuce[playerid], LISICE_SLOT);
		}
		VuceIgraca[IgracVuce[playerid]] = -1;
		IgracVuce[playerid] = -1;
	}
	// -------------------------------------------------------------------------
	if(VuceIgraca[playerid] != -1)
	{
		KillTimer(VuciTimer[VuceIgraca[playerid]]);
		KillTimer(VuciTimer[playerid]);
		IgracVuce[VuceIgraca[playerid]] = -1;
		VuceIgraca[VuceIgraca[playerid]] = -1;
		VuceIgraca[playerid] = -1;
	}
	// -------------------------------------------------------------------------
	if(Telefon_RazgovaraSa[playerid] != -1)
	{
        if(Telefon_PozivZa[playerid] != -1)
        {
            PlayerInfo[playerid][pTelefon_Kredit] -= Telefon_Razgovor_Vreme[playerid];
		}
        if(Telefon_PozivZa[Telefon_RazgovaraSa[playerid]] != -1)
        {
            if(PlayerInfo[playerid][pTelefon_Kartica] == PlayerInfo[Telefon_RazgovaraSa[playerid]][pTelefon_Kartica]) //PROVJERA MREZE
            {
            	PlayerInfo[Telefon_RazgovaraSa[playerid]][pTelefon_Kredit] -= Telefon_Razgovor_Vreme[Telefon_RazgovaraSa[playerid]]/2;
            	new k_string[80];
				format(k_string, sizeof(k_string), "~r~-%s$~n~ ~w~kredita", KonvertBroj(Telefon_Razgovor_Vreme[Telefon_RazgovaraSa[playerid]]/2));
				GameTextForPlayer(playerid, k_string, 5000, 1);
			}
			else
			{
            	PlayerInfo[Telefon_RazgovaraSa[playerid]][pTelefon_Kredit] -= Telefon_Razgovor_Vreme[Telefon_RazgovaraSa[playerid]];
            	new k_string[80];
				format(k_string, sizeof(k_string), "~r~-%s$~n~ ~w~kredita", KonvertBroj(Telefon_Razgovor_Vreme[Telefon_RazgovaraSa[playerid]]));
				GameTextForPlayer(playerid, k_string, 5000, 1);
			}
		}
        SCM(Telefon_RazgovaraSa[playerid], -1, ""SIVA"[Mobilni]: "BIJELA"Veza je prekinuta!");
        ac_SetPlayerSpecialAction(Telefon_RazgovaraSa[playerid], SPECIAL_ACTION_STOPUSECELLPHONE);
        RPAO(Telefon_RazgovaraSa[playerid], TELEFON_SLOT);
        Telefon_ZoveGa[Telefon_RazgovaraSa[playerid]] = -1;
        Telefon_PozivZa[Telefon_RazgovaraSa[playerid]] = -1;
        Telefon_RazgovaraSa[Telefon_RazgovaraSa[playerid]] = -1;
        Telefon_ZoveGa[playerid] = -1;
        Telefon_PozivZa[playerid] = -1;
        Telefon_RazgovaraSa[playerid] = -1;
        ac_SetPlayerSpecialAction(playerid, SPECIAL_ACTION_STOPUSECELLPHONE);
        RPAO(playerid, TELEFON_SLOT);
	}
	// -------------------------------------------------------------------------
	if(Igrac_Oboren[playerid] != -1 || Igrac_Zavezan[playerid] != -1 || Igrac_Povez[playerid] != -1)
	{
		Igrac_Oboren[playerid] = -1;
		Igrac_Zavezan[playerid] = -1;
		Igrac_Povez[playerid] = -1;
		PlayerTextDrawHide(playerid, Povez_PTD[playerid]);
		KillTimer(Odvezi_Timer[playerid]);
		F_NovacMinus(playerid, 1000);
		SCM(playerid, -1, "*** "CRVENA"Umrli ste dok ste oboreni / zavezani ili imate povez, oduzeto Vam je 1.000$!");
	}
	// -------------------------------------------------------------------------
	if(StavljeneLisice[playerid] == 1)
	{
		StavljeneLisice[playerid] = 0; KillTimer(LisiceTimer[playerid]);
		F_NovacMinus(playerid, 1000);
		SCM(playerid, -1, "*** "CRVENA"Umrli ste dok imate lisice, oduzeto Vam je 1.500$!");
	}
	// -------------------------------------------------------------------------
	if(Bere_Kokain[playerid] == 1)
	{
		for(new kokain_id = 0; kokain_id < 84; kokain_id++)
		{
			if(IsValidPlayerObject(playerid, Kokain_Objekti[playerid][kokain_id])) DestroyPlayerObject(playerid, Kokain_Objekti[playerid][kokain_id]);
			Kokain_Objekti[playerid][kokain_id] = -1;
		}
		Bere_Kokain[playerid] = 0; Pokosio_Kokain[playerid] = 0;
	}
	// -------------------------------------------------------------------------
	if(Radi_Frezanje[playerid] == 1)
	{
		for(new zemlja_id = 0; zemlja_id < 72; zemlja_id ++)
		{
			if(IsValidPlayerObject(playerid, Frezanje_Objekti[playerid][zemlja_id])) DestroyPlayerObject(playerid, Frezanje_Objekti[playerid][zemlja_id]);
			Frezanje_Objekti[playerid][zemlja_id] = -1;
		}
		UcitajFarmerFrezanjeObjekte(playerid);
		Radi_Frezanje[playerid] = 0; Izfrezao[playerid] = 0; Posao_CP[playerid] = 0;
	}
	// -------------------------------------------------------------------------
    if(Radi_Zetvu[playerid] == 1)
    {
        for(new psenica_id = 0; psenica_id < 50; psenica_id ++)
		{
			if(IsValidPlayerObject(playerid, Psenica_Objekti[playerid][psenica_id])) DestroyPlayerObject(playerid, Psenica_Objekti[playerid][psenica_id]);
			Psenica_Objekti[playerid][psenica_id] = -1;
		}
		Radi_Zetvu[playerid] = 0; Zetva_Broj[playerid] = 0;
		DisablePlayerCheckpoint(playerid);
	}
	// -------------------------------------------------------------------------
	if(PlayerInfo[playerid][pPosao] == POSAO_FARMER)
	{
	    if(Posao_CP[playerid] >= 1)
	    {
			for(new sijeno_id = 0; sijeno_id < 5; sijeno_id ++)
			{
				if(IsValidPlayerObject(playerid, Sijeno_Objekti[playerid][sijeno_id])) DestroyPlayerObject(playerid, Sijeno_Objekti[playerid][sijeno_id]);
				if(IsValidObject(Sijeno_Objekti[playerid][sijeno_id])) DestroyObject(Sijeno_Objekti[playerid][sijeno_id]);
				Sijeno_Objekti[playerid][sijeno_id] = -1;
			}
			Posao_CP[playerid] = 0;
			DisablePlayerCheckpoint(playerid);
		}
	}
	// -------------------------------------------------------------------------
	if(Obijanje_Vozila[playerid] != -1)
	{
		Obijanje_Vozila[playerid] = -1;
		KillTimer(Obijanje_Timer[playerid]);
	}
	// -------------------------------------------------------------------------
	if(LovZapocet[playerid] == true)
	{
	    KillTimer(Lov_Timer[playerid]); KillTimer(Lov_Timer2[playerid]); UnistiLovacTD(playerid);
	   	Lovac_Random_Srna[playerid] = -1;
		Pogodio_Srnu[playerid] = -1;
		Uzeo_Srnu[playerid] = -1;
		LovacVoziloStart[playerid] = -1;
		Stavio_Srnu[playerid] = -1;
		Posao_CP[playerid] = 0;
        if(IsPlayerAttachedObjectSlotUsed(playerid, KUTIJA_HEROIN)) RPAO(playerid, KUTIJA_HEROIN);
        if(IsValidPlayerObject(playerid, Lov_Objekat_Srne[playerid])) DestroyPlayerObject(playerid, Lov_Objekat_Srne[playerid]);
        if(IsValidPlayerObject(playerid, Lov_Objekat_Srne[playerid])) DestroyPlayerObject(playerid, Lov_Objekat_Krvi[playerid]);
	    if(IsValidObject(Lov_Objekat_Srne[playerid])) DestroyObject(Lov_Objekat_Srne[playerid]);
	    if(IsValidObject(Lov_Objekat_Krvi[playerid])) DestroyObject(Lov_Objekat_Krvi[playerid]);
	    Lov_Objekat_Srne[playerid] = -1;
	    Lov_Objekat_Krvi[playerid] = -1;
	    Ostala_Lociranja[playerid] = 0;
	    LovZapocet[playerid] = false;
	}
	// -------------------------------------------------------------------------
	if(PljackaBanku[playerid] == 1)
	{
		KillTimer(OtvoriSefTimer[playerid]); PljackaBanku[playerid] = 0; PljackaBankuVreme[playerid] = 0;
		SCMTA(-1, ""PLJACKA_COL"___________________ "BIJELA"V A N R E D N E   V I J E S T I "PLJACKA_COL"____________________");
		SCMTA(-1, ""BIJELA"PLJACKA BANKE JE SPRIJECENA TAKO STO JE PLJACKAS SMRTNO STRADAO !!!");
		SCMTA(-1, ""PLJACKA_COL"___________________________________________________________________");
		Greska(playerid, "Pljacka banke je prekinuta zato sto ste ubijeni / umrli!");
		OrgInfo[1][oSefNovac] += E_SPRIJECENROB_SEF; OrgInfo[2][oSefNovac] += E_SPRIJECENROB_SEF;
		SacuvajOrganizaciju(1); SacuvajOrganizaciju(2);
		new p_string[256];
		format(p_string, sizeof(p_string), "[SEF]: Dodato je %s$ u sef radi sprecavanja pljacke!", E_SPRIJECENROB_SEF);
		KeroviPoruka(X_SLAVNABOJA, p_string);
	}
	// -------------------------------------------------------------------------
	if(PljackaGaleriju[playerid] == 1)
	{
		KillTimer(GalerijaTimer[playerid]); PljackaGaleriju[playerid] = 0; PljackaGalerijuVreme[playerid] = 0;
		SCMTA(-1, ""PLJACKA_COL"___________________ "BIJELA"V A N R E D N E   V I J E S T I "PLJACKA_COL"____________________");
		SCMTA(-1, ""BIJELA"PLJACKA GALERIJE JE SPRIJECENA TAKO STO JE PLJACKAS SMRTNO STRADAO !!!");
		SCMTA(-1, ""PLJACKA_COL"___________________________________________________________________");
		Greska(playerid, "Pljacka banke je prekinuta zato sto ste ubijeni / umrli!");
		OrgInfo[1][oSefNovac] += E_SPRIJECENROB_SEF; OrgInfo[2][oSefNovac] += E_SPRIJECENROB_SEF;
		SacuvajOrganizaciju(1); SacuvajOrganizaciju(2);
		new p_string[256];
		format(p_string, sizeof(p_string), "[SEF]: Dodato je %s$ u sef radi sprecavanja pljacke!", E_SPRIJECENROB_SEF);
		KeroviPoruka(X_SLAVNABOJA, p_string);
	}
	// -------------------------------------------------------------------------
	if(Zlatara_Pljacka[playerid] == 1)
	{
		KillTimer(Zlatara_Timer[playerid]); Zlatara_Pljacka[playerid] = 0; Zlatara_Vreme[playerid] = 0;
		SCMTA(-1, ""PLJACKA_COL"___________________ "BIJELA"V A N R E D N E   V I J E S T I "PLJACKA_COL"____________________");
		SCMTA(-1, ""BIJELA"PLJACKA ZLATARE JE SPRIJECENA TAKO STO JE PLJACKAS SMRTNO STRADAO !!!");
		SCMTA(-1, ""PLJACKA_COL"___________________________________________________________________");
		Greska(playerid, "Pljacka zlatare je prekinuta zato sto ste ubijeni / umrli!");
		OrgInfo[1][oSefNovac] += E_SPRIJECENROB_SEF; OrgInfo[2][oSefNovac] += E_SPRIJECENROB_SEF;
		SacuvajOrganizaciju(1); SacuvajOrganizaciju(2);
		new p_string[256];
		format(p_string, sizeof(p_string), "[SEF]: Dodato je %s$ u sef radi sprecavanja pljacke!", E_SPRIJECENROB_SEF);
		KeroviPoruka(X_SLAVNABOJA, p_string);
	}
	// -------------------------------------------------------------------------
	if(Pljacka_Bankomat[playerid] == true)
	{
		KillTimer(Bankomat_Timer[playerid]); Pljacka_Bankomat[playerid] = false;
		Bankomat_Vreme[playerid] = 0; Bankomat_ID[playerid] = -1;
		Greska(playerid, "Pljacka bankomata je prekinuta zato sto ste ubijeni / umrli!");
	}
	// -------------------------------------------------------------------------
	if(GledaKatalog[playerid] != -1)
	{
		PrikaziInGameTD(playerid);
	}
	// -------------------------------------------------------------------------
 	if(Ima_Kockica_TD[playerid] == 1)
 	{
        UnistiKockicaTD(playerid);
	}
 	// -------------------------------------------------------------------------
 	if(Igra_IksOks[playerid] != 0)
 	{
 	    F_SCMF(IksOks_Protivnik[playerid], -1, ""CRVENA"(INFO): "BIJELA"Igrac %s, je umro te je igra 'IksOks' prekinuta!", GetName(IksOks_Protivnik[playerid]));
 		UnistiIksOksTD(IksOks_Protivnik[playerid]); UnistiIksOksTD(playerid);
 	}
 	// -------------------------------------------------------------------------
 	if(Ima_Vozilo_TD[playerid] == 1)
 	{
        UnistiVoziloTD(playerid);
	}
	// -------------------------------------------------------------------------
	if(Krenuo_Pljacku[playerid] == true)
	{
		Kuca_Pass[playerid] = -1;
		Krenuo_Pljacku[playerid] = false;
		KillTimer(Pljacka_KuceT[playerid]);
	}
	// -------------------------------------------------------------------------
	if(AC_Info[gAntiFakeKill] == 1)
	{
		if(killerid != IPI)
		{
			if(!FakeKill[playerid][killerid])
			{
			    new string[156];
				format(string, sizeof(string),""KICKBOJA"[AC KICK]: "BIJELA"Igrac %s je kikovan sa servera zbog moguceg koristenja FAKE KILL-a!", GetName(playerid));
				F_SCMTA(-1, string);
				SCM(playerid, -1, ""IGBOJA"(ANTICHEAT): "BIJELA"Kikovani ste sa servera zbog koristenja FAKE KILL-a!");
				UsaoVozilo[playerid] = -1;
				F_Kick(playerid);
			}
		}
		foreach(new u : Player) FakeKill[playerid][u] = false;
	}
	// -------------------------------------------------------------------------
	if(AC_Info[gDriveBy] == 1)
	{
		if(killerid != IPI && GetPlayerState(killerid) == PSD)
		{
		    if(VoziloJeHelic(GetVehicleModel(GetPlayerVehicleID(killerid))))
		    {
		    	new string[256];
				format(string, sizeof(string), "~r~AC: ~w~%s(%d) je ubio %s(%d) sa elisom helikoptera", GetName(killerid), killerid, GetName(playerid), playerid);
				AltChat_Poruka(string);
		    }
		    else
		    {
		    	new string[256];
				format(string, sizeof(string), "~r~AC: ~w~%s(%d) je uradio DB nad %s(%d)", GetName(killerid), killerid, GetName(playerid), playerid);
				AltChat_Poruka(string);
			}
		}
	}
	// -------------------------------------------------------------------------
/*	if(IsPlayerConnected(killerid) && PlayerInfo[playerid][pLevel] >= 1 && WARPInfo[playerid][war_ID] == -1)
	{
	    DeathChat_Poruka(killerid, playerid, reason);
	    //new string[256];
		//format(string, sizeof(string), ""CRVENA"[Ubistvo]: "BIJELA"Igrac %s(ID:%d) je ubio igraca %s(ID:%d)!", GetName(killerid), killerid, GetName(playerid), playerid);
		//SpecPoruka(-1, string);
		//format(string, sizeof(string), "~r~AC: ~w~%s(%d) je ubio %s(%d)", GetName(killerid), killerid, GetName(playerid), playerid);
		//AltChat_Poruka(string);
	}*/
	// -------------------------------------------------------------------------
	if(Wanted_Level[playerid] > 0 && WARPInfo[playerid][war_ID] == -1)
	{
	    new string[156];
		F_NovacMinus(playerid, Wanted_Level[playerid]*150);
		format(string, sizeof(string), "* "CRVENA"Izgubili ste %s$ novca zbog umiranja sa Wanted level-om '%d'!", KonvertBroj(Wanted_Level[playerid]*150), Wanted_Level[playerid]);
		SCM(playerid, -1, string);
		Wanted_Level[playerid] = 0; F_SetPlayerWantedLevel(playerid, Wanted_Level[playerid]); OcistiZlocin(playerid); BojaIgraca(playerid);
    }
    // -------------------------------------------------------------------------
    if(Leti[playerid] == 1)
    {
		Leti[playerid] = 0;
		DozvoljenSpeedHack[playerid] = 0;
	}
	// ------------------------ SVI EVENTI - UMIRANJE --------------------------
	if(IgracNaEventu[playerid] == 1)
	{
	    if(PokrenutEvent != 3)
	    {
        	IgracNaEventu[playerid] = 0;
        	if(EventVozilo[playerid] != -1) { F_DestroyVehicle(EventVozilo[playerid]); EventVozilo[playerid] = -1; }
			DisablePlayerRaceCheckpoint(playerid);
			DisablePlayerCheckpoint(playerid);
        	SCM(playerid, -1, "{F23A0D}EVENT: {FFFFFF}Vi ste umri, sto znaci da je za Vas trenutni Event zavrsen!");
        	if(PokrenutEvent == 2) { Derby_Cheetah_Igraca --; }
        	if(PokrenutEvent == 4) { Derby_Quad_Igraca --; }
        	if(PokrenutEvent == 5) { ParkurIgraca --; }
        }
	}
	// -------------------------------------------------------------------------
	if(NaftaCP[playerid] != 0)
	{
        IstovaraGorivo[playerid] = 0;
        NatocioGorivo[playerid] = 0;
        NaftaCP[playerid] = 0;
		NaftaNazad[playerid] = 0;
		NaftaKupilaPumpa[playerid] = 0;
		TociGorivo[playerid] = 0;
		DisablePlayerCheckpoint(playerid);
        KillTimer(IstovarGoriva[playerid]);
	}
	// -------------------------------------------------------------------------
	if(LovZapocet[playerid] == false && GetPlayerVirtualWorld(playerid) == 0 && WARPInfo[playerid][war_ID] == -1)
	{
	    if(killerid != IPI)
	    {
	        if(playerid != IPI)
	        {
			    GetPlayerPos(playerid, X_C, Y_C, Z_C);
				if(GetPlayerWeapon(playerid) != 0 && !ClanPolicije(playerid))
				{
		    		Baceno_Oruzje(playerid, GetPlayerWeapon(playerid), GetPlayerAmmo(playerid), X_C+1.5, Y_C, Z_C, GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid));
				}
				if(PlayerInfo[playerid][pZatvor] == 0 && !ClanPolicije(playerid) && PlayerInfo[playerid][pAdmin] == 0 && PlayerInfo[playerid][pSpec_Admin] == 0 && PlayerInfo[playerid][pHelper] == 0)
            	{
			    	if(PlayerInfo[playerid][pNovac] > 4999 && PlayerInfo[playerid][pLevel] > 4)
			    	{
		    	    	new novac = PlayerInfo[playerid][pNovac]/100;
						F_NovacMinus(playerid, novac);
		    	    	Baceni_Novac(playerid, novac, X_C, Y_C, Z_C, GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid));
		    	    	F_SCMF(playerid, -1, "{F81414}[SMRT]: {FFFFFF}Ispalo Vam je %s$ na pod!", KonvertBroj(novac));
			    	}
				}
			}
		}
	}
	// -------------------------------------------------------------------------
 	if(PojasZavezan[playerid] == 1)
	{
		PojasZavezan[playerid] = 0; UpdateBrzinomjer(playerid, 2);
    }
    // -------------------------------------------------------------------------
	if(Zauzimanje_ID[playerid] != -1)
	{
		new T_ID = Zauzimanje_ID[playerid], t_string[300];
		ZoneStopFlashForAll(TeritorijeInfo[T_ID][t_ID]);
	    Zauzimanje_Time[playerid] = 0;
	    KillTimer(Zauzimanje_Timer[playerid]);
	    if(TeritorijeInfo[T_ID][t_Org_ID] != -1)
		{
			format(t_string, sizeof(t_string), ""ZUTA"[TERITORIJA]:  "BIJELA"Clan protivnicka banda/mafija '%s' koji je zauzimao je ubijen!", ImenaOrganizacija(PlayerInfo[playerid][pClan]));
	    	OrgPoruka(TeritorijeInfo[Zauzimanje_ID[playerid]][t_Org_ID], -1, t_string);
		}
		format(t_string, sizeof(t_string), ""ZUTA"[TERITORIJA]:  "BIJELA"Clan Vase organizacije %s je ubijen te je zauzimanje prekinuto!", GetName(playerid));
    	OrgPoruka(PlayerInfo[playerid][pClan], -1, t_string);
	    Zauzimanje_ID[playerid] = -1;
        if(Zauzimanje_CP[playerid] != 0)
        {
	    	Zauzimanje_CP[playerid] = 0;
	    	DisablePlayerCheckpoint(playerid);
		}
	}
	// -------------------------------------------------------------------------
	if(Uzeo_Tocak[playerid] == 1) Uzeo_Tocak[playerid] = 0;
	// -------------------------------------------------------------------------
	if(Zastitna_Kaciga[playerid] == true)
	{
        RPAO(playerid, NAGLAVI_SLOT);
        UnistiZastitnaKacigaTD(playerid);
        Zastitna_Kaciga[playerid] = false;
	}
	// -------------------------------------------------------------------------
	if(Kuca_Pljackas[playerid] != -1) Kuca_Pljackas[playerid] = -1;
   	Prvi_Spawn(playerid); AttachObjectObrisi(playerid);
    Koristi_Looping_Anim[playerid] = 0; Koristi_Play_Anim[playerid] = 0; Koristi_Back_Anim[playerid] = 0;
    F_ResetPlayerWeapons(playerid); UsaoVozilo[playerid] = -1; IgracSpawnovan[playerid] = 0;
    //ServerInfo[sUbistava] ++;
	ResetujVarijable(playerid);
   	return 1;
}

E ovako, prvo razlog zasto ti se to desava je zato sto pod OnPlayerDeath imas :

if(PlayerInfo[playerid][pZatvor] == 0 && WARPInfo[playerid][war_ID] == -1)
    {
        BolnicaSpawn[playerid] = true;
    }

Sto ce postaviti igracu BolnicaSpawn na true, zatim u callback-u za spawn imas :

else if(BolnicaSpawn[playerid] == true) //NAKON SMRTI
    {
        new rand_bolnica = random(sizeof(Bolnica_Krevet));
        F_SetPlayerPos(playerid, Bolnica_Krevet[rand_bolnica][0], Bolnica_Krevet[rand_bolnica][1], Bolnica_Krevet[rand_bolnica][2]);
        SetPlayerFacingAngle(playerid, Bolnica_Krevet[rand_bolnica][3]);
        ac_SetPlayerInterior(playerid, 50);
        SetPlayerVirtualWorld(playerid, 654);
        F_SetPlayerHealth(playerid, 99.0);
        F_TogglePlayerControllable(playerid, 1);
        BolnicaSpawn[playerid] = false;
        if(PlayerInfo[playerid][pVip] == 3) { F_SetPlayerArmour(playerid, 50.0); }
        if(PlayerInfo[playerid][pVip] == 4) { F_SetPlayerArmour(playerid, 99.0); }
        BolnicaVreme[playerid] = 1; SetTimerEx("Bolnica_Novac", 1000, false, "i", playerid);
        return 1;
    }

Sto ce odraditi ovo parce koda i nista ispod toga.

Brzo resenje problema bi bilo da stavis u OnPlayerDeath ako je igrac clan organizacije 1 da mu izbegne celu bolnicu, znaci da mu stavi BolnicaSpawn na false i pritom prebaci ovo spawnanje sto si okacio u prvom postu na pocetak callback-a ( posle else )

To bi izgledalo ovako :

if(PlayerInfo[playerid][pZatvor] == 0 && WARPInfo[playerid][war_ID] == -1) //ovo je iz OnPlayerDeath
    {
        if(PlayerInfo[playerid][pClan] == 1 || PlayerInfo[playerid][pLider] == 1) { BolnicaSpawn[playerid] = false; }
        else BolnicaSpawn[playerid] = true;
    }

Zatim u callbacku :

else //DODAVATI I U PRVI_SPAWN SETSPAWNINFO
    {

        if(PlayerInfo[playerid][pClan] == 1 &&    PlayerInfo[playerid][pLider] == 1 ) //DODAVATI I U PRVI_SPAWN SETSPAWNINFO
        {
            BolnicaSpawn[playerid] == false;

            Ucitavanje_NaSpawnu(playerid);
            F_SetPlayerPos(playerid, 315.1484,1824.9572,2241.5850);
            F_ResetPlayerWeapons(playerid);
            ac_SetPlayerInterior(playerid, 0);
            SetPlayerVirtualWorld(playerid, 0);
        }

        else if(PlayerInfo[playerid][pSpawn] == SPAWN_MARKET) //DODAVATI I U PRVI_SPAWN SETSPAWNINFO
        {
            new rand;
            #if SPOREDNI_SPAWNOVI == 1
            {
                rand = random(sizeof(RandomSpawnGradjanin));
            }
              #else
              {
                  rand = random(7);
            }
            #endif
            Ucitavanje_NaSpawnu(playerid);
            F_SetPlayerPos(playerid, RandomSpawnGradjanin[rand][0], RandomSpawnGradjanin[rand][1], RandomSpawnGradjanin[rand][2]);
            SetPlayerFacingAngle(playerid, RandomSpawnGradjanin[rand][3]);
            ac_SetPlayerInterior(playerid, 0);
            SetPlayerVirtualWorld(playerid, 0);
            if(PlayerInfo[playerid][pVip] == 3) { F_SetPlayerArmour(playerid, 50.0); }
            if(PlayerInfo[playerid][pVip] == 4) { F_SetPlayerArmour(playerid, 99.0); }
        }

Imas u samom callback-u jedno parce koda koje se apsolutno nikada nece odraditi :

else if(BolnicaSpawn[playerid] == true)
    {
        new rand_bolnica = random(sizeof(Bolnica_Krevet));
        new string[150], skinid = GetPlayerSkin(playerid);
        F_SetPlayerPos(playerid, Bolnica_Krevet[rand_bolnica][0], Bolnica_Krevet[rand_bolnica][1], Bolnica_Krevet[rand_bolnica][2]);
        SetPlayerFacingAngle(playerid, Bolnica_Krevet[rand_bolnica][3]);
        ac_SetPlayerInterior(playerid, 0);
        SetPlayerVirtualWorld(playerid, 0);
        LoopingAnim(playerid,"BEACH", "bather", 4.0, 1, 0, 0, 0, 0);
        SakrijInGameTD(playerid);
        KreirajBolnicaTD(playerid);
        format(string, sizeof(string), "HITNA POMOC");
          PlayerTextDrawSetString(playerid, Bolnica_PTD[playerid][1], string);
          PlayerTextDrawHide(playerid, Bolnica_PTD[playerid][7]);
        PlayerTextDrawSetPreviewModel(playerid, Bolnica_PTD[playerid][7], skinid);
        PlayerTextDrawShow(playerid, Bolnica_PTD[playerid][7]);
        format(string, sizeof(string), "U KOMI STE ...");
        PlayerTextDrawSetString(playerid, Bolnica_PTD[playerid][8], string);
        format(string, sizeof(string), "Vozilom hitne pomoci ste prevezeni u bolnicu~n~gde Vam se pruza lijecnicka pomoc");
        PlayerTextDrawSetString(playerid, Bolnica_PTD[playerid][9], string);
        format(string, sizeof(string), "Bicete izijeceni za    sekundi");
        PlayerTextDrawSetString(playerid, Bolnica_PTD[playerid][10], string);
        PlayerTextDrawSetString(playerid, Bolnica_PTD[playerid][11], "15"); //obicno
        BolnicaVreme[playerid] = 15+1;
        F_SetPlayerHealth(playerid, 99.0);
        return 1;
    }

Nalazi se iznad else

U prevodu, imas dva parceta gde je uslov da BolnicaSpawn bude na true, pritom uci ce u prvi blok, zato sto ispunjava uslov, ali vraca 1 na kraju samog bloka, tako da do donjeg nece nikada doci, pogledaj, vidi za sta ti se koristi xD

Ukoliko ne budes mogao da se snadjes, dodaj me na disc pa cu ti vrlo rado pomoci i objasniti : v01ddev