All pastes #569220 Raw Edit

Stuff

public text v1 · immutable
·published 2007-06-16 01:51 UTC
rendered paste body
enum _:PVS_ENU_VEHICLE
{
PEV_PASSENGERS[PVS_MAX_PASSENGERS]
}

new pvs_Vehicles[MAX_VEHICLES][PVS_ENU_VEHICLE];
const PVS_MAX_VEHICLES = MAX_VEHICLES + 1;

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new lKeys,Keys1,Keys2;

if (vehicleid == veh_Tram)
{
GetPlayerKeys(playerid, lKeys, Keys1, Keys2);
if (lKeys & KEY_SECONDARY_ATTACK)  // will will & do that == wont?
{
	PutPlayerInVehicle(playerid, vehicleid, 0);
}
else {
for (new i = 1; i < 4; i++)
{
if (pvs_Vehicles[vehicleid][PEV_PASSENGERS+i] == INVALID_PLAYER_ID)
{
	PutPlayerInVehicle(playerid, vehicleid, i);  // why is it putting the player in i when it is checking for PEV_PASSENGERS+i ?
	pvs_Vehicles[vehicleid][PEV_PASSENGERS] = playerid;
break;
}
}
}
}
return 1;
}



// is there nothing else at all that needs to be in this code? what stops the player from entering the vehicle as driver when someone else already is? what if the player exits the vehicle, how will it reconize the player has left and make the seat available?