mommytellme Posted March 31, 2014 Posted March 31, 2014 Cześć, witam znowu. Mam skrypt na kontrolę auta, otwieranie maski itp. Problem jest w tym że zbindowałem sobie go na Shift i funkcja działa również jeśli nie jesteśmy w aucie, a na Shifcie jest skakanie. Jak zrobić funkcję która działa tylko gdy gracz jest w pojeździe? Znalazłem coś takiego: if not (isGuestAccount (getPlayerAccount (source))) and not (isPedInVehicle(source)) then ale to jest po stronie serwera..
mommytellme Posted March 31, 2014 Author Posted March 31, 2014 Zrobiłem tak: function enableVehicleControl() if isPedInVehicle then if guiGetVisible(GUIEditor_Window[1]) == false then guiSetVisible(GUIEditor_Window[1], true) showCursor(true) else guiSetVisible(GUIEditor_Window[1], false) showCursor(false) end end end Ale niestety nie działa Żadnych błędów w debugu nie ma.
WhoAmI Posted March 31, 2014 Posted March 31, 2014 function enableVehicleControl() if isPedInVehicle ( localPlayer ) then guiSetVisible( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) showCursor( not isCursorShowing ( ) ) end end
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