10.04.2015, 17:34
It is from these threads https://sampforum.blast.hk/showthread.php?tid=274578
You need to insert a player on the first free seat in the vehicle, but to throw it to the last seat.
Код:
public PutPlayerInEmptyVehicleSeat(vehicleid,playerid) { new bool:Seat[4]; foreach (new i : Player) { if(IsPlayerConnected(i)) { if(IsPlayerInVehicle(i,vehicleid)) { if(GetPlayerVehicleSeat(i) == 0) Seat[0] = true; if(GetPlayerVehicleSeat(i) == 1) Seat[1] = true; if(GetPlayerVehicleSeat(i) == 2) Seat[2] = true; if(GetPlayerVehicleSeat(i) == 3) Seat[3] = true; } } } for(new a;a<sizeof(Seat);a++) { if(Seat[a] == false) PutPlayerInVehicle(playerid,vehicleid,a); } return 1; }