Kesa

Pagalbos del spidometro uz tai +r3p

Recommended Posts

Nu va man iskilo tokia bėda pas mane spidometras yra apačioje per vidurį ir kai paleidi skaičiavimą nesimato skaičiavimo taigi norėčiau paklausti kaip jį perkelti į dešinį kampa?kas padės tam +R3P

Dalintis šį pranešimą


Nuoroda iki šio pranešimo
Dalintis per kitą puslapį

Tiek radau:

public Speedometer(playerid)

{

//Sukuriam stringus

new vehicleid,Float:speed_x,Float:speed_y,Float:speed_z,Float:final_speed,speed_string[256],final_speed_int;

vehicleid = GetPlayerVehicleID(playerid);

if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)

{

new VehicleNames[212][] = {

"Landstalker","Bravura","Buffalo","Linerunner","Pereniel","Sentinel","Dumper","Firetruck","Trashmaster","Stretch","Manana","Infernus",

"Voodoo","Pony","Mule","Cheetah","Ambulance","Leviathan","Moonbeam","Esperanto","Taxi","Washington","Bobcat","Mr Whoopee","BF Injection",

"Hunter","Premier","Enforcer","Securicar","Banshee","Predator","Bus","Rhino","Barracks","Hotknife","Trailer","Previon","Coach","Cabbie",

"Stallion","Rumpo","RC Bandit","Romero","Packer","Monster","Admiral","Squalo","Seasparrow","Pizzaboy","Tram","Trailer","Turismo","Speeder",

"Reefer","Tropic","Flatbed","Yankee","Caddy","Solair","Berkley's RC Van","Skimmer","PCJ-600","Faggio","Freeway","RC Baron","RC Raider",

"Glendale","Oceanic","Sanchez","Sparrow","Patriot","Quad","Coastguard","Dinghy","Hermes","Sabre","Rustler","ZR3 50","Walton","Regina",

"Comet","BMX","Burrito","Camper","Marquis","Baggage","Dozer","Maverick","News Chopper","Rancher","FBI Rancher","Virgo","Greenwood",

"Jetmax","Hotring","Sandking","Blista Compact","Police Maverick","Boxville","Benson","Mesa","RC Goblin","Hotring Racer A","Hotring Racer B",

"Bloodring Banger","Rancher","Super GT","Elegant","Journey","Bike","Mountain Bike","Beagle","Cropdust","Stunt","Tanker","RoadTrain",

"Nebula","Majestic","Buccaneer","Shamal","Hydra","FCR-900","NRG-500","HPV1000","Cement Truck","Tow Truck","Fortune","Cadrona","FBI Truck",

"Willard","Forklift","Tractor","Combine","Feltzer","Remington","Slamvan","Blade","Freight","Streak","Vortex","Vincent","Bullet","Clover",

"Sadler","Firetruck","Hustler","Intruder","Primo","Cargobob","Tampa","Sunrise","Merit","Utility","Nevada","Yosemite","Windsor","Monster A",

"Monster B","Uranus","Jester","Sultan","Stratum","Elegy","Raindance","RC Tiger","Flash","Tahoma","Savanna","Bandito","Freight","Trailer",

"Kart","Mower","Duneride","Sweeper","Broadway","Tornado","AT-400","DFT-30","Huntley","Stafford","BF-400","Newsvan","Tug","Trailer A","Emperor",

"Wayfarer","Euros","Hotdog","Club","Trailer B","Trailer C","Andromada","Dodo","RC Cam","Launch","Police Car (LSPD)","Police Car (SFPD)",

"Police Car (LVPD)","Police Ranger","Picador","S.W.A.T. Van","Alpha","Phoenix","Glendale","Sadler","Luggage Trailer A","Luggage Trailer B",

"Stair Trailer","Boxville","Farm Plow","Utility Trailer" };

new masinosbukle[10];

new Float:health;

GetVehicleHealth(vehicleid, health);

if(health >900)

{

format(masinosbukle, sizeof(masinosbukle), "~g~%.1f%", health/10);

}

else if(health >800)

{

format(masinosbukle, sizeof(masinosbukle), "~g~%.1f%", health/10);

}

else if(health >700)

{

format(masinosbukle, sizeof(masinosbukle), "~g~%.1f%", health/10);

}

else if(health >600)

{

format(masinosbukle, sizeof(masinosbukle), "~y~%.1f%", health/10);

}

else if(health >500)

{

format(masinosbukle, sizeof(masinosbukle), "~y~%.1f%", health/10);

}

else if(health >400)

{

format(masinosbukle, sizeof(masinosbukle), "~y~%.1f%", health/10);

}

else if(health >300)

{

format(masinosbukle, sizeof(masinosbukle), "~r~%.1f%", health/10);

}

else if(health >200)

{

format(masinosbukle, sizeof(masinosbukle), "~r~%.1f%", health/10);

}

else if(health >100)

{

format(masinosbukle, sizeof(masinosbukle), "~r~%.1f%", health/10);

}

else if(health <100)

{

format(masinosbukle, sizeof(masinosbukle), "~r~%.1f%", health/10);

}

new degalai[20];

if(vehicleDB[vehicleid][dujos] == 1 ) degalai = "Dujos";

else if(vehicleDB[vehicleid][dyzelis] == 1 ) degalai = "Dyzelinas";

else if(vehicleDB[vehicleid][benzinas] == 1 ) degalai = "Benzinas";

new model = GetVehicleModel(vehicleid);

GetVehicleVelocity(vehicleid,speed_x,speed_y,speed_z);

final_speed = floatsqroot(((speed_x*speed_x)+(speed_y*speed_y))+(speed_z*speed_z))*216.666667; // 136.666667 = kmph // 85.4166672= mph

final_speed_int = floatround(final_speed,floatround_round);

vehicleDB[vehicleid][prav] += final_speed;

if(GazoInfo[playerid] == true)

{

format(speed_string,156,"Pavadinimas: ~y~%s~n~~w~Bukle: %s~n~~w~Greitis: ~r~%ikm/h~n~~w~Degalai: ~g~%dl~n~~w~Kuro Tipas: ~y~%s",VehicleNames[model-400], masinosbukle, final_speed_int, vehicleDB[vehicleid][gas], degalai);

TextDrawSetString(tekstas1[playerid], speed_string);

TextDrawShowForPlayer(playerid, spidometras[playerid]);

TextDrawShowForPlayer(playerid, tekstas1[playerid]);

TextDrawShowForPlayer(playerid, SPEEDOS[playerid]);

TextDrawShowForPlayer(playerid, SPEEDOS1[playerid]);

TextDrawShowForPlayer(playerid, SPEEDOS2[playerid]);

TextDrawShowForPlayer(playerid, SPEEDOS3[playerid]);

TextDrawShowForPlayer(playerid, SPEEDOS4[playerid]);

}else{

TextDrawHideForPlayer(playerid, spidometras[playerid]);

TextDrawHideForPlayer(playerid, tekstas1[playerid]);

TextDrawHideForPlayer(playerid, SPEEDOS[playerid]);

TextDrawHideForPlayer(playerid, SPEEDOS1[playerid]);

TextDrawHideForPlayer(playerid, SPEEDOS2[playerid]);

TextDrawHideForPlayer(playerid, SPEEDOS3[playerid]);

TextDrawHideForPlayer(playerid, SPEEDOS4[playerid]);

}

}else{

TextDrawHideForPlayer(playerid, spidometras[playerid]);

TextDrawHideForPlayer(playerid, tekstas1[playerid]);

TextDrawHideForPlayer(playerid, SPEEDOS[playerid]);

TextDrawHideForPlayer(playerid, SPEEDOS1[playerid]);

TextDrawHideForPlayer(playerid, SPEEDOS2[playerid]);

TextDrawHideForPlayer(playerid, SPEEDOS3[playerid]);

TextDrawHideForPlayer(playerid, SPEEDOS4[playerid]);

}

