Jump to content

MoroJr

Membru
  • Posts

    37
  • Joined

  • Last visited

    Never

Posts posted by MoroJr

  1. Daca tu l-ai facut singur, si ti-ai folosit ideile, ai un 10 de la mine. Ceea ce ai facut tu aici:

            if(response) return SendClientMessage(playerid, COLOR_RED, "Foarte bine!");
            else SendClientMessage(playerid, COLOR_RED, "Nu? Scuze,ai luat kick din cauza ca nai vrut sa respecti regulile.");
            Kick( playerid );

    rezulta ca ai gandit-o logic, iar pt. un incepator, ai gandit-o foarte bine. Bravo

  2. am rezolvat problema....dar acm nu se deschide cand ajung la poarta nu se deschide decat dupa ce scriu /deschide si am eliminat acel if() cu /deschide:)
    Nu numai ca se deschide la comanda /deschide, ci si la toate 'comenzile' atat existente, cat si inexistente. Daca vrei sa se deschida atunci cand o tasta ( VK_SAMP_KEY_AVAIBLE ) este folosita, atunci bagi codul asta la OnPlayerKeyStateChange, si ii mai pui conditia asta: if(newkeys & (APASA AICI PENTRU ID-UL TASTEI)) Uite un exemplu:
        if(IsPlayerInRangeOfPoint(playerid, range , x , y , z ) && (newkeys & KEY_FIRE))
        {
         if(IsACop(playerid))
         {
            MoveObject(poartapd,1596.77136200,-1637.92077600,15.07157900, 5);
            SetTimerEx("GateClosse", 5000, 0, "", playerid); //5 secunde , nu se repeta, valoarea este integer pt playerid
            return 1;
          }
        }

    Iar acest lucru: SetTimerEx("GateClosse", 5000, 0, "", playerid); //5 secunde , nu se repeta, valoarea este integer pt playerid, este cea mai mare prostie pe care am auzit-o. De aceea, te-as ruga sa postezi antetul functiei GateClosse.

  3. Bravo, nu e rau. Dar fie vorba intre noi, sa zicem ca programul nu il am pe Desktop, cum e mai simplu:

    1. Sa intru prin C:\folder\apps etc.

    sau

    2. Sa dau colo jos langa ceas :>, pe Monitoarele alea 2 ( Local Area Connection ) si apoi sa apas acolo sus, Support :D ?

    Eu as alege 2.

  4. Care e problema ta?  >:( Crezi ca esti zeu?

    Esti putin nesimtit ...

    Acest ceas a fost creat 100% de catre JoeMan.   
    Am folosit un FS ajutator pentru a crea TextDraw-urile, 
    sper sa va placa si va cer din tot sufletul
    sa nu schimbati acest Credit!

    Adica tu nu dai creditile la creatorii functiilor, sau cel putin sa zici ca nu le-ai facut tu, dar tu le interzici celorlalti vizitatori, sa nu schimbe 'acest Credit' ?

  5. =-" post="48720" timestamp="1293011292"]

    Lol=)))

    Ce treaba are ordinea lor?:))

    ruben88, spune cate filterscripturi ai scrise in server.cfg , defapt numara-le si vezi ca trebuie sa ai maxim 16. Daca ai depasit acest numar, mai sterge din ele.

    Are o foarte mare importanta lor ... poti testa si tu

    De exemplu, daca ai 5 fs'uri, iar in fiecare fs ai comanda /admins, fara a returna 0, din fiecare fs va fi executat /admins ( doar daca fs'ul are la sfarsit de callback return 1; )

  6. Acest ceas a fost creat 100% de catre JoeMan.                     
    Am folosit un FS ajutator pentru a crea TextDraw-urile

    Cred ca ar fi cazul sa dai credite si pt. GetWeekdayNum, respectiv getrem ... pana o sa ajungi tu sa faci algoritmi din astia ... 8-|

  7. Vei avea nevoie de o functie::

    stock AOV()
    {
        new VCount;
        for(new i = 1; i < MAX_VEHICLES; i++) if(GetVehicleModel(i) != 0) VCount++;
        return VCount;
    }
    La ongamemodeinit, pe la sfarsit ( dupa adaugarea masinilor ), adauga codul asta:
        new Float:pos[3];
    
        new oras[3];
        new numar[3];
        new litere[4];
        new string[(sizeof(oras)+sizeof(numar)+sizeof(litere))];
        for(new i = 1, j = AOV( ); i <= j; i++)
        {
            GetVehiclePos(i, pos[0],pos[1],pos[2]);
            switch(random(3))
            {
                case 0b0:  oras = "LS";
                case 0b1:  oras = "SF";
                case 0b10: oras = "LV";
            }
            format(numar,sizeof(numar),"%d",(1 + random(99)));
            format(litere,sizeof(litere),"%c%c%c",(65 + random(0x1A)), ('A' + random(0b11010)), (0x42 + random(25)) );
            format(string,sizeof(string),"%s-%s-%s", oras, numar, litere);
            Create3DTextLabel(string, 0x586AE2AA, pos[0], pos[1], pos[2], 30.0, 0);
        }

  8. 1:Cum pot face la srv sa scrie al masini veh si cum scrie la /oldcar

    2:Vreau sa pot sa fac sa se vada objecturile de la distanata

    1. nu inteleg ce vrei ... reformuleaza

    2. daca zici ca "vrei sa se vada objecturile de la distanta", asta inseamna ca folosesti un streamer de obiecte ... care este acela ?

  9. Bine'nteles ca 127.0.0.1 nu este ip'ul tau REAL, este local host'ul. Cand un player isi deschide un server, si incerca sa se conecteze pe server'ul lui, automat, el va lua ip'ul local host ( 127.0.0.1 ), deoarece sunt mai multe 'cazuri' ... unul dintre ele ar fi dreptul de autor ( Administratorul ).

  10. Acest filterscript a fost postat si pe forumul principal, cred ca tot de adi ( aditzuu2001 aici, DjAdy pe forumul principal ), si am incercat putin sa'l ajut, pentru ca filterscript'ul de pe forumul principal ( http://forum.sa-mp.com/showthread.php?t=182018 ), nu prea zici ca e un Filterscript. Avea doar o insiruire de vreo 40 de comenzi, in care, la fiecare gaseai acelasi algoritm, aceleasi functii, doar cateva valori schimbate. De aceea, am incercat sa-l ajut, si sa fac o versiune mai buna ( http://forum.sa-mp.com/showthread.php?t=182018 ).

    I-am facut 3 versiuni:

    1. La fel ca filterscriptul lui, doar ca in loc de 900 de linii (~27kb), l-am facut de 100 linii (~4.5kb)

    2. La fel ca 1. , doar ca acesta mai contine:

        un textdraw, un array bidimensional pentru playeri ( pentru a pastra itemele )
        in sacul tau, poti avea maximum 25 de iteme ( const MAX_SLOT_ITEMS_PP )
        fiecare item poate avea maxim 5 'bucati' ( const MAX_AMOUNT_ITEM )
        cand cumperi un item, textdraw'ul va fi updatat playerului
    3. La fel ca 2. , doar ca acesta mai contine:
        daca ai un item in mana, si il folosesti ( apesi click 1 ), textdraw-ul pt player va fi updatat, o animatie va fi aplicata, iar indexul itemului va scadea
        daca ai avut 2 beri in mana, 2 tigari in bagaj, ai baut acele 2 beri, automat se va schimba pe tigari

    Inca o data:

    - acesta este filterscriptul original (cel al lui DjAdy aka aditzu2001 ): http://forum.sa-mp.com/showthread.php?t=182018

    - aici i-am raspuns eu cu 'noul' filterscript: http://forum.sa-mp.com/showpost.php?p=867837&postcount=5

    Aici link'urile de download:

    v.1: http://solidfiles.com/d/c556c/

    v.2: http://solidfiles.com/d/4f3d4/

    v.3: http://solidfiles.com/d/bb71/ ( recomandat )

       

  11. Daca tu nu esti in stare sa te uiti la niste numere oO ...

    	    new yesno;
    			if(points == 3) { if(WantedLevel[playerid] != 1) { WantedLevel[playerid] = 1; wlevel = 1; yesno = 1; } }
    			else if(points >= 4 && points <= 5) { if(WantedLevel[playerid] != 2) { WantedLevel[playerid] = 2; wlevel = 2; yesno = 1; } }
    			else if(points >= 6 && points <= 7) { if(WantedLevel[playerid] != 3) { WantedLevel[playerid] = 3; wlevel = 3; yesno = 1; } }
    			else if(points >= 8 && points <= 9) { if(WantedLevel[playerid] != 4) { WantedLevel[playerid] = 4; wlevel = 4; yesno = 1; } }
    			else if(points >= 10 && points <= 11) { if(WantedLevel[playerid] != 5) { WantedLevel[playerid] = 5; wlevel = 5; yesno = 1; } }
    			else if(points >= 12 && points <= 13) { if(WantedLevel[playerid] != 6) { WantedLevel[playerid] = 6; wlevel = 6; yesno = 1; } }
    			else if(points >= 14 && points <= 15) { if(WantedLevel[playerid] != 7) { WantedLevel[playerid] = 7; wlevel = 7; yesno = 1; } }
    			else if(points >= 16 && points <= 17) { if(WantedLevel[playerid] != 8) { WantedLevel[playerid] = 8; wlevel =8; yesno = 1; } }
    			else if(points >= 18 && points <= 19) { if(WantedLevel[playerid] != 9) { WantedLevel[playerid] = 9; wlevel = 9; yesno = 1; } }
    			else if(points >= 20) { if(WantedLevel[playerid] != 10) { WantedLevel[playerid] = 10; wlevel = 10; yesno = 1; } }
    			if(WantedLevel[playerid] >= 1) { if(gTeam[playerid] == 3) { gTeam[playerid] = 4; } }
    			if(yesno)

    2. Nu, timpul este egal ( 5 minute ) - uita'te la timer Production()

  12. in loc de: if (PlayerInfo[playerid][pFishSkill] == 785) pui asa:

    new str[MAX_PLAYER_NAME];
    GetPlayerName(playerid,str,sizeof(str));
    if(!strcmp(str,"KoBrA",false))
    ia, foloseste FS asta ... e putin mai optimizat:
    #include <a_samp>
    
    #define COLOR_YELLOW 0xFFFF00AA
    #define COLOR_BLUE 0x2641FEAA
    
    new casa;
    forward GateClose();
    
    public OnFilterScriptInit()
    {
    	casa = CreateObject(980, 1497.9704, -700.01293945313, 96.523391723633, 0, 0,   0);
        CreateObject(1239, 70.946022033691, -1523.2164306641, 4.0335631370544, 0, 0,   0);
        CreateObject(1872, 2484.0852050781, -1664.6156005859, 12.343752132345, 0, 0,   0);
        CreateObject(7505, 2470.2509765625, -1650.9846191406, 14.024735450745, 0, 0,   0);
        CreateObject(3749, 1497.7768554688, -698.67248535156, 99.608413696289, 0, 0,   0);
        CreateObject(3877, 1508.0806884766, -699.92834472656, 95.409622192383, 0, 0,   0);
        CreateObject(3877, 1487.1959228516, -700.11193847656, 95.415740966797, 0, 0,   0);
        CreateObject(3528, 1497.4173583984, -700.74462890625, 105.40616607666, 0, 0, 262);
    	CreateObject(9833, 1481.1741943359, -685.87902832031, 107.33651733398, 0, 0,   0);
        CreateObject(9833, 1512.4923095703, -685.88250732422, 107.16002655029, 0, 0,   0);
        return 1;
    }
    
    public OnFilterScriptExit()
    {
    	return 1;
    }
    
    public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
    {
    	static str[MAX_PLAYER_NAME];
    	GetPlayerName(playerid,str,sizeof(str));
        if(newkeys & KEY_FIRE)
    	{
           	if(IsPlayerInRangeOfPoint(playerid, 5.0, 1497.7893, -700.6332, 94.7500))
    		{
            	if(!strcmp(str,"KoBrA",false))
    			{
                	MoveObject(casa, 1497.9704589844, -700.01293945313, 90.773391723633, 5.5);
                    SetTimer("GateClose", 2000, 0);
                    SendClientMessage(playerid, COLOR_BLUE,"Ai deschis poarta.");
                    return 1;
                }
    		}
    	}
    	return 1;
    }
    
    public GateClose()
    {
        MoveObject(casa, 1497.9704589844, -700.01293945313, 96.523391723633, 2.5);
        return 1;
    }

    pastebin: http://pastebin.com/NnQGqafe

  13. Uita-te mai bine in filterscript, si observa ca pFishSkill, nu il folosesti nicaieri, doar il declari, de aici rezulta ca tot timpul, tabloul multidimensional pFishSkill, pt fiecare player o sa aiba valoarea 0 ... Daca, intr'adevar, vrei sa folosesti pFishSkill, atunci implementeaza acest FS in Gamemode.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.