Jump to content
  • 0

bug la textdraw gm burned


Stefano@ONYT

Question

12 answers to this question

Recommended Posts

  • 0

YCMD:buycar(playerid, params[], help) {
    if(PlayerInfo[playerid][pLevel] < 3) return SCM(playerid, COLOR_GREY, "Nu ai nivel 3!");
    if(!PlayerToPoint(3.0,playerid,326.9715,-1514.7264,36.0325)) return SCM(playerid, COLOR_GREY, "Nu esti la dealership.");
    if(TestingModel[playerid] == 1) return 1;
            
    if(PlayerInfo[playerid][pWantedLevel] > 0) return SCM(playerid, -1, "Ai wanted, nu poti folosi aceasta comanda!");
    new x=0, dbID[180], szQuery[256];
    format(szQuery, sizeof(szQuery), "SELECT * FROM `dsveh`");
    new Cache: result = mysql_query(SQL, szQuery);
    for(new i, j = cache_get_row_count (); i != j; ++i)
    {
        cache_get_field_content(i, "ID", dbID);
        x++;
        SelectedCar[playerid][x] = strval(dbID);
        LastDealerCar[playerid] = strval(dbID);
    }
    cache_delete(result);
    TestingModel[playerid] = 0;
    TotalDealerCars[playerid] = x;
    DealerCarType[playerid] = 1;
    InDealer[playerid] = 1;
    TogglePlayerControllable(playerid, 0);
    SetPlayerVirtualWorld(playerid, playerid+1);
    SetPlayerInterior(playerid, 0);
    SetPlayerPosEx(playerid, -2329.9380, 185.0620, 37.8267);
    DealerID[playerid] = 1;
    DealerCarColor1[playerid] = 1;
    DealerCarColor2[playerid] = 1;
    DealerCarAngle[playerid] = -61.3200;
    DealerCar[playerid] = CreateVehicleEx(DSModels[DealerID[playerid]][dModel],-2472.2488, 2235.5156, 4.6536,DealerCarAngle[playerid],DealerCarColor1[playerid],DealerCarColor2[playerid],-1);
    SetVehicleVirtualWorld(DealerCar[playerid],playerid+1);
    LinkVehicleToInterior(DealerCar[playerid], 0);
    PutPlayerInVehicleEx(playerid, DealerCar[playerid], 0);
    new string[128];
    format(string, sizeof(string), "Color 1: %d~n~Color 2: %d", DealerCarColor1[playerid], DealerCarColor2[playerid]);
    PlayerTextDrawSetString(playerid, DSTds[4], string);
    PlayerTextDrawShow(playerid, DSTds[4]);        
    PlayerTextDrawSetPreviewModel(playerid, DSTds[2], DSModels[DealerID[playerid]][dModel]);    
    PlayerTextDrawSetPreviewModel(playerid, DSTds[2], DSModels[DealerID[playerid]][dModel]);
    PlayerTextDrawSetPreviewVehCol(playerid, DSTds[2], DealerCarColor1[playerid], DealerCarColor2[playerid]);
    PlayerTextDrawShow(playerid, DSTds[2]);        
    ShowDealershipTextdraws(playerid);
    SelectTextDraw(playerid, 0x2EA1FFFF);    
    ShowCamera(playerid);    
    return 1;
}YCMD:buycar(playerid, params[], help) {
    if(PlayerInfo[playerid][pLevel] < 3) return SCM(playerid, COLOR_GREY, "Nu ai nivel 3!");
    if(!PlayerToPoint(3.0,playerid,326.9715,-1514.7264,36.0325)) return SCM(playerid, COLOR_GREY, "Nu esti la dealership.");
    if(TestingModel[playerid] == 1) return 1;
            
    if(PlayerInfo[playerid][pWantedLevel] > 0) return SCM(playerid, -1, "Ai wanted, nu poti folosi aceasta comanda!");
    new x=0, dbID[180], szQuery[256];
    format(szQuery, sizeof(szQuery), "SELECT * FROM `dsveh`");
    new Cache: result = mysql_query(SQL, szQuery);
    for(new i, j = cache_get_row_count (); i != j; ++i)
    {
        cache_get_field_content(i, "ID", dbID);
        x++;
        SelectedCar[playerid][x] = strval(dbID);
        LastDealerCar[playerid] = strval(dbID);
    }
    cache_delete(result);
    TestingModel[playerid] = 0;
    TotalDealerCars[playerid] = x;
    DealerCarType[playerid] = 1;
    InDealer[playerid] = 1;
    TogglePlayerControllable(playerid, 0);
    SetPlayerVirtualWorld(playerid, playerid+1);
    SetPlayerInterior(playerid, 0);
    SetPlayerPosEx(playerid, -2329.9380, 185.0620, 37.8267);
    DealerID[playerid] = 1;
    DealerCarColor1[playerid] = 1;
    DealerCarColor2[playerid] = 1;
    DealerCarAngle[playerid] = -61.3200;
    DealerCar[playerid] = CreateVehicleEx(DSModels[DealerID[playerid]][dModel],-2472.2488, 2235.5156, 4.6536,DealerCarAngle[playerid],DealerCarColor1[playerid],DealerCarColor2[playerid],-1);
    SetVehicleVirtualWorld(DealerCar[playerid],playerid+1);
    LinkVehicleToInterior(DealerCar[playerid], 0);
    PutPlayerInVehicleEx(playerid, DealerCar[playerid], 0);
    new string[128];
    format(string, sizeof(string), "Color 1: %d~n~Color 2: %d", DealerCarColor1[playerid], DealerCarColor2[playerid]);
    PlayerTextDrawSetString(playerid, DSTds[4], string);
    PlayerTextDrawShow(playerid, DSTds[4]);        
    PlayerTextDrawSetPreviewModel(playerid, DSTds[2], DSModels[DealerID[playerid]][dModel]);    
    PlayerTextDrawSetPreviewModel(playerid, DSTds[2], DSModels[DealerID[playerid]][dModel]);
    PlayerTextDrawSetPreviewVehCol(playerid, DSTds[2], DealerCarColor1[playerid], DealerCarColor2[playerid]);
    PlayerTextDrawShow(playerid, DSTds[2]);        
    ShowDealershipTextdraws(playerid);
    SelectTextDraw(playerid, 0x2EA1FFFF);    
    ShowCamera(playerid);    
    return 1;
}

