How to detect differfent trailers?
#1

**DELETE
Reply
#2

pawn Код:
if(GetVehicleModel(GetVehicleTrailer(GetPlayerVehicleID(playerid))) == 584)
Checks in this case for the trailer ID 584. Than does it depends how you load the missions, if they have a clearly ID for the load (Box, Petro, Dirt) can you ask if the trailer id and the clearly setted ID.

Like this:

pawn Код:
if(GetVehicleModel(GetVehicleTrailer(GetPlayerVehicleID(playerid))) == 584 && ClealyID[Missions]==LoadID)
Reply
#3

**DELETE
Reply
#4

How i said, you will need to use a clearly ID for the Loads, that all Boxtrailer missions has one id, all Petrotrailer missions another and all Dirttrailer missions also another ID.

like this (Pseudocode):

pawn Код:
enum TrailerMissions
{
    ID,X,Y,Z,Name,UnloadX,UnloadY,UnloadZ,UnloadName
}
While ID changes ONLY than when another Trailer should be taken.

If you want to use more than one enum (for each trailer one). Than does you need only to ask for the TrailerID and load than in the next step from the correct enum.
Reply
#5

**DELETE
Reply
#6

**DELETE
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)