Advertisement
Guest User

Untitled

a guest
Feb 14th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.84 KB | None | 0 0
  1. //////////////////////////////Mode/////////
  2. SetGameModeText("RPG v1.1");
  3. ///////////////////////////// Speed//////////////
  4. function Checkvehinfo(i) {
  5. if(GetPlayerState(i) == PLAYER_STATE_DRIVER && InDealer[i] == 0) {
  6. if(InRaceArena[i] == 1 && RaceStarted == 0) return 1;
  7.  
  8. new
  9. status[180], str[256], benzina[64],
  10. engine,lights,alarm,doors,bonnet,boot,objective,
  11. vehicle = GetPlayerVehicleID(i), spe = Carspeed(i), carid = FindSpawnID(vehicle);
  12.  
  13. GetVehicleParamsEx(vehicle,engine,lights,alarm,doors,bonnet,boot,objective);
  14.  
  15. if(doors == 1) { status = "Doors: ~r~Locked~w~~h~"; }
  16. else if(doors == 0) { status = "Doors: ~w~Unlocked~w~~h~"; }
  17. else status = "Doors: ~w~Unlocked~w~~h~";
  18.  
  19. if(Gas[vehicle] > 20) format(benzina, sizeof(benzina), "%d", Gas[vehicle]);
  20. else format(benzina, sizeof(benzina), "~r~%d", Gas[vehicle]);
  21.  
  22. if(CarInfo[carid][cID] != -2 && carid != 0 && !IsAPlane(vehicle)) {
  23. if(!IsABike(vehicle) && !IsAPlane(vehicle)) format(str, sizeof(str), "Speed: ~r~%d~w~~h~ km/h~w~~h~~n~Odometer: %.2f~n~Radio: %s~n~%s~n~Fuel: %s%s", spe, CarInfo[carid][KM], GetVehicleRadio(vehicle), status, benzina, "%");
  24. else format(str, sizeof(str), "Speed: ~r~%d~w~~h~ km/h~n~Odometer: %.2f~n~Radio: %s~n~%s", spe, CarInfo[carid][KM], GetVehicleRadio(vehicle), status);
  25. PlayerTextDrawSetString(i, Speedo, str);
  26. PlayerTextDrawShow(i, Speedo);
  27. }
  28. else {
  29. if(!IsABike(vehicle) && !IsAPlane(vehicle)) format(str, sizeof(str), "Speed: ~r~%d~w~~h~ km/h~w~~h~~n~Radio: %s~n~%s~n~Fuel: %s%s", spe, GetVehicleRadio(vehicle), status, benzina, "%");
  30. else format(str, sizeof(str), "Speed: ~r~%d~w~~h~ km/h~n~Radio: %s~n~%s", spe, GetVehicleRadio(vehicle), status);
  31. PlayerTextDrawSetString(i, Speedo, str);
  32. PlayerTextDrawShow(i, Speedo);
  33. }
  34. }
  35. return 1;
  36. }
  37.  
  38. ///////////////////// Erorile astea le primesc cand pornesc serverul////////////
  39. [21:28:09] [debug] Run time error 4: "Array index out of bounds"
  40. [21:28:09] [debug] Accessing element at index 25 past array upper bound 24
  41. [21:28:09] [debug] AMX backtrace:
  42. [21:28:09] [debug] #0 002c6024 in public load_apartaments () from beta.amx
  43. [21:28:09] [debug] #1 000a7730 in ?? () from beta.amx
  44. [21:28:09] [debug] #2 000286c0 in public L_AFK_OnGM () from beta.amx
  45. [21:28:09] [debug] #3 native CallLocalFunction () from samp03svr
  46. [21:28:09] [debug] #4 00018c00 in public SSCANF_OnGameModeInit () from beta.amx
  47. [21:28:09] [debug] #5 00012fb0 in public Itter_OnGameModeInit () from beta.amx
  48. [21:28:09] [debug] #6 native CallLocalFunction () from samp03svr
  49. [21:28:09] [debug] #7 000120d4 in public ScriptInit_OnGameModeInit () from beta.amx
  50. [21:28:09] [debug] #8 00011058 in public PZone_OnGameModeInit () from beta.amx
  51. [21:28:09] [debug] #9 native CallLocalFunction () from samp03svr
  52. [21:28:09] [debug] #10 00006cbc in public OnGameModeInit () from beta.amx
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement