DonPro Posted November 30, 2014 Share Posted November 30, 2014 hi, i got this script that create vehicles to an ACL group but i realy like it to allow passangers to enter vehicles. vehicle1 = createVehicle ( 431 , 1080.7998046875, -1775.599609375, 13.60000038147, 0, 0, 270 ) vehicle = createVehicle ( modelID, x, y, z, rotX, rotY, rotZ ) state = setVehicleDoorState ( vehicle, 255, 0, 0 ) setVehicleDamageProof ( vehicle, true ) setVehicleColor(vehicle1,191,76,0 , 27,27,27 ) function lockPrivate( player, seat, jacked ) local accName = getAccountName ( getPlayerAccount ( player ) ) if ( not isObjectInACLGroup ( "user."..accName, aclGetGroup ( "Vasity Bus" ) ) ) then cancelEvent ( ) outputChatBox ( "This vehicle belongs to Vasity Bus Services", player, 255, 0, 0, false ) else outputChatBox ( "", player, 255, 0, 0, false ) end end addEventHandler ( "onVehicleStartEnter", vehicle1, lockPrivate ) Link to comment
MTA Team 0xCiBeR Posted November 30, 2014 MTA Team Share Posted November 30, 2014 Just use the seat argument. vehicle1 = createVehicle ( 431 , 1080.7998046875, -1775.599609375, 13.60000038147, 0, 0, 270 ) vehicle = createVehicle ( modelID, x, y, z, rotX, rotY, rotZ ) state = setVehicleDoorState ( vehicle, 255, 0, 0 ) setVehicleDamageProof ( vehicle, true ) setVehicleColor(vehicle1,191,76,0 , 27,27,27 ) function lockPrivate( player, seat, jacked ) if seat == 0 then local accName = getAccountName ( getPlayerAccount ( player ) ) if ( not isObjectInACLGroup ( "user."..accName, aclGetGroup ( "Vasity Bus" ) ) ) then cancelEvent ( ) outputChatBox ( "This vehicle belongs to Vasity Bus Services", player, 255, 0, 0, false ) else outputChatBox ( "", player, 255, 0, 0, false ) end end end addEventHandler ( "onVehicleStartEnter", vehicle1, lockPrivate ) Link to comment
DonPro Posted November 30, 2014 Author Share Posted November 30, 2014 Just use the seat argument. vehicle1 = createVehicle ( 431 , 1080.7998046875, -1775.599609375, 13.60000038147, 0, 0, 270 ) vehicle = createVehicle ( modelID, x, y, z, rotX, rotY, rotZ ) state = setVehicleDoorState ( vehicle, 255, 0, 0 ) setVehicleDamageProof ( vehicle, true ) setVehicleColor(vehicle1,191,76,0 , 27,27,27 ) function lockPrivate( player, seat, jacked ) if seat == 0 then local accName = getAccountName ( getPlayerAccount ( player ) ) if ( not isObjectInACLGroup ( "user."..accName, aclGetGroup ( "Vasity Bus" ) ) ) then cancelEvent ( ) outputChatBox ( "This vehicle belongs to Vasity Bus Services", player, 255, 0, 0, false ) else outputChatBox ( "", player, 255, 0, 0, false ) end end end addEventHandler ( "onVehicleStartEnter", vehicle1, lockPrivate ) so if seat == 0 then i can put 30 seats there and i can have 30 people enter the bus to or? Link to comment
MTA Team 0xCiBeR Posted November 30, 2014 MTA Team Share Posted November 30, 2014 (edited) No, the modification i made was that if it's not the drivers seat, it doesn't make the check, so any player can join the passenger seat even if they do not belong to the ACL. Also this has a wrong syntax: state = setVehicleDoorState ( vehicle, 255, 0, 0 ) Edited November 30, 2014 by Guest Link to comment
DonPro Posted November 30, 2014 Author Share Posted November 30, 2014 No, the modification i made was that if it's not the drivers seat, it doesn't make the check, so any player can join the passenger seat even if they do not belong to the ACL. yeah, thanks its worked im so happy now ty Link to comment
MTA Team 0xCiBeR Posted November 30, 2014 MTA Team Share Posted November 30, 2014 No problem. 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