Guest User

cmd of trackcar

a guest
Jan 20th, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.65 KB | None | 0 0
  1. CMD:trackcar(playerid, params[])
  2. {
  3.     new str[500];
  4.     new count=0;
  5.     for (new i = 0; i < MAX_DYNAMIC_CARS; i++)
  6.     {
  7.         if(Car_IsOwner(playerid, i))
  8.         {
  9.         new float:fX,float:fY,float:fZ;
  10.         GetVehiclePos(CarData[i][carVehicle], fX, fY, fZ);
  11.         new str2[128];
  12.         format(str2,sizeof(str2)," %s | Location: %s \n", ReturnVehicleModelName(CarData[i][carModel]),GetLocation(fX, fY, fZ));
  13.         strcat(str, str2);
  14.         count++;
  15.         }
  16.     }
  17.     if(count==0)
  18.     {
  19.       SendClientMessage(playerid, COLOR_WHITE, "You don't own any vehicles.");
  20.     }
  21.     else{
  22.        ShowPlayerDialog(playerid, 557,DIALOG_STYLE_LIST,"Select a car to get it's location",str,"Track","Exit");
  23.     }
  24.     return 1;
  25. }
Add Comment
Please, Sign In to add comment