I need help with this!
function enterVehicle ( thePlayer, seat, jacked ) -- when a player enters a vehicle
if getElementType ( thePlayer ) == "player" then
local p = getTeamName(getPlayerTeam(thePlayer))
if (p == "xd") then
else
removePedFromVehicle( thePlayer )-- force the player out of the vehicle
--Here's the problem! ^^^^^^
end
end
end
addEventHandler ( "onVehicleEnter", getRootElement(), enterVehicle )
It works fine but it's a bit 'ugly' that. i saw in a server that when you try to enter in a vehicle of police and u aren't police, you can't just enter. But with this script the problem is that you can enter, and when u are in the vehicle, and not in the team, it just spawns you up of the vehicle. that's a bit ugly =/ can't i do that he can't just enter?