SA-MP Forums Archive
[FilterScript] Disable modded vehicle seats - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Disable modded vehicle seats (/showthread.php?tid=618019)



Disable modded vehicle seats - Abagail - 29.09.2016

This script disallows players from using vehicle seats not originally in the game. In other words, if a player installs a vehicle modification adding two more seats to a Sadler, and tries to enter one of the back seats, they'll be removed from the vehicle. The maximum amount of seats for each vehicle should be accurate, however if you find one that isn't feel free to reply below.

Credits to Crayder/Emmet for the maximum seat data.
Pastebin:



Re: Disable modded vehicle seats - SickAttack - 29.09.2016

What does 500 mean?


Re: Disable modded vehicle seats - Crayder - 29.09.2016

Quote:
Originally Posted by Abagail
Посмотреть сообщение
The maximum amount of seats for each vehicle should be accurate, however if you find one that isn't feel free to reply below.
lol...

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
What does 500 mean?
500 doesn't seem very accurate to me. Also, where is the maximum of the bus seats (or is that what the 500 is)?



Emmet's was as follows:
pawn Код:
stock GetVehicleModelSeats(modelid)
{
    static const s_VehicleSeats[] =
    {
        4, 2, 2, 2, 4, 4, 1, 2, 2, 4, 2, 2, 2, 4, 2, 2, 4, 2, 4, 2, 4, 4, 2, 2, 2, 1, 4, 4, 4, 2,
        1, 7, 1, 2, 2, 0, 2, 7, 4, 2, 4, 1, 2, 2, 2, 4, 1, 2, 1, 0, 0, 2, 1, 1, 1, 2, 2, 2, 4,
        4, 2, 2, 2, 2, 1, 1, 4, 4, 2, 2, 4, 2, 1, 1, 2, 2, 1, 2, 2, 4, 2, 1, 4, 3, 1, 1, 1, 4, 2,
        2, 4, 2, 4, 1, 2, 2, 2, 4, 4, 2, 2, 1, 2, 2, 2, 2, 2, 4, 2, 1, 1, 2, 1, 1, 2, 2, 4, 2, 2,
        1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 4, 1, 1, 1, 2, 2, 2, 2, 7, 7, 1, 4, 2, 2, 2, 2, 2, 4, 4,
        2, 2, 4, 4, 2, 1, 2, 2, 2, 2, 2, 2, 4, 4, 2, 2, 1, 2, 4, 4, 1, 0, 0, 1, 1, 2, 1, 2, 2, 1, 2,
        4, 4, 2, 4, 1, 0, 4, 2, 2, 2, 2, 0, 0, 7, 2, 2, 1, 4, 4, 4, 2, 2, 2, 2, 2, 4, 2, 0, 0, 0,
        4, 0, 0
    };
    return (modelid < 400 || modelid > 611) ? (0) : (s_VehicleSeats[(modelid - 400)]);
}



Re: Disable modded vehicle seats - Abagail - 30.09.2016

I used data from a post I came across somewhere a while ago, not sure where it exactly was. The 500 is likely the amount for bus/coach, I've updated the main post using Emmets data anyway, thanks for posting it.