SA-MP Forums Archive
Vehicle ID only drive-ablo with skin ID(s) - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Vehicle ID only drive-ablo with skin ID(s) (/showthread.php?tid=215327)



Vehicle ID only drive-ablo with skin ID(s) - davelord - 23.01.2011

Hey, i was wondering, and is it possible to.. Well, i have no idea to explain this but i will try.
So, you get a vehicle ID, for example you use ID 596(police car) and if you want to enter the car with a normal skin, it says. "Sorry, only police officers can drive this kind of vehicle!" And when you wear this skin: 280(police) you wont get the message, and can enter the car without any troubles. Oh, and can i add multipe skins? Like all the normal police skins for this car, and then the sherif skins for this car, ect. Thanks alot, Davelord.


Re: Vehicle ID only drive-ablo with skin ID(s) - _Tommy - 23.01.2011

Well yeah its possible, you will need here the OnPlayerEnterVehicle function.
Check what skin the player has - for example
pawn Код:
(if GetPlayerSkin(playerid) != copskin1 || if GetPlayerSkin(playerid) != copskin2) SendClientMessage(playerid, COLOR_RED, "You are not allowed to drive this vehicle"); RemovePlayerFromVehicle(vehicleid);
Find the cop skins you want and replace them with 'copskin1' and 'copskin2'.


Re: Vehicle ID only drive-ablo with skin ID(s) - davelord - 23.01.2011

Hey, this is cool, but can i use the script two times? Well, it's for my roleplaying server, and i'll also need the medic skins and cars, so, can i use this script two times and place them underneath each other? Well, my english isnt that good, but i tried to explain it as good as i could.


Re: Vehicle ID only drive-ablo with skin ID(s) - _Tommy - 23.01.2011

I hope I understood you right.. ofcourse you can use it as many times as you want, for each vehicles, with different skins.


Re: Vehicle ID only drive-ablo with skin ID(s) - davelord - 23.01.2011

RemovePlayerFromVehicle(vehicleid); Do i need to place the vehicle id in the "(vehicleid)"? Sorry if i sound dumb but, i saw alot of different scripts with it..