(Pomoc) Problem sa textdraw-om na kilometrazi

Započeo Jack_Ass, Septembar 17, 2013, 13:12:33 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta            :Yugoslavia by Pinki
Opis problema: ovako : umesto sendclientmesage stavio sam TextDrawShowForPlayer i radi dok igrac udje u auto kada udje i vozi se nista se ne pomjera kilometraza tek kada ponovo udjem i izadjem pomeri se pa me zanima kako da napravim da se pri voznji pomera
Deo skripte    :


public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new string[256], value, value2;
    format(string,sizeof(string),"vehicles/%d.ini", vehicleid);
    if (!dini_Exists(string))
    {
dini_Create(string);
}
value = dini_Int(string,""); VoziloInfo[vehicleid][vMeters] = value;
value2 = dini_Int(string,"Kilometraza"); VoziloInfo[vehicleid][vKilometers] = value2;
format(string,sizeof(string),"Kilometraza: %d",VoziloInfo[vehicleid][vKilometers],VoziloInfo[vehicleid][vMeters]);
TextDrawSetString(TDSpeedo17[playerid], string);
    TextDrawShowForPlayer(playerid, TDSpeedo17[playerid]);
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
    new string[256];
    TextDrawHideForPlayer(playerid, TDSpeedo17[playerid]);
    format(string,sizeof(string),"vehicles/%d.ini", vehicleid);
    dini_IntSet(string,"",VoziloInfo[vehicleid][vMeters]);
    dini_IntSet(string,"Kilometraza",VoziloInfo[vehicleid][vKilometers]);
}

Ovde sam stavljao
  TextDrawHideForPlayer(playerid, TDSpeedo17[playerid]);
    TextDrawShowForPlayer(playerid, TDSpeedo17[playerid]);
al ne funkcionise

public timer1seconde(i)
{
if(IsPlayerInAnyVehicle(i))
{
new string[256];
new vid = GetPlayerVehicleID(i);
    VoziloInfo[vid][vMeters] += (vitesse[i]*10)/36;
    if(VoziloInfo[vid][vMeters] > 999)
{
VoziloInfo[vid][vKilometers] += 1;
VoziloInfo[vid][vMeters] = 0;
}
format(string,sizeof(string),"vehicles/%d.ini", vid);
dini_IntSet(string,"",VoziloInfo[vid][vMeters]);
    dini_IntSet(string,"Kilometraza",VoziloInfo[vid][vKilometers]);
}
return 1;
}