Renting Car system
#2

Best thing is to make a var for player for instance:
RentVehicle[MAX_PLAYERS];

When player connects:
RentVehicle[playerid] = INVALID_VEHICLE_ID;

pawn Код:
stock IsVehicleRented(vehicle)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        return true;
    }
    return false;
}
OnPlayerStateChange:
if the player is driver as a new state, use the stock above and send him the proper messages.

In /rentvehicle cmd also check if the vehicle is taken by someone else if not then just set the RentVehicle value to the vehicle id.
Reply


Messages In This Thread
Renting Car system - by TranquiliZed - 27.08.2013, 10:37
Re: Renting Car system - by PaulDinam - 27.08.2013, 11:34

Forum Jump:


Users browsing this thread: 1 Guest(s)