Is there a way - rep ++ question
#5

pawn Код:
public OnTrailerUpdate(playerid, vehicleid)
{
      Trailer[vehicleid] = GetVehicleTrailer(vehicleid);
      return 1;
}

public OnPlayerUpdate(playerid)
{
      new vehicleid = GetPlayerVehicleID(playerid);
      if(IsPlayerInAnyVehicle(playerid) && !IsTrailerAttachedToVehicle(vehicleid))
      {
          if(Trailer[vehicleid] != INVALID_PLAYER_ID)
          {
                 CallLocalFunction("OnTrailerDetach", "id", playerid, vehicleid, Trailer[vehicleid]);
                 Trailer[vehicleid] = INVALID_VEHICLE_ID;
                 return true;
          }
     }
     return true;
}
Then you can:
pawn Код:
public OnTrailerDetach(playerid, vehicleid, trailer)
{
       DestroyVehicle(trailer);
       return 1;
}
Reply


Messages In This Thread
Is there a way - rep ++ question - by buburuzu19 - 15.12.2014, 17:51
Re: Is there a way - rep ++ question - by Kruno88 - 15.12.2014, 17:52
Re: Is there a way - rep ++ question - by Raweresh - 15.12.2014, 17:56
Re: Is there a way - rep ++ question - by buburuzu19 - 15.12.2014, 18:27
Re: Is there a way - rep ++ question - by Abagail - 15.12.2014, 18:40
Re: Is there a way - rep ++ question - by Raweresh - 15.12.2014, 19:21
Re: Is there a way - rep ++ question - by buburuzu19 - 16.12.2014, 06:59
Re: Is there a way - rep ++ question - by buburuzu19 - 16.12.2014, 07:03
Re: Is there a way - rep ++ question - by Raweresh - 16.12.2014, 07:06
Re: Is there a way - rep ++ question - by buburuzu19 - 16.12.2014, 07:17

Forum Jump:


Users browsing this thread: 1 Guest(s)