Advertisement
Shiny_

Untitled

Sep 27th, 2013
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.25 KB | None | 0 0
  1.     int c_PSD::IsVehiclePlaneOrHelicopter(int vehicleid) {
  2.         if(vehicleid == 417) {
  3.             return true;
  4.         } else if(vehicleid == 425) {
  5.             return true;
  6.         } else if(vehicleid == 447) {
  7.             return true;
  8.         } else if(vehicleid == 460) {
  9.             return true;
  10.         } else if(vehicleid == 464) {
  11.             return true;
  12.         } else if(vehicleid == 465) {
  13.             return true;
  14.         } else if(vehicleid == 469) {
  15.             return true;
  16.         } else if(vehicleid == 476) {
  17.             return true;
  18.         } else if(vehicleid == 487) {
  19.             return true;
  20.         } else if(vehicleid == 488) {
  21.             return true;
  22.         } else if(vehicleid == 497) {
  23.             return true;
  24.         } else if(vehicleid == 501) {
  25.             return true;
  26.         } else if(vehicleid == 511) {
  27.             return true;
  28.         } else if(vehicleid == 512) {
  29.             return true;
  30.         } else if(vehicleid == 513) {
  31.             return true;
  32.         } else if(vehicleid == 519) {
  33.             return true;
  34.         } else if(vehicleid == 520) {
  35.             return true;
  36.         } else if(vehicleid == 539) {
  37.             return true;
  38.         } else if(vehicleid == 553) {
  39.             return true;
  40.         } else if(vehicleid == 548) {
  41.             return true;
  42.         } else if(vehicleid == 563) {
  43.             return true;
  44.         } else if(vehicleid == 577) {
  45.             return true;
  46.         } else if(vehicleid == 592) {
  47.             return true;
  48.         } else if(vehicleid == 593) {
  49.             return true;
  50.         } else {
  51.             return false;
  52.         }
  53.     }
  54.  
  55.     PUBLIC OnPlayerUpdate(int playerid) {
  56.         GetPlayerName(playerid, PSD.Name[playerid], sizeof(PSD.Name[playerid]));
  57.         GetVehicleHealth(GetPlayerVehicleID(playerid), &PSD.Health[playerid]);
  58.         GetVehicleZAngle(GetPlayerVehicleID(playerid), &PSD.Angle[playerid]);
  59.  
  60.         if(IsPlayerInAnyVehicle(playerid)) {
  61.             if(PSD.IsVehiclePlaneOrHelicopter(GetPlayerVehicleID(playerid))) {
  62.                 sprintf(PSD.str[playerid], "\n[%s]\n%0.0f KMH > < ALT %0.0f\n%0.1f/1000.0", &gVehicleNames[GetVehicleModel(GetPlayerVehicleID(playerid)) - 400], PSD.GetSpeed(playerid), PSD.Angle[playerid], PSD.Health[playerid]);
  63.                 UpdatePlayer3DTextLabelText(playerid, PSD.Speed3DText[playerid], -1, PSD.str[playerid]);
  64.             } else {
  65.                 sprintf(PSD.str[playerid], "\n[%s]\n%0.1f km/h\n%0.1f/1000.0", &gVehicleNames[GetVehicleModel(GetPlayerVehicleID(playerid)) - 400], PSD.GetSpeed(playerid), PSD.Health[playerid]);
  66.                 UpdatePlayer3DTextLabelText(playerid, PSD.Speed3DText[playerid], -1, PSD.str[playerid]);
  67.             }
  68.         }
  69.         return true;
  70.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement