vehicle seat question - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: vehicle seat question (
/showthread.php?tid=284210)
vehicle seat question -
Tigerkiller - 18.09.2011
hi.
i wanted to make a function like GetFreeVehicleSeat(vehicleid);
but how to make it ?
but it must check if it a 4 door etc pls help
ik the function GetVehileSeat but idk how to make this function maybe for a grab cmd
Re: vehicle seat question -
=WoR=Varth - 18.09.2011
Loop all players check if they're inside the vehicle, then get their vehicle seat.
Re: vehicle seat question -
Tigerkiller - 18.09.2011
can you make me the func plls ?
Re: vehicle seat question -
wouter0100 - 18.09.2011
pawn Код:
stock GetEmptyVehicleSeat(vehicleid)
{
new bool:Seat[4];
for(new i;i<MAX_PLAYERS;i++)
{
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) return a;
}
return -1;
}
Returns -1 if there isnt a free seat.
Re: vehicle seat question -
Tigerkiller - 18.09.2011
but what is with biikes and maybe hydra?