-Xero Posted March 21, 2018 Posted March 21, 2018 Hi everyone, i found a script with works on team system, i edited the script to work with gang system, but dont work, the player can enter in the vehicle without being in the gang.. here is the code.. Kami = { createVehicle ( 422, -1217.5534667969, 1830.9927978516, 46.3984375, 0, 0, 0 ), } for i,car in ipairs(Kami) do setElementData(car,"Gang","kami") end addEventHandler("onVehicleStartEnter", root, function(player) local gangName = getPlayerGang(player) and getGangName(getPlayerGang(player)) if gangName ~= getElementData(source,"Gang") then cancelEvent() end end)
AHMED MOSTAFA Posted March 21, 2018 Posted March 21, 2018 4 hours ago, -Xero said: Hi everyone, i found a script with works on team system, i edited the script to work with gang system, but dont work, the player can enter in the vehicle without being in the gang.. here is the code.. Kami = { createVehicle ( 422, -1217.5534667969, 1830.9927978516, 46.3984375, 0, 0, 0 ), } for i,car in ipairs(Kami) do setElementData(car,"Gang","kami") end addEventHandler("onVehicleStartEnter", root, function(player) local gangName = getPlayerGang(player) and getGangName(getPlayerGang(player)) if gangName ~= getElementData(source,"Gang") then cancelEvent() end end) this getPlayerGang and this getGangName are not a real functions in mta
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