Trying to attach a trailer on my job system
#2

You need to use else if statements or use returns. The IsTrailerAttachedToVehicle function also uses vehicle IDs, not vehicle models. Example:
pawn Код:
if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid))
{
     // put code here
}
else SendClientMessage(playerid, -1, "You do not have a trailer attached!");
Or method 2:
pawn Код:
if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid))
{
      // put code here
      return 1;
}

SendClientMessage(playerid, -1, "You do not have a trailer attached.");
return 1;
}
Reply


Messages In This Thread
Trying to attach a trailer on my job system - by garploit - 09.06.2017, 19:46
Re: Trying to attach a trailer on my job system - by Abagail - 09.06.2017, 20:45
Re: Trying to attach a trailer on my job system - by Pottus - 09.06.2017, 20:55

Forum Jump:


Users browsing this thread: 1 Guest(s)