iPanter Posted May 20, 2018 Share Posted May 20, 2018 Username: iPanter Problemă întâlnită: errors / warnings Detalii despre problemă: Primesc accele erori. Ce ai încercat să faci înainte să postezi?: Sa incerc cu for(new i = 0; i < 3; i++) PlayerTextDrawShow(playerid, Speedo); Cod sursă (recomandat pastebin.com): https://pastebin.com/TnZRkcnU Alte detalii: https://imgur.com/a/kAZdpj3 aici sunt erorile. Aveti tot in pastebine cu mai multe detalii... Link to comment Share on other sites More sharing options...
Administrator Leonard Posted May 20, 2018 Administrator Share Posted May 20, 2018 Depinde cum ai declarat tu variabila Speedo. Daca ai new Speedo[playerid][3]; Trebuie sa te folosesti de ea, nu sa o schimbi cand vrei tu. Exemplu: Linia 4423: PlayerTextDrawHide(playerid, Speedo); Linia 5281: PlayerTextDrawHide(playerid, Speedo); Linia 5340: PlayerTextDrawHide(playerid, Speedo); Tu ai pus PlayerTextDrawHide(playerid, Speedo); Dar tu ai declarat new Speedo[playerid][3]; Deci, la PlayerTextDrawHide(playerid, Speedo); trebuie sa fie PlayerTextDrawHide(playerid, Speedo[playerid][Numarul textdraw-ului pe care vrei sa-l ascunzi]); Daca vrei sa le ascunzi pe toate, faci o bucla. for( new i = 0; i < sizeof( Speedo ) ); ++i ) { PlayerTextDrawHide(playerid, Speedo[playerid][i]); } Sper ca ai inteles, de aici te descurci. www.liberty.mp Link to comment Share on other sites More sharing options...
iPanter Posted May 21, 2018 Author Share Posted May 21, 2018 (edited) Aveam: new PlayerText: Speedo[MAX_PLAYERS][3] Am inlocuit functia Checkvehinfo cu asta: Apoi am adaugat td-urile si am primit erorile alea.. function Checkvehinfo(playerid) { if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER || GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) { if(InRaceArena[playerid] == 1 && !RaceStarted) return true; new engine, lights, alarm, doors, bonnet, boot, objective, string[128]; GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective); if(CarInfo[FindSpawnID(GetPlayerVehicleID(playerid))][cID] != -2 && FindSpawnID(GetPlayerVehicleID(playerid)) != 0 &&!IsAPlane(GetPlayerVehicleID(playerid))) { if(!IsABike(GetPlayerVehicleID(playerid)) && !IsAPlane(GetPlayerVehicleID(playerid))) { format(string, sizeof string, "~%s~%d", (Carspeed(playerid) < 99) ? ("g") : ("r"), Carspeed(playerid)); TextDrawSetString(Speedo[playerid][0], string); format(string, sizeof string, "Fuel: ~%s~%d~n~~w~~h~%s~n~Odometer: %0.2f", (Gas[GetPlayerVehicleID(playerid)] > 20) ? ("g") :("r"), Gas[GetPlayerVehicleID(playerid)], (doors == 1) ? ("Doors: ~r~Locked~w~~h~") : ("Doors: ~g~Unlocked~w~~h~"), CarInfo[FindSpawnID(GetPlayerVehicleID(playerid))][KM]); TextDrawSetString(Speedo[playerid][2], string); } } else { if(!IsABike(GetPlayerVehicleID(playerid)) && !IsAPlane(GetPlayerVehicleID(playerid))) { format(string, sizeof string,, "~%s~%d", (Carspeed(playerid) < 99) ? ("g") : ("r"), Carspeed(playerid)); TextDrawSetString(Speedo[playerid][0], string); format(string, sizeof string,, "Fuel: ~%s~%d", (Gas[GetPlayerVehicleID(playerid)] > 20) ? ("g") : ("r"), Gas[GetPlayerVehicleID(playerid)]); TextDrawSetString(Speedo[playerid][2], string); } } for(new i = 0; i < 3; i++) { PlayerTextDrawShow(playerid, Speedo[playerid][i]); } } return 1; } Edited May 21, 2018 by iPanter Link to comment Share on other sites More sharing options...
iPanter Posted May 21, 2018 Author Share Posted May 21, 2018 Rezolvat. Link to comment Share on other sites More sharing options...
Administrator Leonard Posted May 21, 2018 Administrator Share Posted May 21, 2018 Problema rezolvata. Locked www.liberty.mp Link to comment Share on other sites More sharing options...
Recommended Posts