Pomoc oko td

Započeo Davor_Malovic, April 30, 2021, 03:35:26 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.



Citat: Davor_Malovic poslato April 30, 2021, 14:55:42 POSLE PODNE
Isto sve
Onda je problem negde drugde jer ja onako koristim u svom modu i sve mi perfektno radi :)

Sve sam uradio kao sto si rekao nezz sto nece, da nije do onplayerstatechange ?

Citat: Davor_Malovic poslato April 30, 2021, 13:44:26 POSLE PODNE
[13:41:45] [debug] Run time error 4: "Array index out of bounds"
[13:41:45] [debug]  Attempted to read/write array element at index 12 in array of size 12
[13:41:45] [debug] AMX backtrace:
[13:41:45] [debug] #0 003a1bec in ?? (0, 1) in agrp.amx
[13:41:45] [debug] #1 0037af88 in public WC_OnPlayerStateChange (0, 2, 1) in agrp.amx
[13:41:45] [debug] #2 0005d2dc in public FIXES_OnPlayerStateChange (0, 2, 1) in agrp.amx
[13:41:45] [debug] #3 000080c0 in public OnPlayerStateChange (0, 2, 1) in agrp.amx



Daj full kod msm da si samo loop sjebao

Slao je meni priv callback, unutar if (newstate == inveh) je ubacio funkciju gore tkd se nije mogla ni povuć kad izađe iz vozila još return ima pa ako bude fixao šta nek piše

Ako si fix lock, ako nisi daj trenutni kod posto stvarno necu da nagadjam sta je i kako je.
Daj kako prikazujes, daj kako sakrivas i daj sve vezano za te TD-ove.

