Jump to content

hanako

Membru
  • Posts

    540
  • Joined

  • Last visited

  • Days Won

    20

Posts posted by hanako

  1. CMD:opencase(playerid, params[])

    {

    if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to log in first.");

    if(InOpenCase[playerid] != 0) return SendClientMessage(playerid, COLOR_ERROR, "(Error){FFFFFF} You already in opencase menu.");

    if(InBlackJackGame[playerid] == 1 || RouletteInGame[playerid] == 1 || joacapacanele[playerid] == 1 || GetPVarInt(playerid, "accs") == 1) return SendClientMessage(playerid, COLOR_ERROR, "(Error){FFFFFF} You are in another textdraw!");

    if(PlayerInfo[playerid][pCases] <= 0)

    {

    new string[128];

    SendClientMessage(playerid, -1,"You don't have any case, but you can get one:");

    SendClientMessage(playerid, -1,"- if you complet all your daily quests");

    format(string, sizeof(string), "- every 5 online hours(AFK) (left: %d paydays)", PlayerInfo[playerid][pNextCase]);

    SendClientMessage(playerid, -1, string);

    SendClientMessage(playerid, -1,"- if you are online at 20:30");

    return 1;

    }

    ShowCaseTds(playerid);

    SelectTextDraw(playerid, 0xFFFFFF);

    InOpenCase[playerid] = 1;

    TogglePlayerControllable(playerid, false);

    return 1;

    }

  2. salut guys

    am intampinat si eu o problema cu speedometer-ul asta (e un sistem de vehicule persoanele de la 0). 

    deci, sa va explic cum sta treaba

    daca intru intr-un vehicul personal prima oara, merge functioneaza tot etc

    insa daca intru in altul o ia razna

    aveti aici un video mai detaliat

    // functia pt + la odometer - fuel

    ptask FuelOdometerPlayerTask[1000](playerid)
    {
        if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
        {
            new vehicleid = GetPlayerVehicleID(playerid);
            if(!isBike(vehicleid) && VehicleEngine[vehicleid] == true)
            {
                new Float:fuel = 0.050;
                if(GetVehicleSpeed(playerid) >= 5)
                {
                    fuel = (GetVehicleSpeed(playerid) * 0.20) / 100;
                }

                VehicleFuel[vehicleid] -= fuel;
                if(vehicle_personal[vehicleid] > -1)
                {
                    new id = vehicle_personal[vehicleid];
                    CarInfo[id][cFuel] -= fuel;
                    CarInfo[id][cOdometer] += fuel;
                }
            }
        }
    }

    //

    speedometer:

    stock UpdateVehicleTextdraws(playerid) {
        new vehicleid = GetPlayerVehicleID(playerid);
        format(stringx, sizeof(stringx), "~g~%d", GetVehicleSpeed(playerid));
        PlayerTextDrawSetString(playerid, VehicleInfoTD[playerid][0], stringx);
        PlayerTextDrawSetString(playerid, VehicleInfoTD[playerid][1], "KM/H");

        format(stringx, sizeof(stringx), "Fuel: ~r~%i", VehicleFuel[vehicleid]);
        PlayerTextDrawSetString(playerid, VehicleInfoTD[playerid][2], stringx);

        format(stringx, sizeof(stringx), "%s", (VehicleLock[vehicleid]) ? ("~R~LOCKED") : ("~g~UNLOCKED"));
        PlayerTextDrawSetString(playerid, VehicleInfoTD[playerid][3], stringx);
        if(vehicle_personal[vehicleid] > -1) 
        {
            format(stringx, sizeof(stringx), "~g~%d", GetVehicleSpeed(playerid));
            PlayerTextDrawSetString(playerid, VehicleInfoTD[playerid][0], stringx);
            PlayerTextDrawSetString(playerid, VehicleInfoTD[playerid][1], "KM/H");

            format(stringx, sizeof(stringx), "Fuel: ~r~%i~n~Odometer: %.2f~n~", VehicleFuel[vehicleid], CarInfo[vehicleid][cOdometer]);
            PlayerTextDrawSetString(playerid, VehicleInfoTD[playerid][2], stringx);

            format(stringx, sizeof(stringx), "%s", (CarInfo[vehicleid][cLock]) ? ("~R~LOCKED") : ("~g~UNLOCKED"));
            PlayerTextDrawSetString(playerid, VehicleInfoTD[playerid][3], stringx);
           }
    }

  3. Acum 6 minute, Muresan David a spus:

    Nu prea stiu sa fac panel-uri compatibile cu GM-Urile :) nu-s chiar asa web developer sau ceva

    ar trebui sa fi interzis pe aceasta comunitate,

    in ciuda faptului ca va dau oamenii mura-n gura, va dau gamemode-uri de un edit, voi criticati. in regulament nu spune ca un gamemode trebuie sa aiba si panel,

    panel-ul il poti cumpara, personal il recomand pe @KeNNy

    • Thanks 1
  4. exact cum ai facut la onlogin acolo,

    faci un

    mysql_format(handle, query, "SELECT * FROM `masini_personale` WHERE `OwnerID` = '%d', PlayerInfo[playerid][pSQLID]);

    mysql_tquery(handle, query, "functia de la vehicule", "d", playerid);

     

    TIN SA MENTIONEZ CA 'masini_personale' IL FACI TU CA PE UN TABEL DE STOCARE A VEHICULELOR PERSONALE

    SI OWNERID MODIFICI CU CE AI TU

  5. YCMD:bonus(playerid, params[], help) {

        if(PlayerInfo[playerid][pLevel] == 1)

        {

               GivePlayerCash(playerid, 100000);

               PlayerInfo[playerid][pLevel] = 2;

            SCM(playerid, COLOR_JADE, "Ai primit 250.000$ si ai crescut cu un nivel pentru ca ai folosit comanda "/bonus"!");

        }

        return 1;

    }

×
×
  • 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.