Get Car Pos
#8



  1. The 'u' specifier in sscanf is for players, not for vehicles. It will check if there's someone with playerid 80, which there isn't.
  2. The '%d' specifier in format is for integers. The position and the angle of a vehicle are point numbers, or Floats. These have to be specified with '%f' instead of '%d'.
  3. It might be a good idea to check if the vehicle ID does actually exist, before you check it's position. There's a hidden native called 'IsValidVehicle'. If you want to use this, you need to add this to the top of your script:
    Код:
    native IsValidVehicle(vehicleid);
Edit: For your last question; the vehicle id it just an integer, so '%d' or '%i' will both work just fine. More information about format here.
Reply


Messages In This Thread
Get Car Pos - by Stefand - 13.10.2012, 13:17
Re : Get Car Pos - by lelemaster - 13.10.2012, 13:19
Re: Get Car Pos - by gtakillerIV - 13.10.2012, 13:22
Re: Get Car Pos - by Stefand - 13.10.2012, 13:26
Re: Get Car Pos - by fordawinzz - 13.10.2012, 13:28
Re: Get Car Pos - by Stefand - 13.10.2012, 13:31
Re: Get Car Pos - by Stefand - 13.10.2012, 13:33
Re: Get Car Pos - by Basssiiie - 13.10.2012, 13:36
Re: Get Car Pos - by Stefand - 13.10.2012, 13:42
Re: Get Car Pos - by Basssiiie - 13.10.2012, 13:44

Forum Jump:


Users browsing this thread: 1 Guest(s)