Peršokti į turinį
Ginciuxzs

Galit padet?

Recommended Posts

Sveiki gal galite padeti man istaisyti spidometro klaidas? Duosiu +3rep jeigu veiks.

forward Speedometer(playerid);

#include

new Text:spidometras[MAX_PLAYERS];

new Text:SPEEDOS[MAX_PLAYERS];

new bool: ShiftInfo[MAX_PLAYERS] = true;

new ShiftTimer[MAX_PLAYERS];

#if defined FILTERSCRIPT

#else

#endif

public OnPlayerConnect(playerid)

{

spidometras[playerid] = TextDrawCreate(285.000000, 390.000000, "spidometras");

TextDrawFont(spidometras[playerid], 3);

TextDrawLetterSize(spidometras[playerid], 0.390000, 0.899999);

TextDrawColor(spidometras[playerid], -1);

TextDrawSetOutline(spidometras[playerid], 1);

TextDrawSetProportional(spidometras[playerid], 1);

TextDrawTextSize(spidometras[playerid], 405.000000, 0.000000);

SPEEDOS[playerid] = TextDrawCreate(254.000000, 389.000000, " ");

TextDrawBackgroundColor(SPEEDOS[playerid], 0x000000bb);

TextDrawFont(SPEEDOS[playerid], 2);

TextDrawLetterSize(SPEEDOS[playerid], 0.2300, 0.8999);

TextDrawColor(SPEEDOS[playerid], -1);

TextDrawSetOutline(SPEEDOS[playerid], 1);

TextDrawSetProportional(SPEEDOS[playerid], 1);

TextDrawTextSize(SPEEDOS[playerid], 405.000000, 0.000000);

ShiftInfo[playerid] = (ShiftInfo[playerid] == false) ? (true) : (true);

ShiftTimer[playerid] = SetTimerEx("Speedometer", 200, true, "e", playerid);

return 1;

}

public Speedometer(playerid)

{

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 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

vehicleDB[vehicleid][prav] = final_speed;

final_speed_int = floatround(final_speed,floatround_round);

if(ShiftInfo[playerid] == true)

{

format(speed_string,156,"~n~~n~ ~y~Transportas: ~w~%s~n~ ~g~Greitis: ~w~%i KM/h~n~ ~r~Bukle: ~w~%s~n~ ~b~Degalai: ~w~%dL~n~ ~p~Pravaziuota: ~w~%.2fKm", VehicleNames[model-400], final_speed_int, masinosbukle, vehicleDB[vehicleid][gas], vehicleDB[vehicleid][prav]/100000);

TextDrawSetString(SPEEDOS[playerid], speed_string);

TextDrawShowForPlayer(playerid, spidometras[playerid]);

TextDrawShowForPlayer(playerid, SPEEDOS[playerid]);

}else{

TextDrawHideForPlayer(playerid, spidometras[playerid]);

TextDrawHideForPlayer(playerid, SPEEDOS[playerid]);

}

}else{

TextDrawHideForPlayer(playerid, spidometras[playerid]);

TextDrawHideForPlayer(playerid, SPEEDOS[playerid]);

}

return 1;

}

Dalintis šį pranešimą


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


va klaidos

C:\Documents and Settings\Kompaz\Desktop\spidas.pwn(111) : error 017: undefined symbol "vehicleDB"

C:\Documents and Settings\Kompaz\Desktop\spidas.pwn(111) : warning 215: expression has no effect

C:\Documents and Settings\Kompaz\Desktop\spidas.pwn(111) : error 001: expected token: ";", but found "]"

C:\Documents and Settings\Kompaz\Desktop\spidas.pwn(111) : error 029: invalid expression, assumed zero

C:\Documents and Settings\Kompaz\Desktop\spidas.pwn(111) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

4 Errors.

Dalintis šį pranešimą


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

va klaidos

C:\Documents and Settings\Kompaz\Desktop\spidas.pwn(111) : error 017: undefined symbol "vehicleDB"

C:\Documents and Settings\Kompaz\Desktop\spidas.pwn(111) : warning 215: expression has no effect

C:\Documents and Settings\Kompaz\Desktop\spidas.pwn(111) : error 001: expected token: ";", but found "]"

C:\Documents and Settings\Kompaz\Desktop\spidas.pwn(111) : error 029: invalid expression, assumed zero

C:\Documents and Settings\Kompaz\Desktop\spidas.pwn(111) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

4 Errors.

111 eilute parodyk

Dalintis šį pranešimą


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


wa 111 eilute

vehicleDB[vehicleid][prav] = final_speed;

jeigu kuri į FS o pagal eilutes matau kad į FS tai tau ir nenuskaitys nes vehicleDB yra data aplanke jei GRP tad gauni kurti į gamemoda, beto FS nekurk geriau jie krauna serveri

Dalintis šį pranešimą


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

Komentuoti gali tik prisijungę nariai

Jeigu turite paskyrą, prisijunkite

Sukurti paskyrą

Sukurkite paskyrą mūsų forume

Registruotis

Prisijungti

Turite paskyrą? Prisijunkite

Prisijungti dabar

  • Narių peržiūri šį forumą:   0 nariai

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


  • SuperGames programele
  • SuperGames programele


×