How to check if a vehicle is being used?
#1

THe title says all. How can i check if a vehicle is being used? Thanks.
Reply
#2

DELETED.
Reply
#3

If you're going to need this frequently, then I would suggest creating a global MAX_VEHICLES array and setting the index to the playerid when he enters the vehicle. e.g.

pawn Код:
VehicleOccupied[vehicleid] = playerid;
Otherwise, just do a loop.
pawn Код:
for(new i; i < MAX_PLAYERS; i++)
    if(IsPlayerInVehicle(i, vehicleid)) return i;
Reply
#4

It's only for my First Person Driver script, so when i /rec(RespawnCar) it will automaticly set camera behind if there is someone inside.

It works i think.
Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)