Advertisement
TheGamingChief

Untitled

Aug 10th, 2015
370
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. SpeedGun_init = {
  2. SG_ON = if (isNil "SG_ON") then { true } else {not(SG_ON)};
  3. private["_state"];
  4. _state = if (SG_ON) then { "ON" } else { "OFF" };
  5. player globalChat format["Speed Gun: %1", SG_ON];
  6. };
  7.  
  8. SpeedGun_loop = {
  9. private["_vehicle", "_bool", "_target", "_string", "_speed", "_speedS"];
  10.  
  11. if (not(iscop)) exitWith {};
  12.  
  13. while {true} do {
  14. if (SG_ON && iscop && INV_shortcuts) then {
  15. _vehicle = vehicle player;
  16. _bool = (_vehicle != player) && (driver _vehicle == player);
  17.  
  18. if (_bool) then {
  19. _target = cursorTarget;
  20. _string = "";
  21. if (_target isKindOf "LandVehicle") then {
  22. _speed = speed _target;
  23. _speedS = if(_speed > 200) then {"Over 200 kmph"} else {format["%1 kmph", _speed]};
  24. _string = format["SPEED- %1 VEHICLE- %2", _speedS, _target];
  25. }
  26. else {
  27. _string = "INVALID TARGET";
  28. };
  29. titleText[_string, "plain down", 0.1];
  30. }
  31. else {
  32. SG_ON = false;
  33. };
  34. };
  35. sleep 0.1;
  36. };
  37. };
  38.  
  39. [] spawn SpeedGun_loop;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement