Добро пожаловать на Pro Pawn - Портал о PAWN-скриптинге.

Реклама


**Как получить V.I.P** (Перейти)
Чтобы заказать рекламу на Pro-Pawn.Ru, обращайтесь в Skype.
Баннерная реклама 200руб/мес, Текстовая 100руб/мес.
Показано с 1 по 4 из 4
  1. #1
    Аватар для pastral
    Пользователь

    Статус
    Оффлайн
    Регистрация
    04.04.2015
    Сообщений
    10
    Репутация:
    2 ±

    Не спавнит в больницу после смерти

    После того как игрок погибает, его кидает на его спавн дом\квартира\база\бомжатни, вот код паблика:

    PHP код:
    public OnPlayerDeath(playeridkilleridreason)
    {
        
    PyxiTime[playerid] = 10;
        if(
    PlayerInfo[playerid][pJob]  ==2)
        {
            if(
    gcontract[playerid] == 1)
            {
                
    Delete3DTextLabel(Meh3d[GetPlayerVehicleID(playerid)]);
                
    gcontract[playerid] = 0;
            }
        }
        
    GetPlayerPos(playerid,DeathPos[0],DeathPos[1],DeathPos[2]);
        
    PlayerHealth[playerid] = 100;
        
    SetPlayerHealthAC(playeridPlayerHealth[playerid]);
        new 
    name[24];
        new 
    string[100];
        
    PlayerInfo[playerid][p HP] = 50;
        
    zips[playerid] = 0;
        
    mesh[playerid] = 999;
        
    usemesh[playerid] = 0;
        
    meshsf[playerid] = 999;
        
    usemeshsf[playerid] = 0;
        
    ebanksf[playerid] = 0;
        
    enterbiz[playerid] = 0;
        
    pizzacaca[playerid] = 0;
        
    udar[playerid] = 0;
        
    DropPlayerWeapons(playerid);
        
    Delgun(playerid);
        
    ResetPlayerWeapons(playerid);
        
    PlayerInfo[playerid][pSlot2] = 0;
        
    PlayerInfo[playerid][pSlot3] = 0;
        
    PlayerInfo[playerid][pSlot4] = 0;
        
    PlayerInfo[playerid][pSlot5] = 0;
        
    PlayerInfo[playerid][pSlot6] = 0;
        
    PlayerInfo[playerid][pSlot7] = 0;
        
    PlayerInfo[playerid][pSlot8] = 0;
        
    PlayerInfo[playerid][pSlot9] = 0;
        
    PlayerInfo[playerid][pSlot10] = 0;
        
    PlayerInfo[playerid][pSlot11] = 0;
        if(
    MehJob[playerid] ==0)
        {
            
    AvtoInfo[0][Rab] -=1;
            if( 
    AvtoInfo[0][Rab] <0)
            {
                
    AvtoInfo[0][Rab] = 0;
            }
        }
        if(
    MehJob[playerid] ==1)
        {
            
    AvtoInfo[1][Rab] -=1;
            if( 
    AvtoInfo[1][Rab] <0)
            {
                
    AvtoInfo[1][Rab] = 0;
            }
        }
        if(
    MehJob[playerid] ==2)
        {
            
    AvtoInfo[2][Rab] -=1;
            if( 
    AvtoInfo[2][Rab] <0)
            {
                
    AvtoInfo[2][Rab] = 0;
            }
        }
        
    MehJob[playerid] = 999;
        
    Playermoto[playerid] = 0;
        
    RemovePlayerAttachedObject(playerid,1);
        
    RemovePlayerAttachedObject(playerid,2);
        
    RemovePlayerAttachedObject(playerid,3);
        
    RemovePlayerAttachedObject(playerid,4);
        
    RemovePlayerAttachedObject(playerid,0);
        
    arenda[playerid] = 0;
        
    showhelp[playerid] = 0;
        
    usegruz[playerid] = 0;
        
    takephone[playerid] = 0;
        
    gag[playerid] = 0;
        
    prezerv[playerid] =0;
        
    paket[playerid] =0;
        
    balonchik[playerid] =0;
        
    afkto[playerid] = 0;
        
    usemats[playerid] = 0;
        
    zd[playerid] = 0;
        
    tex[playerid] = 0;
        
    tex2[playerid] = 0;
        if(
    SelectChar[playerid] == 255)
        {
            
    SetPlayerSkin(playeridOldSkin[playerid]);
            
    PlayerInfo[playerid][pChar] = OldSkin[playerid];
            
    SelectChar[playerid] = 0;
        }
        if(
    PlayerInfo[playerid][pJob] == 7)
        {
            
    PlayerInfo[playerid][pJob] = 0;
        }
        if(
    PlayerTied[playerid] == 1)
        {
            if(
    PlayerInfo[playerid][pMember] == 2)
            
    PlayerInfo[playerid][pGruznr] = 1;
        }
        
    //---------- Ãàíû
        
    new weaponid;
        new 
    gunname[25];
        
    GetWeaponName(weaponidgunnamesizeof(gunname));
        
    Delgun(playerid);
        
    //-----------
        
    PlayerEx[playerid][pSpawnEx] = false;
        
    PlayerInfo[playerid][pDrugtime] = 0;
        
    forma[playerid] = 0;
        
    proverkaforma[playerid] = 0;
        
    otell[playerid] = 0;
        
    otell2[playerid] = 0;
        
    otell3[playerid] = 0;
        
    otell4[playerid] = 0;
        
    otell5[playerid] = 0;
        
    otell6[playerid] = 0;
        
    otell7[playerid] = 0;
        
    otellowner[playerid] = 0;
        new 
    Float:px,Float:py,Float:pz;
        
    gPlayerSpawned[playerid] = 0;
        
    GetPlayerName(playeridnamesizeof(name));
        
    PlayerInfo[playerid][pLocal] = 255;
        
    GetPlayerPos(playeridpxpypz);
        
    DisablePlayerCheckpoint(playerid);
        
    keys[playerid] = 0;
        
    keysvip[playerid] = 0;
        
    armourset[playerid] = 0;
        
    graffity[playerid] = 0;
        
    graffity2[playerid] = 0;
        
    keysgruzair[playerid] = 0;
        
    keysair[playerid] = 0;
        
    otellvip[playerid] = 0;
        if(
    PlayerInfo[playerid][pMember] == 0//óáèéñòâî ïîëèöèè
        
    if(!IsACop(killerid) || !IsAArm(killerid))
        {
            {
                
    umer[playerid] = 1;
            }
            
    LiveOffer[playerid] = 999;
            
    TalkingLive[playerid] = 255;
            
    PlayerInfo[killerid][pZvezdi] = 0;
            
    WantedLevel[killerid] = 0;
            
    LiveOfferls[playerid] = 999;
            
    LiveOfferlv[playerid] = 999;
            
    TalkingLivels[playerid] = 255;
            
    TalkingLivelv[playerid] = 255;
            
    Tel[playerid] = 255;
            
    KillTimer(Timerkk[playerid]);
            
    CountOnZone[playerid] = 0;
            
    SendClientMessage(playeridCOLOR_LIGHTRED"Âû ïîãèáëè...");
        }
        
    PlayerInfo[playerid][pDeaths]+=1;
        
    PlayerInfo[killerid][pKills]+=1;
        if(
    PlayerInfo[playerid][pMember] == 4)
        {
            
    Medics -= 1;
        }
        if(
    WantedLevel[playerid] > 0)
        {
            if(
    IsACop(killerid))
            {
                
    PlayerInfo[playerid][pMestoJail] = 9;
                if(
    PlayerInfo[playerid][pZvezdi] == 1)
                {
                    
    Delgun(playerid);
                    
    ResetPlayerWeapons(playerid);
                    
    PlayerInfo[playerid][pJailed] = 1;
                    
    PlayerInfo[playerid][pJailTime] = 600;
                    
    PlayerInfo[playerid][pZvezdi] =0;
                    
    SetPlayerInterior(playerid0);
                    
    SetPlayerPos(playerid1774.2693,-1581.2787,1734.9430);
                    
    SendClientMessage(playerid,COLOR_LIGHTRED," Âû ïîñàæåíû â òþðüìó íà 600 ñåêóíä!");
                    
    SendClientMessage(killerid,0x6495EDFF," Âû ïîñàäèëè ïðåñòóïíèêà íà 600 ñåêóíä! Ïðåìèÿ: 100 âèðò.");
                    
    SendClientMessage(killerid,0xFFFFFF00FF," Âàøè ïðåìèàëüíûå 100 âèðò.");
                    
    GameTextForPlayer(playerid"~g~+ 100"10001);
                    
    PlayerInfo[killerid][pCash] += 100;
                    
    SpawnPlayer(playerid);
                }
                else if(
    PlayerInfo[playerid][pZvezdi] == 2)
                {
                    
    GiveMoney(killerid,0);
                    
    Delgun(playerid);
                    
    ResetPlayerWeapons(playerid);
                    
    PlayerInfo[playerid][pJailed] = 1;
                    
    PlayerInfo[playerid][pJailTime] = 1800;
                    
    SetPlayerInterior(playerid0);
                    
    SetPlayerPos(playerid264.6288,77.5742,1001.0391);
                    
    SendClientMessage(playerid,COLOR_LIGHTRED," Âû ïîñàæåíû â òþðüìó íà 1200 ñåêóíä!");
                    
    SendClientMessage(killerid,0x6495EDFF," Âû ïîñàäèëè ïðåñòóïíèêà íà 1200 ñåêóíä!");
                    
    SendClientMessage(killerid,0xFFFFFF00FF," Âàøè ïðåìèàëüíûå 200 âèðò.");
                    
    GameTextForPlayer(playerid"~g~+ 200"10001);
                    
    PlayerInfo[killerid][pCash] += 200;
                    
    SpawnPlayer(playerid);
                }
                else if(
    PlayerInfo[playerid][pZvezdi] == 3)
                {
                    
    GiveMoney(killerid,0);
                    
    Delgun(playerid);
                    
    ResetPlayerWeapons(playerid);
                    
    PlayerInfo[playerid][pJailed] = 1;
                    
    PlayerInfo[playerid][pJailTime] = 1800;
                    
    SetPlayerPos(playerid264.6288,77.5742,1001.0391);
                    
    SendClientMessage(playerid,COLOR_LIGHTRED," Âû ïîñàæåíû â òþðüìó íà 1800 ñåêóíä!");
                    
    SendClientMessage(killerid,0x6495EDFF," Âû ïîñàäèëè ïðåñòóïíèêà íà 1800 ñåêóíä!");
                    
    SendClientMessage(killerid,0xFFFFFF00FF," Âàøè ïðåìèàëüíûå 300 âèðò.");
                    
    GameTextForPlayer(playerid"~g~+ 300"10001);
                    
    PlayerInfo[killerid][pCash] += 300;
                    
    SpawnPlayer(playerid);
                }
                else if(
    PlayerInfo[playerid][pZvezdi] == 4)
                {
                    
    GiveMoney(killerid,0);
                    
    Delgun(playerid);
                    
    ResetPlayerWeapons(playerid);
                    
    PlayerInfo[playerid][pJailed] = 1;
                    
    PlayerInfo[playerid][pJailTime] = 2400;
                    
    SetPlayerInterior(playerid0);
                    
    SetPlayerPos(playerid1774.2693,-1581.2787,1734.9430);
                    
    SendClientMessage(playerid,COLOR_LIGHTRED," Âû ïîñàæåíû â òþðüìó íà 2400 ñåêóíä!");
                    
    SendClientMessage(killerid,0x6495EDFF," Âû ïîñàäèëè ïðåñòóïíèêà íà 2400 ñåêóíä!");
                    
    SendClientMessage(killerid,0xFFFFFF00FF," Âàøè ïðåìèàëüíûå 400 âèðò.");
                    
    GameTextForPlayer(playerid"~g~+ 400"10001);
                    
    PlayerInfo[killerid][pCash] += 400;
                    
    SpawnPlayer(playerid);
                }
                else if(
    PlayerInfo[playerid][pZvezdi] == 5)
                {
                    
    GiveMoney(killerid,0);
                    
    Delgun(playerid);
                    
    ResetPlayerWeapons(playerid);
                    
    PlayerInfo[playerid][pJailed] = 1;
                    
    PlayerInfo[playerid][pJailTime] = 3000;
                    
    SetPlayerInterior(playerid0);
                    
    SetPlayerPos(playerid1765.7677,-1580.8068,1734.9430);
                    
    SendClientMessage(playerid,COLOR_LIGHTRED," Âû ïîñàæåíû â òþðüìó íà 3000 ñåêóíä!");
                    
    SendClientMessage(killerid,0x6495EDFF," Âû ïîñàäèëè ïðåñòóïíèêà íà 3000 ñåêóíä!");
                    
    SendClientMessage(killerid,0xFFFFFF00FF," Âàøè ïðåìèàëüíûå 500 âèðò.");
                    
    GameTextForPlayer(playerid"~g~+ 500"10001);
                    
    PlayerInfo[killerid][pCash] += 500;
                    
    SpawnPlayer(playerid);
                }
                else if(
    PlayerInfo[playerid][pZvezdi] >= 6)
                {
                    
    GiveMoney(killerid,0);
                    
    Delgun(playerid);
                    
    ResetPlayerWeapons(playerid);
                    
    PlayerInfo[playerid][pJailed] = 1;
                    
    PlayerInfo[playerid][pJailTime] = 3600;
                    
    SetPlayerInterior(playerid0);
                    
    SetPlayerPos(playerid1770.3268,-1564.3756,1734.9430);
                    
    SendClientMessage(playerid,COLOR_LIGHTRED," Âû ïîñàæåíû â òþðüìó íà 3600 ñåêóíä!");
                    
    SendClientMessage(killerid,0x6495EDFF," Âû ïîñàäèëè ïðåñòóïíèêà íà 3600 ñåêóíä!");
                    
    SendClientMessage(killerid,0xFFFFFF00FF," Âàøè ïðåìèàëüíûå 600 âèðò.");
                    
    GameTextForPlayer(playerid"~g~+ 600"10001);
                    
    PlayerInfo[killerid][pCash] += 600;
                    
    SpawnPlayer(playerid);
                }
            }
            
    PlayerInfo[playerid][pZvezdi] = 0;
        }
        
    //----------------------------------[ Íàâûêè ] -----------------------------------------------------------------------
        /*if(reason == 24)
        {
            PlayerInfo[killerid][pDesert] += 2; SetPlayerSkills(killerid);
        }
        if(reason == 29)
        { PlayerInfo[killerid][pSmg] += 2; SetPlayerSkills(killerid); }

        if(reason == 30) { PlayerInfo[killerid][pAk] += 2; SetPlayerSkills(killerid); }

        if(reason == 31) { PlayerInfo[killerid][pM4] += 2; SetPlayerSkills(killerid); }
        if(reason == 25) { PlayerInfo[killerid][pShot] += 2; SetPlayerSkills(killerid); }
        if(reason == 23) { PlayerInfo[killerid][pSdpistol] += 2; SetPlayerSkills(killerid); }
        if(PlayerInfo[killerid][pDesert] == 200)
        {
            SetPlayerSkillLevel(killerid,WEAPONSKILL_DESERT_EAGLE,1000);
            SendClientMessage(killerid,0xFFFFFF,"Òâîé Skill äèãëà ïðîêà÷åí äî ìàêñèìàëüíîãî");
        }
        if(PlayerInfo[killerid][pSmg] == 200)
        {
            SetPlayerSkillLevel(killerid,WEAPONSKILL_MP5,1000);
            SendClientMessage(killerid,0xFFFFFF,"Òâîé Skill smg ïðîêà÷åí äî ìàêñèìàëüíîãî");
        }
        if(PlayerInfo[killerid][pAk] == 200)
        {
            SetPlayerSkillLevel(killerid,WEAPONSKILL_AK47,1000);
            SendClientMessage(killerid,0xFFFFFF,"Òâîé Skill Ak 47 ïðîêà÷åí äî ìàêñèìàëüíîãî");
        }
        if(PlayerInfo[killerid][pM4] == 200)
        {
            SetPlayerSkillLevel(killerid,WEAPONSKILL_M4,1000);
            SendClientMessage(killerid,0xFFFFFF,"Òâîé Skill M4 ïðîêà÷åí äî ìàêñèìàëüíîãî");
        }
        if(PlayerInfo[killerid][pShot] == 200)
        {
            SetPlayerSkillLevel(killerid,WEAPONSKILL_SHOTGUN,1000);
            SendClientMessage(killerid,0xFFFFFF,"Òâîé Skill Shotgun ïðîêà÷åí äî ìàêñèìàëüíîãî");
        }
        if(PlayerInfo[killerid][pSdpistol] == 200)
        {
            SetPlayerSkillLevel(killerid,WEAPONSKILL_PISTOL_SILENCED,1000);
            SendClientMessage(killerid,0xFFFFFF,"Òâîé Skill Sd pistol'a ïðîêà÷åí äî ìàêñèìàëüíîãî");
        }
        ////
        if(PlayerInfo[killerid][pDesert] >= 200)
        {
            SetPlayerSkillLevel(killerid,WEAPONSKILL_DESERT_EAGLE,1000);
        }
        if(PlayerInfo[killerid][pSmg] >= 200)
        {
            SetPlayerSkillLevel(killerid,WEAPONSKILL_MP5,1000);
        }
        if(PlayerInfo[killerid][pAk] >= 200)
        {
            SetPlayerSkillLevel(killerid,WEAPONSKILL_AK47,1000);
        }
        if(PlayerInfo[killerid][pM4] >= 200)
        {
            SetPlayerSkillLevel(killerid,WEAPONSKILL_M4,1000);
        }
        if(PlayerInfo[killerid][pShot] >= 200)
        {
            SetPlayerSkillLevel(killerid,WEAPONSKILL_SHOTGUN,1000);
        }
        if(PlayerInfo[killerid][pSdpistol] >= 200)
        {
            SetPlayerSkillLevel(killerid,WEAPONSKILL_PISTOL_SILENCED,1000);
        }*/
        //---------------------------------------------------------------------------------------------------------------------------------------------
        /*if (!IsAArm(killerid)|| !IsACop(killerid) || PlayerPaintballing[killerid] != 1)
        {
            if(PlayerInfo[killerid][pJailed] > 0 || !IsAArm(killerid)|| !IsACop(killerid) || PlayerPaintballing[killerid] != 1)
            {}
            else{
                SetPlayerCriminal(killerid,255, "Óáèéñòâî ÷åëîâåêà");
            }
        }*/
        
    if (!IsAArm(killerid)|| !IsACop(killerid) || PlayerPaintballing[killerid] != 1)
        {
                new 
    sendername[24];
                
    GetPlayerName(killeridsendernamesizeof(sendername));
                if(
    IsAGang(killerid) == IsAGang(playerid) || ISAMAFIA(killerid) == ISAMAFIA(playerid)) return true;
                if(
    PlayerInfo[killerid][pZvezdi] <= 6)
                {
                    
    PlayerInfo[killerid][pZvezdi]++;
                       
    WantedLevel[killerid]++;
                       
    SendClientMessage(killeridCOLOR_LIGHTRED,"Âû ñîâåðøèëè ïðåñòóïëåíèå: [ Óáèéñòâî ÷åëîâåêà ]. Ñîîáùàåò: Íåèçâåñòíûé.");
                       
    SetPlayerWantedLevel(killeridPlayerInfo[killerid][pZvezdi]);
                    for(new 
    0MAX_PLAYERSi++)
                    {
                        if(
    PlayerInfo[i][pMember] == || PlayerInfo[i][pMember] == 10 || PlayerInfo[i][pMember] == || PlayerInfo[i][pMember] == 21)
                        {
                             
    format(string,sizeof(string),"Ðàöèÿ: Cîîáùàåò: Íåèçâåñòíûé. Ïðåñòóïëåíèå: [ Óáèéñòâî ÷åëîâåêà ]. Ïîäîçðåâàåìûé: %s",sendername);
                            
    SendClientMessage(i0xFFFF00FFstring);
                        }
                    }
                }
        }
        
    /*if (!IsAArm(killerid)|| !IsACop(killerid) || PlayerPaintballing[killerid] != 1)
        {
            if (PlayerInfo[killerid][pZvezdi] <= 2)
            {
                new sendername[24];
                GetPlayerName(killerid, sendername, sizeof(sendername));
                if(IsAGangg(killerid) == IsAGangg(playerid)) return true;
                if(ISAMAFIA(killerid) == ISAMAFIA(playerid)) return true;
                if (!IsAArm(killerid)|| !IsACop(killerid) || PlayerPaintballing[killerid] != 1 == PlayerInfo[playerid][pMember] == 2)
                {
                    return true;
                }
                PlayerInfo[killerid][pZvezdi] = 3;
                WantedLevel[killerid] = 3;
                PlayerInfo[playerid][pPrestup] += 1;
                PlayerInfo[playerid][pZakonp] += 1;
                 SendClientMessage(killerid, COLOR_LIGHTRED,"Âû ñîâåðøèëè ïðåñòóïëåíèå: [ Óáèéñòâî ÷åëîâåêà ]. Ñîîáùàåò: Íåèçâåñòíûé.");
                SendClientMessage(killerid, 0xFFFF00FF,"Âàø óðîâåíü ðîçûñêà: 3");
                SetPlayerWantedLevel(killerid, PlayerInfo[killerid][pZvezdi]);
                for(new i = 0; i < MAX_PLAYERS; i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        if(PlayerInfo[i][pMember] == 1 ||PlayerInfo[i][pLeader] == 1 || PlayerInfo[i][pMember] == 10 ||PlayerInfo[i][pLeader] == 10 || PlayerInfo[i][pMember] == 2 ||PlayerInfo[i][pLeader] == 2 || PlayerInfo[i][pMember] == 21 || PlayerInfo[i][pLeader] == 21)
                        {
                            SendClientMessage(i, 0xFFFF00FF, "Ðàöèÿ: Cîîáùàåò: Íåèçâåñòíûé. Ïðåñòóïëåíèå: [ Óáèéñòâî ÷åëîâåêà ]. Ïîäîçðåâàåìûé: Íåèçâåñòíûé.");
                        }
                    }
                }
            }
            else if (PlayerInfo[killerid][pZvezdi] == 3)
            {
                new sendername[24];
                GetPlayerName(killerid, sendername, sizeof(sendername));
                if(IsAGangg(killerid) == IsAGangg(playerid)) return true;
                if(ISAMAFIA(killerid) == ISAMAFIA(playerid)) return true;
                PlayerInfo[killerid][pZvezdi] = 4;
                WantedLevel[killerid] = 4;
                PlayerInfo[playerid][pPrestup] += 1;
                PlayerInfo[playerid][pZakonp] += 1;
                 SendClientMessage(killerid, COLOR_LIGHTRED,"Âû ñîâåðøèëè ïðåñòóïëåíèå: [ Óáèéñòâî ÷åëîâåêà ]. Ñîîáùàåò: Íåèçâåñòíûé.");
                SendClientMessage(killerid, 0xFFFF00FF,"Âàø óðîâåíü ðîçûñêà: 4");
                SetPlayerWantedLevel(killerid, PlayerInfo[killerid][pZvezdi]);
                for(new i = 0; i < MAX_PLAYERS; i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        if(PlayerInfo[i][pMember] == 1 ||PlayerInfo[i][pLeader] == 1 || PlayerInfo[i][pMember] == 10 ||PlayerInfo[i][pLeader] == 10 || PlayerInfo[i][pMember] == 2 ||PlayerInfo[i][pLeader] == 2 || PlayerInfo[i][pMember] == 21 || PlayerInfo[i][pLeader] == 21)
                        {
                            SendClientMessage(i, 0xFFFF00FF, "Ðàöèÿ: Cîîáùàåò: Íåèçâåñòíûé. Ïðåñòóïëåíèå: [ Óáèéñòâî ÷åëîâåêà ]. Ïîäîçðåâàåìûé: Íåèçâåñòíûé.");
                        }
                    }
                }
            }
            else if (PlayerInfo[killerid][pZvezdi] == 4)
            {
                new sendername[24];
                GetPlayerName(killerid, sendername, sizeof(sendername));
                if(IsAGangg(killerid) == IsAGangg(playerid)) return true;
                if(ISAMAFIA(killerid) == ISAMAFIA(playerid)) return true;
                PlayerInfo[killerid][pZvezdi] = 5;
                WantedLevel[killerid] = 5;
                PlayerInfo[playerid][pPrestup] += 1;
                PlayerInfo[playerid][pZakonp] += 1;
                 SendClientMessage(killerid, COLOR_LIGHTRED,"Âû ñîâåðøèëè ïðåñòóïëåíèå: [ Óáèéñòâî ÷åëîâåêà ]. Ñîîáùàåò: Íåèçâåñòíûé.");
                SendClientMessage(killerid, 0xFFFF00FF,"Âàø óðîâåíü ðîçûñêà: 5");
                SetPlayerWantedLevel(killerid, PlayerInfo[killerid][pZvezdi]);
                for(new i = 0; i < MAX_PLAYERS; i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        if(PlayerInfo[i][pMember] == 1 ||PlayerInfo[i][pLeader] == 1 || PlayerInfo[i][pMember] == 10 ||PlayerInfo[i][pLeader] == 10 || PlayerInfo[i][pMember] == 2 ||PlayerInfo[i][pLeader] == 2 || PlayerInfo[i][pMember] == 21 || PlayerInfo[i][pLeader] == 21)
                        {
                            SendClientMessage(i, 0xFFFF00FF, "Ðàöèÿ: Cîîáùàåò: Íåèçâåñòíûé. Ïðåñòóïëåíèå: [ Óáèéñòâî ÷åëîâåêà ]. Ïîäîçðåâàåìûé: Íåèçâåñòíûé.");
                        }
                    }
                }
            }
            else if (PlayerInfo[killerid][pZvezdi] == 5)
            {
                new sendername[24];
                GetPlayerName(killerid, sendername, sizeof(sendername));
                if(IsAGangg(killerid) == IsAGangg(playerid)) return true;
                if(ISAMAFIA(killerid) == ISAMAFIA(playerid)) return true;
                PlayerInfo[killerid][pZvezdi] = 6;
                WantedLevel[killerid] = 6;
                PlayerInfo[playerid][pPrestup] += 1;
                PlayerInfo[playerid][pZakonp] += 1;
                 SendClientMessage(killerid, COLOR_LIGHTRED,"Âû ñîâåðøèëè ïðåñòóïëåíèå: [ Óáèéñòâî ÷åëîâåêà ]. Ñîîáùàåò: Íåèçâåñòíûé.");
                SendClientMessage(killerid, 0xFFFF00FF,"Âàø óðîâåíü ðîçûñêà: 6");
                SetPlayerWantedLevel(killerid, PlayerInfo[killerid][pZvezdi]);
                for(new i = 0; i < MAX_PLAYERS; i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        if(PlayerInfo[i][pMember] == 1 ||PlayerInfo[i][pLeader] == 1 || PlayerInfo[i][pMember] == 10 ||PlayerInfo[i][pLeader] == 10 || PlayerInfo[i][pMember] == 2 ||PlayerInfo[i][pLeader] == 2 || PlayerInfo[i][pMember] == 21 || PlayerInfo[i][pLeader] == 21)
                        {
                            SendClientMessage(i, 0xFFFF00FF, "Ðàöèÿ: Cîîáùàåò: Íåèçâåñòíûé. Ïðåñòóïëåíèå: [ Óáèéñòâî ÷åëîâåêà ]. Ïîäîçðåâàåìûé: Íåèçâåñòíûé.");
                        }
                    }
                }
            }
            else if (PlayerInfo[killerid][pZvezdi] >= 6)
            {
                PlayerInfo[killerid][pZvezdi] = 6;
                if(IsAGangg(killerid) == IsAGangg(playerid)) return true;
                if(ISAMAFIA(killerid) == ISAMAFIA(playerid)) return true;
                WantedLevel[killerid] = 6;
                PlayerInfo[playerid][pPrestup] += 1;
                PlayerInfo[playerid][pZakonp] += 1;
                SetPlayerWantedLevel(killerid, PlayerInfo[killerid][pZvezdi]);
                for(new i = 0; i < MAX_PLAYERS; i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        if(PlayerInfo[i][pMember] == 1 ||PlayerInfo[i][pLeader] == 1 || PlayerInfo[i][pMember] == 10 ||PlayerInfo[i][pLeader] == 10 || PlayerInfo[i][pMember] == 2 ||PlayerInfo[i][pLeader] == 2 || PlayerInfo[i][pMember] == 21 || PlayerInfo[i][pLeader] == 21)
                        {
                            SendClientMessage(i, 0xFFFF00FF, "Ðàöèÿ: Cîîáùàåò: Íåèçâåñòíûé. Ïðåñòóïëåíèå: [ Óáèéñòâî ÷åëîâåêà ]. Ïîäîçðåâàåìûé: Íåèçâåñòíûé.");
                        }
                    }
                }
            }
        }*/
        
    if (gPlayerCheckpointStatus[playerid] > && gPlayerCheckpointStatus[playerid] < 11)
        {
            
    DisablePlayerCheckpoint(playerid);
            
    gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
        }
        new 
    caller Mobile[playerid];
        if(
    caller != 255)
        {
            if(
    caller 255)
            {
                
    SendClientMessage(caller,  COLOR_GRAD2"Ñâÿçü îáîðâàëàñü...");
                
    CellTime[caller] = 0;
                
    CellTime[playerid] = 0;
                
    Mobile[caller] = 255;
            }
            
    Mobile[playerid] = 255;
            
    CellTime[playerid] = 0;
        }
        if(
    PlayerPaintballing[playerid] != 0)
        {
            
    PlayerPaintballKills[killerid] ++;
            if(
    PlayerPaintballKills[killerid] > PaintballWinnerKills)
            {
                new 
    killer[24];
                
    PaintballWinner killerid;
                
    PaintballWinnerKills PlayerPaintballKills[killerid];
                
    GetPlayerName(killeridkillersizeof(killer));
                
    SetPlayerHealthAC(killerid100.0);
                for(new 
    0MAX_PLAYERSi++)
                {
                    if(
    IsPlayerConnected(i))
                    {
                        if(
    PlayerPaintballing[i] != 0)
                        {
                            
    format(stringsizeof(string), " %s âûèãðûâàåò ñ  %d óáèéñòâàìè.",killer,PaintballWinnerKills);
                            
    SendClientMessage(iCOLOR_YELLOWstring);
                            
    SetPlayerHealthAC(killerid100.0);
                        }
                    }
                }
            }
            return 
    true;
        }
        new 
    sendername[24];
        new 
    killer[24];
        
    GetPlayerName(playeridsendernamesizeof(sendername));
        
    GetPlayerName(killeridkillersizeof(killer));
        if(
    IsAGang(killerid))
        {
            if(
    PlayerInfo[playerid][pMember] == 19 )
            {
                for(new 
    =0;i<sizeof(GZInfo);i++)
                {
                    if(
    PlayerToKvadrat(playerid,GZInfo[i][gCoords][0], GZInfo[i][gCoords][1],GZInfo[i][gCoords][2],GZInfo[i][gCoords][3]))
                    {
                        
    forma[killerid] = 1;
                        
    PlayerInfo[playerid][pModel] =252;
                        
    SendClientMessage(playerid,  COLOR_YELLOW"Íîâóþ ôîðìó ìîæåòå êóïèòü â ìàãàçèíå");
                        
    ShowPlayerDialog(playerid,2324,DIALOG_STYLE_MSGBOX,"Âíèìàíèå!!!","{CB1A1A} Âû ïîòåðÿëè àðìåéñêóþ ôîðìó","Îê","");
                        
    SendClientMessage(killerid,  COLOR_YELLOW2"Âû cíÿëè ñ àðìåéöà ôîðìó, ââåäèòå /armforma, ÷òîáû ïåðåîäåòüñÿ");
                        
    PlayerInfo[killerid][pZakonp] -= 2;
                        
    PlayerInfo[killerid][pPrestup] += 1;
                        
    SpawnPlayer(playerid);
                        if(
    PlayerInfo[playerid][pMember] == 3)
                        {
                            
    forma[killerid] = 1;
                            
    PlayerInfo[playerid][pModel] =252;
                            
    SendClientMessage(playerid,  COLOR_YELLOW"Íîâóþ ôîðìó ìîæåòå êóïèòü â ìàãàçèíå");
                            
    ShowPlayerDialog(playerid,2324,DIALOG_STYLE_MSGBOX,"Âíèìàíèå!!!","{CB1A1A} Âû ïîòåðÿëè àðìåéñêóþ ôîðìó","Îê","");
                            
    SendClientMessage(killerid,  COLOR_YELLOW2"Âû cíÿëè ñ àðìåéöà ôîðìó, ââåäèòå /armforma, ÷òîáû ïåðåîäåòüñÿ");
                            
    PlayerInfo[killerid][pZakonp] -= 2;
                            
    PlayerInfo[killerid][pPrestup] += 1;
                            
    SendFamilyMessage(3,COLOR_YELLOW2string);
                        }
                    }
                }
            }
        }
        if(
    IsAGang(killerid))
        {
            if(
    IsACop(playerid))
            {
                for(new 
    =0;i<sizeof(GZInfo);i++)
                {
                    if(
    PlayerToKvadrat(playerid,GZInfo[i][gCoords][0], GZInfo[i][gCoords][1],GZInfo[i][gCoords][2],GZInfo[i][gCoords][3]))
                    {
                        
    PlayerInfo[killerid][pKeyss] += 1;
                        
    keys[killerid] += 1;
                        
    SendClientMessage(playerid,  COLOR_YELLOW"Âû ïîòåðÿëè êëþ÷è îò êàìåðû!");
                        
    SendClientMessage(killerid,  COLOR_YELLOW"Âû çàáðàëè ó ïîëèöåéñêîãî êëþ÷è îò êàìåðû!");
                        
    PlayerInfo[killerid][pZakonp] -= 2;
                        
    PlayerInfo[killerid][pPrestup] += 1;
                        
    GetPlayerName(playeridsendernamesizeof(sendername));
                        
    format(stringsizeof(string), "Ïîëèöåéñêèé %s ïîòåðÿë êëþ÷è îò êàìåðû"sendername);
                        
    SendFamilyMessage(1,COLOR_YELLOW2string);
                        
    SendFamilyMessage(10,COLOR_YELLOW2string);
                        
    SendFamilyMessage(21,COLOR_YELLOW2string);
                    }
                }
            }
        }
        if (
    gPlayerCheckpointStatus[playerid] > && gPlayerCheckpointStatus[playerid] < 11)
        {
            
    DisablePlayerCheckpoint(playerid);
            
    gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
        }
        
    DisablePlayerCheckpoint(playerid);
        return 
    true;

    PHP код:
    public OnPlayerSpawn(playerid)
    {
        
    StopAudioStreamForPlayer(playerid);
        
    AntiDeAMX();
        
    afk[playerid] = 0;
        
    SetPVarInt(playerid"NoAB"1);
        if(
    gPlayerLogged[playerid] == 0)
        {
            
    SendClientMessage(playeridCOLOR_WHITE"{FF3200} ! {FEFEFE} - Íåîáõîäèìî àâòîðèçîâàòüñÿ!");
            
    Kick(playerid);
            return 
    true;
        }
        if(
    PlayerInfo[playerid][pMember] > 0)
        {
            
    SetPlayerSkin(playeridPlayerInfo[playerid][pModel]);
        }
        if(
    PlayerInfo[playerid][pMember] <= 0)
        {
            
    SetPlayerSkin(playeridPlayerInfo[playerid][pChar]);
        }
        
    //SetPlayerSkills(playerid);
        
    SetPlayerSpawn(playerid);
        return 
    true;

    Может кто подскажет где подкрутить
    Последний раз редактировалось pastral; 06.04.2015 в 08:13.

  2. #2
    Аватар для bla
    Пользователь

    Статус
    Оффлайн
    Регистрация
    22.03.2015
    Сообщений
    13
    Репутация:
    2 ±
    Так спавн же происходит в OnPlayerSpawn.

  3. #3
    Аватар для pastral
    Пользователь

    Статус
    Оффлайн
    Регистрация
    04.04.2015
    Сообщений
    10
    Репутация:
    2 ±
    Цитата Сообщение от bla Посмотреть сообщение
    Так спавн же происходит в OnPlayerSpawn.
    Добавил

  4. #4
    Аватар для nonfaktor
    Пользователь

    Статус
    Оффлайн
    Регистрация
    07.03.2014
    Сообщений
    22
    Репутация:
    1 ±
    PHP код:
    SetPlayerSpawn(playerid); 
    Скинь сюда.
    Прежде чем сдаваться, вспомни ради чего ты все начинал.
    Может и не получится, но попробовать стоит всегда.

 

 

Информация о теме

Пользователи, просматривающие эту тему

Эту тему просматривают: 1 (пользователей: 0 , гостей: 1)

Ваши права

  • Вы не можете создавать новые темы
  • Вы не можете отвечать в темах
  • Вы не можете прикреплять вложения
  • Вы не можете редактировать свои сообщения
  •