rent car
#6

<removed>

use a global variable...
soemthing like this:
Код:
new rented[MAX_VEHICLES];

public OnVehicleSpawn(vehicleid)
{
   rented[vehicleid] = 0;
   return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
   if(newstate == PLAYER_STATE_DRIVER)
   {
      new vehicleid = GetPlayerVehicleID(playerid);
      if(IsRented(vehicleid))
      {
         RemovePlayerFromVehicle(playerid);
      }
   }
   return 1;
}

stock IsRented(vehicleid)
{
   return rented[vehicleid];
}
and when a player rents a vehicle you ofc have to use:
Код:
rented[vehicleid] = 1;
Reply


Messages In This Thread
rent car - by edzis84 - 10.06.2013, 19:19
Re: rent car - by Sascha - 10.06.2013, 20:07
Re: rent car - by edzis84 - 10.06.2013, 20:16
Re: rent car - by edzis84 - 10.06.2013, 22:19
Re: rent car - by Stefand - 11.06.2013, 05:11
Re: rent car - by Sascha - 11.06.2013, 09:08

Forum Jump:


Users browsing this thread: 1 Guest(s)