Jump to content

Recommended Posts

Posted

Am facut un DEALERSHIP. pe textdraw si akm cand dau /buycar nu imi apare masina,

COMMAND:

 

CMD:buycar(playerid, params[])
{
    if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_ERROR, "Nu esti logat.");
    if(IsPlayerInAnyVehicle(playerid)) return SCM(playerid,COLOR_SERVER,"{FFB870}Please get out of the car.");
    if(IsPlayerInRangeOfPoint(playerid, 7.0, 1653.9430,-1656.0477,22.5156))
    {
        if(PlayerInfo[playerid][pLevel] < 3) return SendClientMessage(playerid, COLOR_SERVER, "{FFB870}You need to be level 3 to buy a vehicle.");
        BuyCar[playerid] = 1;
        new idstock = BuyCar[playerid];
        new string[1000];
        //ShowPlayerDialog(playerid,DIALOG_CARBUY, DIALOG_STYLE_LIST, "Buy a car", "Cheap cars\nRegular cars\nExpensive cars\nPremium cars", "Select", "Close");
        PlayerTextDrawSetPreviewModel(playerid, DealerShipTD[playerid][6], Stock[idstock][vModel]);
        PlayerTextDrawSetPreviewVehCol(playerid, DealerShipTD[playerid][6], 1, 1);
        format(string, sizeof(string), "%s",Stock[idstock][vName]);
        PlayerTextDrawSetString(playerid, DealerShipTD[playerid][4],string);
        PlayerTextDrawShow(playerid, DealerShipTD[playerid][4]);
        format(string, sizeof(string), "STOC:_%s~n~CULOARE_1:_1~n~CULOARE_2:_1~n~Pret:_$%s",FormatNumber(Stock[idstock][vStock]),FormatNumber(Stock[idstock][vPrice]));
        PlayerTextDrawSetString(playerid, DealerShipTD[playerid][5],string);
        vcol1[playerid] = 1;
        vcol2[playerid] = 1;
        DealerShipTextDrawShow(playerid);
        esteinds[playerid] = 1;
        DSCAR[playerid] = CreateVehicle(Stock[idstock][vModel],1765.7640, -2286.8374, 27.4146,320.7336, vcol1[playerid],vcol2[playerid],-1);
        PlayerTextDrawSetPreviewRot(playerid, DealerShipTD[playerid][6], 0.000000, 0.000000, 30.000000, 1.000000);
        SetPlayerVirtualWorld(playerid, 69*playerid);
        SetVehicleVirtualWorld(DSCAR[playerid], 69*playerid);
        SetPlayerCameraPos(playerid, 1769.0742, -2266.9126, 32.7817);
        SetPlayerCameraLookAt(playerid, 1768.9325, -2267.9021, 32.4167);
        SelectTextDraw(playerid, COLOR_SERVER);
    }
    else return SCM(playerid,COLOR_SERVER,"{FFB870}You are not the place where you can buy a car.");
      return 1;
}

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.