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)