return 1;

}

Dalintis šį pranešimą


Nuoroda iki šio pranešimo
Dalintis per kitą puslapį

mano kurtas speedo :D neperkelsi jo niekaip :D o jei perkelsi tai negražiai ir neatitiks :D kadangi aš kuriau jį su TD editroiriu tai viskas lygiai ir panašiai, ir aišku norint ji tiesiog perkelti reikia turėta ta TD editoriaus save kuris yra tik viename kompe visame pasaulije :D and i'm proud of it

Dalintis šį pranešimą


Nuoroda iki šio pranešimo
Dalintis per kitą puslapį
Ance gali man papasakot kodel kartais skaiciavimas neveikia?

Ir tas 1 masinos mirimas kartais veikia kartais ne...

imsiu ir platinsiu pilani sutvarkyta moda :D taigi patys kurik kažkiek, modas platintas išvis ne serveriu kurimams, o kažkiek pasimokinti scriptinti ir atitrukti nuo GRP ir tu jobanu Data aplanku

Dalintis šį pranešimą


Nuoroda iki šio pranešimo
Dalintis per kitą puslapį
mano kurtas speedo :D neperkelsi jo niekaip :D o jei perkelsi tai negražiai ir neatitiks :D kadangi aš kuriau jį su TD editroiriu tai viskas lygiai ir panašiai, ir aišku norint ji tiesiog perkelti reikia turėta ta TD editoriaus save kuris yra tik viename kompe visame pasaulije :D and i'm proud of it

Nesutinku, laisvai galima perkelt.

Dalintis šį pranešimą


Nuoroda iki šio pranešimo
Dalintis per kitą puslapį

Prisijungti prie diskusijos

Palikti atsakymą galite iš karto, o užsiregistruoti vėliau. Jeigu jau turite paskyrą mūsų forume, Prisijunkite.

Svečias
Atsakyti šioje temoje...

×   Įklijuotas tekstas turi teksto formatavimą.   Pašalinti teksto formatavimą

  Galimi tik 75 veidukai.

×   Nuoroda buvo automatiškai įterpta.   Įterpti nuorodą paprastai

×   Jūsų ankstesnis pranešimas buvo atkurtas.   Išvalyti redaktorių

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


  • Šiame puslapyje naršo:   0 nariai

    Nėra registruotų narių peržiūrinčių šį forumą.

  • eneba
  • eneba
  • eneba



  • SuperGames programele
  • SuperGames programele