SA-MP Forums Archive
Problem with declaring vehicle ID - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problem with declaring vehicle ID (/showthread.php?tid=579484)



Problem with declaring vehicle ID - Sc0pion - 27.06.2015

Fixed!


Respuesta: Problem with declaring vehicle ID - [DOG]irinel1996 - 27.06.2015

Change
pawn Код:
vehicle = GetPlayerVehicleID(playerid);
to
pawn Код:
vehicle = GetVehicleModel(GetPlayerVehicleID(playerid));
Check AddStaticVehicle/AddStaticVehicleEx/CreateVehicle, they return an ID to identify the vehicle they created. GetPlayerVehicleID returns the ID given by those functions, not the Model ID. Use GetVehicleModel to get the Model ID.

Best regards.


Re: Respuesta: Problem with declaring vehicle ID - Sc0pion - 27.06.2015

Fixed!


Respuesta: Problem with declaring vehicle ID - [DOG]irinel1996 - 27.06.2015

Well... I see you use CreateDynamicCP from Incognito's Streamer... then you should use CreateDynamicRaceCP and move the script from OnPlayerEnterDynamicCP to OnPlayerEnterDynamicRaceCP.


Re: Respuesta: Problem with declaring vehicle ID - Sc0pion - 27.06.2015

Fixed!