waqaarali Posted July 14, 2013 Share Posted July 14, 2013 So I made a LSPD Team and I mapped a few Police cars but I only want the police skin to enter police car I forget the function/code for it.... Link to comment
ViRuZGamiing Posted July 14, 2013 Share Posted July 14, 2013 --Use this getElementModel setVehicleLocked isVehicleLocked Maybe "outputChatbox" or a "DxDraw" Link to comment
waqaarali Posted July 14, 2013 Author Share Posted July 14, 2013 Can you give an example .... Link to comment
Moderators IIYAMA Posted July 14, 2013 Moderators Share Posted July 14, 2013 If he does, he is making it for you..... Requests are not allowed here. You should read wiki mta and make it your self. It is isn't a big deal. Link to comment
waqaarali Posted July 14, 2013 Author Share Posted July 14, 2013 skinid = getElementModel(source) carid = getElementModel(596) if skinid==280 or skinid==281 or skinid==282 and carid==596 or carid==598 or carid==597 and isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "police" ) ) then else setVehicleLocked ( 596, true ) setVehicleLocked ( 598, true ) setVehicleLocked ( 597, true ) end is it this? Link to comment
Moderators IIYAMA Posted July 14, 2013 Moderators Share Posted July 14, 2013 Where is your event? Your function? Btw: carid = getElementModel(vehicle) -- not a car id. -- and if (skinid==280 or skinid==281 or skinid==282 and carid==596 or carid==598 or carid==597) and isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "police" ) ) then Link to comment
waqaarali Posted July 14, 2013 Author Share Posted July 14, 2013 function vehicle() carid = getElementModel(vehicle) -- not a car id. -- and if (skinid==280 or skinid==281 or skinid==282 and carid==596 or carid==598 or carid==597) and isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "police" ) ) then else setVehicleLocked ( 596, true ) setVehicleLocked ( 598, true ) setVehicleLocked ( 597, true ) end addEventHandler("isVehicleLocked",vehicle) So is it like this? Link to comment
Moderators IIYAMA Posted July 14, 2013 Moderators Share Posted July 14, 2013 no. use: https://wiki.multitheftauto.com/wiki/OnVehicleEnter setVehicleLocked ( 596, true ) a number isn't a vehicle. Link to comment
ViRuZGamiing Posted July 14, 2013 Share Posted July 14, 2013 An resource as example: https://community.multitheftauto.com/index.php?p= ... ls&id=4083 Link to comment
iMr.3a[Z]eF Posted July 14, 2013 Share Posted July 14, 2013 no.use: https://wiki.multitheftauto.com/wiki/OnVehicleEnter setVehicleLocked ( 596, true ) a number isn't a vehicle. No, onVehicleStartEnter Link to comment
ViRuZGamiing Posted July 15, 2013 Share Posted July 15, 2013 onVehicleEnter is good enough for a Noob Scripter Link to comment
Moderators IIYAMA Posted July 15, 2013 Moderators Share Posted July 15, 2013 BiiLLY +1 Well onVehicleStartEnter can be canceled, but you can also remove the player from the vehicle by using removePedFromVehicle after onVehicleEnter. It is just what you want. Link to comment
ViRuZGamiing Posted July 15, 2013 Share Posted July 15, 2013 BiiLLY +1Well onVehicleStartEnter can be canceled, but you can also remove the player from the vehicle by using removePedFromVehicle after onVehicleEnter. It is just what you want. This is done on a Reallife Server where I played on... so I'll suggest to use that. Link to comment
iMr.3a[Z]eF Posted July 15, 2013 Share Posted July 15, 2013 So, they aren't different events. Link to comment
Moderators IIYAMA Posted July 15, 2013 Moderators Share Posted July 15, 2013 So, they aren't different events. They are but a scripter always have a choose. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now