toribio

toribio

May 21st, 2010
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.60 KB | None | 0 0
  1. public OnPlayerUpdate(playerid)
  2. {
  3.     new vehicleid;
  4.     if((vehicleid = GetPlayerVehicleID(playerid))
  5.     {
  6.         static trailer[MAX_VEHICLES];
  7.         if(IsTrailerAttachedToVehicle(vehicleid) && !trailer[vehicleid])
  8.         {
  9.             trailer[vehicleid] = GetVehicleTrailer(vehicleid);
  10.         }
  11.         else if(trailer[vehicleid] && GetVehicleModel(trailer[vehicleid]))
  12.         {
  13.             AttachTrailerToVehicle(trailer[vehicleid], vehicleid);
  14.         }
  15.         else if(!GetVehicleModel(trailer[vehicleid]))
  16.         {
  17.             trailer[vehicleid] = 0;
  18.         }
  19.     }
  20.     return 1;
  21. }
Add Comment
Please, Sign In to add comment