Jump to content

Iulian

Membru
  • Posts

    191
  • Joined

  • Last visited

Community Answers

  1. Iulian's post in Problema remorca was marked as the answer   
    [pawn] else if(CP[playerid] == 98) // trucker 2
    {
    new Float:X, Float:Y, Float:Z;
    GetPlayerPos(playerid, X, Y, Z);
    TrailerTruck[playerid] = AddStaticVehicleEx(591, X+2, Y+2, Z, 0.0, 183, 3,RESPAWN_TIME);
    SetTimerEx("AttachTrailer", 1000, false, "ii", TrailerTruck[playerid], idcar);
    CP[playerid] = 82;
    SetPlayerCheckpoint(playerid, 1087.6589,1235.6068,11.8269, 4.0);
    }
     
     
    forward AttachTrailer(trailer, car);
    public AttachTrailer(trailer, car)
    {
    AttachTrailerToVehicle(trailer, car);
    return 1;
    }[/pawn]
     
    Nu stiu sigur daca merge, doar presupun. Am mai avut probleme de genu si le-am rezolvat adaugand un timer. Astept un raspuns.
  2. Iulian's post in Problema tag "UPDATE" was marked as the answer   
    In primul rand query-ul este gresit.
     
    La replacement-uri, folosesti ' doar daca este un text, daca este o valoare de tip integer sau float nu mai pui ' inainte si dupa replacement.
     
    Exemplu:
     
    "UPDATE `tabel` SET `valoare1` = %d, `text` = '%s', `locatieX` = %f WHERE `id` = %d".
     
     
    In al doilea rand, iti recomand sa faci 2-3 query-uri astfel incat acestea sa nu fie prea mari. (separi acel query in 2-3)
  3. Iulian's post in Problema script. was marked as the answer   
    La OnGameModeExit, salveaza variabila specifica kilometrilor parcursi pentru fiecare vehicul, pune eventual si un printf ca sa vezi daca merge, astept un raspuns.
  4. Iulian's post in timer pentru /loadmission was marked as the answer   
    Iti recomand sa faci un timer de 5 minute spre exemplu. La timerele prea mari ai sanse mari sa se faca un bug (se rezolva cu un restart | iti spun asta din propia experienta).
     
     
    [pawn]
    SetTimer("Timer", timp , true); // 1secunda = 1000ms ' 5 minute = 300000ms;
     
    public Timer()
    {
            timer++;
            if(timer == 48) // 4 ore * 60 de minute = 240 | 240 : 5 minute = 48 - daca nu intelegi revin cu o explicatie mai detaliata)
            {
                  //FUNCTIA TA AICI
           }
           return 1;
    }
    [/pawn]
  5. Iulian's post in Spawn special pentru administratori [Problema] was marked as the answer   
    Poti incerca si asta:
     
    if(PlayerInfo[playerid][pAdmin])
    {
    SetPlayerPos(playerid, 1495.5715,-1768.7667,107.1565)
    return 1;
    }
     
    Daca variabila pAdmin este pozitiva, functia if va returna o valoarea true si functia se va executa. Daca valoarea este 0 se va returna false si functia nu se va executa.
     
    Ramane la alegerea ta pe care dintre ele vrei sa o folosesti. Iti recomand sa o folosesti pe cea de mai sus pentru ca poti customiza acel spawn, daca adminul are niveul X, sau Y, etc.
×
×
  • 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.