YCMD:buycar(playerid, params[], help) {
	if(PlayerInfo[playerid][pLevel] < 3) return SCM(playerid, COLOR_GREY, "Nu ai nivel 3!");
	if(!PlayerToPoint(3.0,playerid,326.9715,-1514.7264,36.0325)) return SCM(playerid, COLOR_GREY, "Nu esti la dealership.");
	if(TestingModel[playerid] == 1) return 1;
			
	if(PlayerInfo[playerid][pWantedLevel] > 0) return SCM(playerid, -1, "Ai wanted, nu poti folosi aceasta comanda!");
	new x=0, dbID[180], szQuery[256];
	format(szQuery, sizeof(szQuery), "SELECT * FROM `dsveh`");
	new Cache: result = mysql_query(SQL, szQuery);
	for(new i, j = cache_get_row_count (); i != j; ++i)
	{
		cache_get_field_content(i, "ID", dbID);
		x++;
		SelectedCar[playerid][x] = strval(dbID);
		LastDealerCar[playerid] = strval(dbID);
	}
	cache_delete(result);
	TestingModel[playerid] = 0;
	TotalDealerCars[playerid] = x;
	DealerCarType[playerid] = 1;
	InDealer[playerid] = 1;
	TogglePlayerControllable(playerid, 0);
	SetPlayerVirtualWorld(playerid, playerid+1);
	SetPlayerInterior(playerid, 0);
	SetPlayerPosEx(playerid, -2329.9380, 185.0620, 37.8267);
	DealerID[playerid] = 1;
	DealerCarColor1[playerid] = 1;
	DealerCarColor2[playerid] = 1;
	DealerCarAngle[playerid] = -61.3200;
	DealerCar[playerid] = CreateVehicleEx(DSModels[DealerID[playerid]][dModel],-2472.2488, 2235.5156, 4.6536,DealerCarAngle[playerid],DealerCarColor1[playerid],DealerCarColor2[playerid],-1);
	SetVehicleVirtualWorld(DealerCar[playerid],playerid+1);
	LinkVehicleToInterior(DealerCar[playerid], 0);
	PutPlayerInVehicleEx(playerid, DealerCar[playerid], 0);
	new string[128];
	format(string, sizeof(string), "Color 1: %d~n~Color 2: %d", DealerCarColor1[playerid], DealerCarColor2[playerid]);
	PlayerTextDrawSetString(playerid, DSTds[4], string);
	PlayerTextDrawShow(playerid, DSTds[4]);		
	PlayerTextDrawSetPreviewModel(playerid, DSTds[2], DSModels[DealerID[playerid]][dModel]);	
	PlayerTextDrawSetPreviewModel(playerid, DSTds[2], DSModels[DealerID[playerid]][dModel]);
	PlayerTextDrawSetPreviewVehCol(playerid, DSTds[2], DealerCarColor1[playerid], DealerCarColor2[playerid]);
	PlayerTextDrawShow(playerid, DSTds[2]);		
	ShowDealershipTextdraws(playerid);
	SelectTextDraw(playerid, 0x2EA1FFFF);	
	ShowCamera(playerid);	
	return 1;
}

 

Link to comment
Share on other sites

  • 0
Acum 10 minute, Uzzi25_Adev a spus:

adica atunci cand dai comanda sa cumperi o masina se pune un td care nu are ce cauta acolo

am bagat doar la functia de showdealershiptextdraw asta

    PlayerTextDrawHide( playerid, Speedometer[0] );
    PlayerTextDrawHide( playerid, Speedometer[1] );
    PlayerTextDrawHide( playerid, Speedometer[2] );
    PlayerTextDrawHide( playerid, Speedometer[3] );
    PlayerTextDrawHide( playerid, Speedometer[4] );
    PlayerTextDrawHide( playerid, Speedometer[5] );
    PlayerTextDrawHide( playerid, Speedometer[6] );
    PlayerTextDrawHide( playerid, Speedometer[7] );
    PlayerTextDrawHide( playerid, Speedometer[8] );

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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