03.08.2014, 14:56
(
Последний раз редактировалось [XST]O_x; 08.08.2014 в 06:42.
)
Quote:
Thank you all, but another question: can i check which seat id is UnOccupied (empty) ?
|
pawn Код:
stock GetFreeSeat(vehicleid)
{
foreach(new i: Player) {
if(IsPlayerInAnyVehicle(i) && GetPlayerVehicleID(i) == vehicleid) {
for(new j = 0; j < 9; j++) {
if(GetPlayerVehicleSeat(i) == j) continue;
else return j;
}
return -1;
}
}
return 1;
}