dzek (varez) Posted January 24, 2010 Posted January 24, 2010 (edited) -- checks if player is still driving this vehicle local vehPlayer = getPedOccupiedVehicle(getLocalPlayer()) if (vehPlayer==veh) then local seat = getPedOccupiedVehicleSeat(getLocalPlayer()) outputChatBox("xd") end after doing getPedOccupiedVehicleSeat, or getPlayerOccupiedVehicleSeat my function stops working (no outputChatBox, or other).. whats wrong? Edited January 24, 2010 by Guest Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
dzek (varez) Posted January 24, 2010 Author Posted January 24, 2010 (edited) -- checks if player is still driving this vehicle local vehPlayer = getPedOccupiedVehicle(getLocalPlayer()) if (vehPlayer==veh) then local seat = getPedOccupiedVehicleSeat(getLocalPlayer()) outputChatBox("xd") end after doing getPedOccupiedVehicleSeat, or getPlayerOccupiedVehicleSeat my function stops working (no outputChatBox, or other).. whats wrong? Edited January 24, 2010 by Guest Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
Gamesnert Posted January 24, 2010 Posted January 24, 2010 I can't help to wonder: Is this script client-side, or server-side? As getLocalPlayer is client-side only, and getPedOccupiedVehicleSeat, is server-side only. Projects: Slothbot | Maximap
Gamesnert Posted January 24, 2010 Posted January 24, 2010 I can't help to wonder: Is this script client-side, or server-side? As getLocalPlayer is client-side only, and getPedOccupiedVehicleSeat, is server-side only. Projects: Slothbot | Maximap
dzek (varez) Posted January 24, 2010 Author Posted January 24, 2010 arghh, i didnt see it how to check if player is driving a vehicle, client-side? Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
dzek (varez) Posted January 24, 2010 Author Posted January 24, 2010 arghh, i didnt see it how to check if player is driving a vehicle, client-side? Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
Gamesnert Posted January 24, 2010 Posted January 24, 2010 You can do: getVehicleController(vehPlayer) OR getVehicleOccupant(vehPlayer,0) I don't exactly get why there's a getVehicleController if getVehicleOccupant can be used to do the same, but oh well. Choose whichever you want, basically they'll do the same. Projects: Slothbot | Maximap
Gamesnert Posted January 24, 2010 Posted January 24, 2010 You can do: getVehicleController(vehPlayer) OR getVehicleOccupant(vehPlayer,0) I don't exactly get why there's a getVehicleController if getVehicleOccupant can be used to do the same, but oh well. Choose whichever you want, basically they'll do the same. Projects: Slothbot | Maximap
dzek (varez) Posted January 24, 2010 Author Posted January 24, 2010 ohh, weird.. thanks Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
dzek (varez) Posted January 24, 2010 Author Posted January 24, 2010 ohh, weird.. thanks Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
50p Posted January 24, 2010 Posted January 24, 2010 ....I don't exactly get why there's a getVehicleController if getVehicleOccupant can be used to do the same, but oh well. Choose whichever you want, basically they'll do the same. Trailers don't have drivers so getVehicleOccupant will fail when you want to get "driver of the trailer". Though, getVehicleController will return the driver who tows the trailer (sitting as driver in the truck towing that trailer). Wiki says it all. - MTA Script Editor - Ask your scripting questions properly, please. - 50p's public resources - Meta.xml - what is it for? How is it possible LOL
50p Posted January 24, 2010 Posted January 24, 2010 ....I don't exactly get why there's a getVehicleController if getVehicleOccupant can be used to do the same, but oh well. Choose whichever you want, basically they'll do the same. Trailers don't have drivers so getVehicleOccupant will fail when you want to get "driver of the trailer". Though, getVehicleController will return the driver who tows the trailer (sitting as driver in the truck towing that trailer). Wiki says it all. - MTA Script Editor - Ask your scripting questions properly, please. - 50p's public resources - Meta.xml - what is it for? How is it possible LOL
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