Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int c_PSD::IsVehiclePlaneOrHelicopter(int vehicleid) {
- if(vehicleid == 417) {
- return true;
- } else if(vehicleid == 425) {
- return true;
- } else if(vehicleid == 447) {
- return true;
- } else if(vehicleid == 460) {
- return true;
- } else if(vehicleid == 464) {
- return true;
- } else if(vehicleid == 465) {
- return true;
- } else if(vehicleid == 469) {
- return true;
- } else if(vehicleid == 476) {
- return true;
- } else if(vehicleid == 487) {
- return true;
- } else if(vehicleid == 488) {
- return true;
- } else if(vehicleid == 497) {
- return true;
- } else if(vehicleid == 501) {
- return true;
- } else if(vehicleid == 511) {
- return true;
- } else if(vehicleid == 512) {
- return true;
- } else if(vehicleid == 513) {
- return true;
- } else if(vehicleid == 519) {
- return true;
- } else if(vehicleid == 520) {
- return true;
- } else if(vehicleid == 539) {
- return true;
- } else if(vehicleid == 553) {
- return true;
- } else if(vehicleid == 548) {
- return true;
- } else if(vehicleid == 563) {
- return true;
- } else if(vehicleid == 577) {
- return true;
- } else if(vehicleid == 592) {
- return true;
- } else if(vehicleid == 593) {
- return true;
- } else {
- return false;
- }
- }
- PUBLIC OnPlayerUpdate(int playerid) {
- GetPlayerName(playerid, PSD.Name[playerid], sizeof(PSD.Name[playerid]));
- GetVehicleHealth(GetPlayerVehicleID(playerid), &PSD.Health[playerid]);
- GetVehicleZAngle(GetPlayerVehicleID(playerid), &PSD.Angle[playerid]);
- if(IsPlayerInAnyVehicle(playerid)) {
- if(PSD.IsVehiclePlaneOrHelicopter(GetPlayerVehicleID(playerid))) {
- 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]);
- UpdatePlayer3DTextLabelText(playerid, PSD.Speed3DText[playerid], -1, PSD.str[playerid]);
- } else {
- 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]);
- UpdatePlayer3DTextLabelText(playerid, PSD.Speed3DText[playerid], -1, PSD.str[playerid]);
- }
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement