Guest User

Untitled

a guest
Oct 16th, 2012
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. public CheckStatus()
  2. {
  3. for(new i=0; i<MAX_PLAYERS; i++)
  4. {
  5. if(IsPlayerConnected(i))
  6. {
  7. if(IsPlayerInAnyVehicle(i))
  8. {
  9. if(TextShow[i] == false)
  10. {
  11. TextDrawShowForPlayer(i, Text:Black0);
  12. TextDrawShowForPlayer(i, Text:Black1);
  13. TextDrawShowForPlayer(i, Text:Black2);
  14. TextDrawShowForPlayer(i, Text:Black3);
  15. TextDrawShowForPlayer(i, Text:LightBlack);
  16. TextShow[i] = true;
  17. }
  18. new String[128];
  19. new Float:X, Float:Y, Float:Z, Float:Speed;
  20. new vehicle = GetPlayerVehicleID(i);
  21. GetVehicleVelocity(GetPlayerVehicleID(i), X, Y, Z);
  22. Speed = floatmul(floatsqroot(floatadd(floatadd(floatpower(X, 2), floatpower(Y, 2)), floatpower(Z, 2))), 100.0);
  23. format(String,sizeof(String),"~b~ D-Board~n~~r~Fuel: ~w~%i~n~~r~km/h: ~w~%i", Gas[vehicle], floatround(Speed, floatround_floor));
  24. if(VHSCreated[i] == true)
  25. {
  26. TextDrawDestroy(VHS[i]);
  27. }
  28. VHS[i] = TextDrawCreate(541.000000,137.000000,String);
  29. TextDrawAlignment(VHS[i],0);
  30. TextDrawBackgroundColor(VHS[i],0x000000ff);
  31. TextDrawFont(VHS[i],1);
  32. TextDrawLetterSize(VHS[i],0.299999,1.000000);
  33. TextDrawColor(VHS[i],0xffffffff);
  34. TextDrawSetOutline(VHS[i],1);
  35. TextDrawSetProportional(VHS[i],1);
  36. TextDrawSetShadow(VHS[i],1);
  37. TextDrawShowForPlayer(i, VHS[i]);
  38. VHSCreated[i] = true;
  39.  
  40. }
  41. else
  42. {
  43. if(TextShow[i] == true)
  44. {
  45. TextDrawHideForPlayer(i, Text:Black0);
  46. TextDrawHideForPlayer(i, Text:Black1);
  47. TextDrawHideForPlayer(i, Text:Black2);
  48. TextDrawHideForPlayer(i, Text:Black3);
  49. TextDrawHideForPlayer(i, Text:LightBlack);
  50. TextDrawHideForPlayer(i, Text:VHS[i]);
  51. TextShow[i] = false;
  52. }
  53. }
  54. }
  55. }
  56. }
Advertisement
Add Comment
Please, Sign In to add comment