static PlayerText: BrzinometarTD[MAX_PLAYERS][12];
        BrzinometarTD[playerid][0] = CreatePlayerTextDraw(playerid, 528.101562, 353.450286, "Amazon_Gaming");
	PlayerTextDrawLetterSize(playerid, BrzinometarTD[playerid][0], 0.398124, 1.594164);
	PlayerTextDrawAlignment(playerid, BrzinometarTD[playerid][0], 1);
	PlayerTextDrawColor(playerid, BrzinometarTD[playerid][0], -1);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][0], 1);
	PlayerTextDrawSetOutline(playerid, BrzinometarTD[playerid][0], 0);
	PlayerTextDrawBackgroundColor(playerid, BrzinometarTD[playerid][0], 255);
	PlayerTextDrawFont(playerid, BrzinometarTD[playerid][0], 3);
	PlayerTextDrawSetProportional(playerid, BrzinometarTD[playerid][0], 1);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][0], 1);

	BrzinometarTD[playerid][1] = CreatePlayerTextDraw(playerid, 499.897399, 365.000091, "box");
	PlayerTextDrawLetterSize(playerid, BrzinometarTD[playerid][1], 0.000000, 6.345532);
	PlayerTextDrawTextSize(playerid, BrzinometarTD[playerid][1], 628.000000, 0.000000);
	PlayerTextDrawAlignment(playerid, BrzinometarTD[playerid][1], 1);
	PlayerTextDrawColor(playerid, BrzinometarTD[playerid][1], -1);
	PlayerTextDrawUseBox(playerid, BrzinometarTD[playerid][1], 1);
	PlayerTextDrawBoxColor(playerid, BrzinometarTD[playerid][1], -926404046);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][1], 0);
	PlayerTextDrawSetOutline(playerid, BrzinometarTD[playerid][1], 0);
	PlayerTextDrawBackgroundColor(playerid, BrzinometarTD[playerid][1], 255);
	PlayerTextDrawFont(playerid, BrzinometarTD[playerid][1], 1);
	PlayerTextDrawSetProportional(playerid, BrzinometarTD[playerid][1], 1);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][1], 0);

	BrzinometarTD[playerid][2] = CreatePlayerTextDraw(playerid, 501.671661, 369.633209, "ime_auta");
	PlayerTextDrawLetterSize(playerid, BrzinometarTD[playerid][2], 0.247261, 1.366667);
	PlayerTextDrawAlignment(playerid, BrzinometarTD[playerid][2], 1);
	PlayerTextDrawColor(playerid, BrzinometarTD[playerid][2], -1);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][2], 1);
	PlayerTextDrawSetOutline(playerid, BrzinometarTD[playerid][2], 0);
	PlayerTextDrawBackgroundColor(playerid, BrzinometarTD[playerid][2], 255);
	PlayerTextDrawFont(playerid, BrzinometarTD[playerid][2], 2);
	PlayerTextDrawSetProportional(playerid, BrzinometarTD[playerid][2], 1);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][2], 1);

	BrzinometarTD[playerid][3] = CreatePlayerTextDraw(playerid, 502.071624, 382.233551, "brzina");
	PlayerTextDrawLetterSize(playerid, BrzinometarTD[playerid][3], 0.247261, 1.366667);
	PlayerTextDrawAlignment(playerid, BrzinometarTD[playerid][3], 1);
	PlayerTextDrawColor(playerid, BrzinometarTD[playerid][3], -1);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][3], 1);
	PlayerTextDrawSetOutline(playerid, BrzinometarTD[playerid][3], 0);
	PlayerTextDrawBackgroundColor(playerid, BrzinometarTD[playerid][3], 255);
	PlayerTextDrawFont(playerid, BrzinometarTD[playerid][3], 2);
	PlayerTextDrawSetProportional(playerid, BrzinometarTD[playerid][3], 1);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][3], 1);

	BrzinometarTD[playerid][4] = CreatePlayerTextDraw(playerid, 501.597961, 395.433898, "gorivo");
	PlayerTextDrawLetterSize(playerid, BrzinometarTD[playerid][4], 0.247261, 1.366667);
	PlayerTextDrawAlignment(playerid, BrzinometarTD[playerid][4], 1);
	PlayerTextDrawColor(playerid, BrzinometarTD[playerid][4], -1);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][4], 1);
	PlayerTextDrawSetOutline(playerid, BrzinometarTD[playerid][4], 0);
	PlayerTextDrawBackgroundColor(playerid, BrzinometarTD[playerid][4], 255);
	PlayerTextDrawFont(playerid, BrzinometarTD[playerid][4], 2);
	PlayerTextDrawSetProportional(playerid, BrzinometarTD[playerid][4], 1);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][4], 1);

	BrzinometarTD[playerid][5] = CreatePlayerTextDraw(playerid, 501.403289, 408.450592, "radio");
	PlayerTextDrawLetterSize(playerid, BrzinometarTD[playerid][5], 0.247261, 1.366667);
	PlayerTextDrawAlignment(playerid, BrzinometarTD[playerid][5], 1);
	PlayerTextDrawColor(playerid, BrzinometarTD[playerid][5], -1);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][5], 1);
	PlayerTextDrawSetOutline(playerid, BrzinometarTD[playerid][5], 0);
	PlayerTextDrawBackgroundColor(playerid, BrzinometarTD[playerid][5], 255);
	PlayerTextDrawFont(playerid, BrzinometarTD[playerid][5], 2);
	PlayerTextDrawSetProportional(playerid, BrzinometarTD[playerid][5], 1);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][5], 1);

	BrzinometarTD[playerid][6] = CreatePlayerTextDraw(playerid, 551.872070, 369.633209, "sultan");
	PlayerTextDrawLetterSize(playerid, BrzinometarTD[playerid][6], 0.247261, 1.366667);
	PlayerTextDrawAlignment(playerid, BrzinometarTD[playerid][6], 1);
	PlayerTextDrawColor(playerid, BrzinometarTD[playerid][6], -5963521);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][6], 1);
	PlayerTextDrawSetOutline(playerid, BrzinometarTD[playerid][6], 0);
	PlayerTextDrawBackgroundColor(playerid, BrzinometarTD[playerid][6], 255);
	PlayerTextDrawFont(playerid, BrzinometarTD[playerid][6], 2);
	PlayerTextDrawSetProportional(playerid, BrzinometarTD[playerid][6], 1);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][6], 1);

	BrzinometarTD[playerid][7] = CreatePlayerTextDraw(playerid, 542.464782, 382.233551, "220");
	PlayerTextDrawLetterSize(playerid, BrzinometarTD[playerid][7], 0.247261, 1.366667);
	PlayerTextDrawAlignment(playerid, BrzinometarTD[playerid][7], 1);
	PlayerTextDrawColor(playerid, BrzinometarTD[playerid][7], -5963521);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][7], 1);
	PlayerTextDrawSetOutline(playerid, BrzinometarTD[playerid][7], 0);
	PlayerTextDrawBackgroundColor(playerid, BrzinometarTD[playerid][7], 255);
	PlayerTextDrawFont(playerid, BrzinometarTD[playerid][7], 2);
	PlayerTextDrawSetProportional(playerid, BrzinometarTD[playerid][7], 1);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][7], 1);

	BrzinometarTD[playerid][8] = CreatePlayerTextDraw(playerid, 543.690856, 395.433898, "200"); 
	PlayerTextDrawLetterSize(playerid, BrzinometarTD[playerid][8], 0.247261, 1.366667);
	PlayerTextDrawAlignment(playerid, BrzinometarTD[playerid][8], 1);
	PlayerTextDrawColor(playerid, BrzinometarTD[playerid][8], -5963521);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][8], 1);
	PlayerTextDrawSetOutline(playerid, BrzinometarTD[playerid][8], 0);
	PlayerTextDrawBackgroundColor(playerid, BrzinometarTD[playerid][8], 255);
	PlayerTextDrawFont(playerid, BrzinometarTD[playerid][8], 2);
	PlayerTextDrawSetProportional(playerid, BrzinometarTD[playerid][8], 1);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][8], 1);

	BrzinometarTD[playerid][9] = CreatePlayerTextDraw(playerid, 548.095092, 408.450592, "45"); 
	PlayerTextDrawLetterSize(playerid, BrzinometarTD[playerid][9], 0.247261, 1.366667);
	PlayerTextDrawAlignment(playerid, BrzinometarTD[playerid][9], 1);
	PlayerTextDrawColor(playerid, BrzinometarTD[playerid][9], -5963521);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][9], 1);
	PlayerTextDrawSetOutline(playerid, BrzinometarTD[playerid][9], 0);
	PlayerTextDrawBackgroundColor(playerid, BrzinometarTD[playerid][9], 255);
	PlayerTextDrawFont(playerid, BrzinometarTD[playerid][9], 2);
	PlayerTextDrawSetProportional(playerid, BrzinometarTD[playerid][9], 1);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][9], 1);

	BrzinometarTD[playerid][10] = CreatePlayerTextDraw(playerid, 562.286315, 395.433898, "l");
	PlayerTextDrawLetterSize(playerid, BrzinometarTD[playerid][10], 0.247261, 1.366667);
	PlayerTextDrawAlignment(playerid, BrzinometarTD[playerid][10], 1);
	PlayerTextDrawColor(playerid, BrzinometarTD[playerid][10], -1);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][10], 1);
	PlayerTextDrawSetOutline(playerid, BrzinometarTD[playerid][10], 0);
	PlayerTextDrawBackgroundColor(playerid, BrzinometarTD[playerid][10], 255);
	PlayerTextDrawFont(playerid, BrzinometarTD[playerid][10], 2);
	PlayerTextDrawSetProportional(playerid, BrzinometarTD[playerid][10], 1);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][10], 1);

	BrzinometarTD[playerid][11] = CreatePlayerTextDraw(playerid, 563.159729, 382.233551, "KM/H");
	PlayerTextDrawLetterSize(playerid, BrzinometarTD[playerid][11], 0.247261, 1.366667);
	PlayerTextDrawAlignment(playerid, BrzinometarTD[playerid][11], 1);
	PlayerTextDrawColor(playerid, BrzinometarTD[playerid][11], -1);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][11], 1);+
	PlayerTextDrawSetOutline(playerid, BrzinometarTD[playerid][11], 0);
	PlayerTextDrawBackgroundColor(playerid, BrzinometarTD[playerid][11], 255);
	PlayerTextDrawFont(playerid, BrzinometarTD[playerid][11], 2);
	PlayerTextDrawSetProportional(playerid, BrzinometarTD[playerid][11], 1);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][11], 1);
        // onplayerstatechange
	{
		CreateSpeedoTextDraws(playerid, (newstate == PLAYER_STATE_DRIVER ? (true) : (false)));
        }
	if( newstate == PLAYER_STATE_DRIVER )
	{
		new veh[30];
	        format(veh, sizeof(veh), "%s", VehicleNames[GetVehicleModel(vehicle)-400]);
		PlayerTextDrawSetString(playerid, BrzinometarTD[playerid][6], veh);
	}
// ovo sam stavio kod nekih stock
stock CreateSpeedoTextDraws(const playerid, bool: status = true)
{
    if (!status){
        for (new i = 0; i < 12; ++i){
            PlayerTextDrawDestroy(playerid, BrzinometarTD[playerid][i]);
        }

        return 1;
    }

   	BrzinometarTD[playerid][0] = CreatePlayerTextDraw(playerid, 528.101562, 353.450286, "Amazon_Gaming");
	PlayerTextDrawLetterSize(playerid, BrzinometarTD[playerid][0], 0.398124, 1.594164);
	PlayerTextDrawAlignment(playerid, BrzinometarTD[playerid][0], 1);
	PlayerTextDrawColor(playerid, BrzinometarTD[playerid][0], -1);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][0], 1);
	PlayerTextDrawSetOutline(playerid, BrzinometarTD[playerid][0], 0);
	PlayerTextDrawBackgroundColor(playerid, BrzinometarTD[playerid][0], 255);
	PlayerTextDrawFont(playerid, BrzinometarTD[playerid][0], 3);
	PlayerTextDrawSetProportional(playerid, BrzinometarTD[playerid][0], 1);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][0], 1);

	BrzinometarTD[playerid][1] = CreatePlayerTextDraw(playerid, 499.897399, 365.000091, "box");
	PlayerTextDrawLetterSize(playerid, BrzinometarTD[playerid][1], 0.000000, 6.345532);
	PlayerTextDrawTextSize(playerid, BrzinometarTD[playerid][1], 628.000000, 0.000000);
	PlayerTextDrawAlignment(playerid, BrzinometarTD[playerid][1], 1);
	PlayerTextDrawColor(playerid, BrzinometarTD[playerid][1], -1);
	PlayerTextDrawUseBox(playerid, BrzinometarTD[playerid][1], 1);
	PlayerTextDrawBoxColor(playerid, BrzinometarTD[playerid][1], -926404046);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][1], 0);
	PlayerTextDrawSetOutline(playerid, BrzinometarTD[playerid][1], 0);
	PlayerTextDrawBackgroundColor(playerid, BrzinometarTD[playerid][1], 255);
	PlayerTextDrawFont(playerid, BrzinometarTD[playerid][1], 1);
	PlayerTextDrawSetProportional(playerid, BrzinometarTD[playerid][1], 1);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][1], 0);

	BrzinometarTD[playerid][2] = CreatePlayerTextDraw(playerid, 501.671661, 369.633209, "ime_auta");
	PlayerTextDrawLetterSize(playerid, BrzinometarTD[playerid][2], 0.247261, 1.366667);
	PlayerTextDrawAlignment(playerid, BrzinometarTD[playerid][2], 1);
	PlayerTextDrawColor(playerid, BrzinometarTD[playerid][2], -1);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][2], 1);
	PlayerTextDrawSetOutline(playerid, BrzinometarTD[playerid][2], 0);
	PlayerTextDrawBackgroundColor(playerid, BrzinometarTD[playerid][2], 255);
	PlayerTextDrawFont(playerid, BrzinometarTD[playerid][2], 2);
	PlayerTextDrawSetProportional(playerid, BrzinometarTD[playerid][2], 1);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][2], 1);

	BrzinometarTD[playerid][3] = CreatePlayerTextDraw(playerid, 502.071624, 382.233551, "brzina");
	PlayerTextDrawLetterSize(playerid, BrzinometarTD[playerid][3], 0.247261, 1.366667);
	PlayerTextDrawAlignment(playerid, BrzinometarTD[playerid][3], 1);
	PlayerTextDrawColor(playerid, BrzinometarTD[playerid][3], -1);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][3], 1);
	PlayerTextDrawSetOutline(playerid, BrzinometarTD[playerid][3], 0);
	PlayerTextDrawBackgroundColor(playerid, BrzinometarTD[playerid][3], 255);
	PlayerTextDrawFont(playerid, BrzinometarTD[playerid][3], 2);
	PlayerTextDrawSetProportional(playerid, BrzinometarTD[playerid][3], 1);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][3], 1);

	BrzinometarTD[playerid][4] = CreatePlayerTextDraw(playerid, 501.597961, 395.433898, "gorivo");
	PlayerTextDrawLetterSize(playerid, BrzinometarTD[playerid][4], 0.247261, 1.366667);
	PlayerTextDrawAlignment(playerid, BrzinometarTD[playerid][4], 1);
	PlayerTextDrawColor(playerid, BrzinometarTD[playerid][4], -1);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][4], 1);
	PlayerTextDrawSetOutline(playerid, BrzinometarTD[playerid][4], 0);
	PlayerTextDrawBackgroundColor(playerid, BrzinometarTD[playerid][4], 255);
	PlayerTextDrawFont(playerid, BrzinometarTD[playerid][4], 2);
	PlayerTextDrawSetProportional(playerid, BrzinometarTD[playerid][4], 1);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][4], 1);

	BrzinometarTD[playerid][5] = CreatePlayerTextDraw(playerid, 501.403289, 408.450592, "radio");
	PlayerTextDrawLetterSize(playerid, BrzinometarTD[playerid][5], 0.247261, 1.366667);
	PlayerTextDrawAlignment(playerid, BrzinometarTD[playerid][5], 1);
	PlayerTextDrawColor(playerid, BrzinometarTD[playerid][5], -1);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][5], 1);
	PlayerTextDrawSetOutline(playerid, BrzinometarTD[playerid][5], 0);
	PlayerTextDrawBackgroundColor(playerid, BrzinometarTD[playerid][5], 255);
	PlayerTextDrawFont(playerid, BrzinometarTD[playerid][5], 2);
	PlayerTextDrawSetProportional(playerid, BrzinometarTD[playerid][5], 1);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][5], 1);

	BrzinometarTD[playerid][6] = CreatePlayerTextDraw(playerid, 551.872070, 369.633209, "sultan");
	PlayerTextDrawLetterSize(playerid, BrzinometarTD[playerid][6], 0.247261, 1.366667);
	PlayerTextDrawAlignment(playerid, BrzinometarTD[playerid][6], 1);
	PlayerTextDrawColor(playerid, BrzinometarTD[playerid][6], -5963521);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][6], 1);
	PlayerTextDrawSetOutline(playerid, BrzinometarTD[playerid][6], 0);
	PlayerTextDrawBackgroundColor(playerid, BrzinometarTD[playerid][6], 255);
	PlayerTextDrawFont(playerid, BrzinometarTD[playerid][6], 2);
	PlayerTextDrawSetProportional(playerid, BrzinometarTD[playerid][6], 1);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][6], 1);

	BrzinometarTD[playerid][7] = CreatePlayerTextDraw(playerid, 542.464782, 382.233551, "220");
	PlayerTextDrawLetterSize(playerid, BrzinometarTD[playerid][7], 0.247261, 1.366667);
	PlayerTextDrawAlignment(playerid, BrzinometarTD[playerid][7], 1);
	PlayerTextDrawColor(playerid, BrzinometarTD[playerid][7], -5963521);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][7], 1);
	PlayerTextDrawSetOutline(playerid, BrzinometarTD[playerid][7], 0);
	PlayerTextDrawBackgroundColor(playerid, BrzinometarTD[playerid][7], 255);
	PlayerTextDrawFont(playerid, BrzinometarTD[playerid][7], 2);
	PlayerTextDrawSetProportional(playerid, BrzinometarTD[playerid][7], 1);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][7], 1);

	BrzinometarTD[playerid][8] = CreatePlayerTextDraw(playerid, 543.690856, 395.433898, "200"); 
	PlayerTextDrawLetterSize(playerid, BrzinometarTD[playerid][8], 0.247261, 1.366667);
	PlayerTextDrawAlignment(playerid, BrzinometarTD[playerid][8], 1);
	PlayerTextDrawColor(playerid, BrzinometarTD[playerid][8], -5963521);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][8], 1);
	PlayerTextDrawSetOutline(playerid, BrzinometarTD[playerid][8], 0);
	PlayerTextDrawBackgroundColor(playerid, BrzinometarTD[playerid][8], 255);
	PlayerTextDrawFont(playerid, BrzinometarTD[playerid][8], 2);
	PlayerTextDrawSetProportional(playerid, BrzinometarTD[playerid][8], 1);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][8], 1);

	BrzinometarTD[playerid][9] = CreatePlayerTextDraw(playerid, 548.095092, 408.450592, "45"); 
	PlayerTextDrawLetterSize(playerid, BrzinometarTD[playerid][9], 0.247261, 1.366667);
	PlayerTextDrawAlignment(playerid, BrzinometarTD[playerid][9], 1);
	PlayerTextDrawColor(playerid, BrzinometarTD[playerid][9], -5963521);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][9], 1);
	PlayerTextDrawSetOutline(playerid, BrzinometarTD[playerid][9], 0);
	PlayerTextDrawBackgroundColor(playerid, BrzinometarTD[playerid][9], 255);
	PlayerTextDrawFont(playerid, BrzinometarTD[playerid][9], 2);
	PlayerTextDrawSetProportional(playerid, BrzinometarTD[playerid][9], 1);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][9], 1);

	BrzinometarTD[playerid][10] = CreatePlayerTextDraw(playerid, 562.286315, 395.433898, "l");
	PlayerTextDrawLetterSize(playerid, BrzinometarTD[playerid][10], 0.247261, 1.366667);
	PlayerTextDrawAlignment(playerid, BrzinometarTD[playerid][10], 1);
	PlayerTextDrawColor(playerid, BrzinometarTD[playerid][10], -1);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][10], 1);
	PlayerTextDrawSetOutline(playerid, BrzinometarTD[playerid][10], 0);
	PlayerTextDrawBackgroundColor(playerid, BrzinometarTD[playerid][10], 255);
	PlayerTextDrawFont(playerid, BrzinometarTD[playerid][10], 2);
	PlayerTextDrawSetProportional(playerid, BrzinometarTD[playerid][10], 1);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][10], 1);

	BrzinometarTD[playerid][11] = CreatePlayerTextDraw(playerid, 563.159729, 382.233551, "KM/H");
	PlayerTextDrawLetterSize(playerid, BrzinometarTD[playerid][11], 0.247261, 1.366667);
	PlayerTextDrawAlignment(playerid, BrzinometarTD[playerid][11], 1);
	PlayerTextDrawColor(playerid, BrzinometarTD[playerid][11], -1);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][11], 1);+
	PlayerTextDrawSetOutline(playerid, BrzinometarTD[playerid][11], 0);
	PlayerTextDrawBackgroundColor(playerid, BrzinometarTD[playerid][11], 255);
	PlayerTextDrawFont(playerid, BrzinometarTD[playerid][11], 2);
	PlayerTextDrawSetProportional(playerid, BrzinometarTD[playerid][11], 1);
	PlayerTextDrawSetShadow(playerid, BrzinometarTD[playerid][11], 1);

    for (new i = 0; i < 12; ++i) {
        PlayerTextDrawShow(playerid, BrzinometarTD[playerid][i]);
    }

    return 1;
}
// onplayerupdate
if(IsPlayerInAnyVehicle(playerid)&& GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
	{
	    new vehicle = GetPlayerVehicleID(playerid);
	    if(!IsABicycle(vehicle))
		{
			new string[30];
            format(string, sizeof(string), "~r~%d ", GetPlayerSpeed(playerid, true));
            PlayerTextDrawSetString(playerid, BrzinometarTD[playerid][7], string);
            new string1[30];
            format(stringj, sizeof(string), "~r~%dL", Fuel[vehicle]);
            PlayerTextDrawSetString(playerid, BrzinometarTD[playerid][8], string);
            new string2[30];
            format(string2, sizeof(string2), "%s", VehicleNames[GetVehicleModel(vehicle)-400]);
			PlayerTextDrawSetString(playerid, BrzinometarTD[playerid][6], string2);
		}
	}
// pokusao sam i ime promjeniti i izbrisati neke tdove al et
Poslednja Izmena: April 30, 2021, 22:52:44 POSLE PODNE od Davor_Malovic

Citat: 'xza poslato April 30, 2021, 17:56:53 POSLE PODNE
Slao je meni priv callback, unutar if (newstate == inveh) je ubacio funkciju gore tkd se nije mogla ni povuć kad izađe iz vozila još return ima pa ako bude fixao šta nek piše
Fixano, hvala xza, trebao sam staviti ono na pocetak