Gang cars can only use gang members - 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: Gang cars can only use gang members (
/showthread.php?tid=443904)
Gang cars can only use gang members -
Hotbrain - 14.06.2013
Hi.
Recently one of my friends gave me greate gamemode, but it need updates.
So, how to make to gang cars can only use gang members ?
Re: Gang cars can only use gang members -
Sandiel - 14.06.2013
1. wiki.sa-mp.com/wiki/OnPlayerEnterVehicle
2. wiki.sa-mp.com/wiki/GetVehicleModel
3. wiki.sa-mp.com/wiki/GetPlayerState
4. wiki.sa-mp.com/wiki/RemovePlayerFromVehicle
5. wiki.sa-mp.com/wiki/SendClientMessage
Upon entry, check his state (if he's a passenger, or a driver) [OPTIONAL], if he is a driver, get the vehicle model, if it matches those you've set as gang cars:
pawn Код:
if(GetVehicleModel(GetPlayerVehicleID) == X) // with X being the car ID you want restricted.
{
// Remove him from vehicle, and send him a warning message saying he can't drive this car.
}
Hope this helps.