S3M Posted June 4, 2012 Share Posted June 4, 2012 createBlip ( 2480.8781738281,-1536.7038574219,24.189489364624, 60 ) local MarkerTaxi2 = createMarker( 2478.3999023438, -1513.6999511719, 23.10000038147, "cylinder", 4, 255, 255, 255, 15) local Taxigate1 = createObject(994, 2475.3000488281, -1514.4000244141, 23) function MarkerHit1(hitElement, matchingDimension) if getElementType(hitElement) == "player" then local vehicle = getPedOccupiedVehicle ( player ) if vehicle or not vehicle then local skin = getElementModel ( player ) if skin == 255 then moveObject(Taxigate1, 3000, 2475.3000488281, -1514.4000244141, 22.1 ) end end end end addEventHandler ( "onMarkerHit", MarkerTaxi2, MarkerHit1 ) function MarkerLeave1(leaveElement, matchingDimension) if getElementType(hitElement) == "player" then local vehicle = getPedOccupiedVehicle ( player ) if vehicle or not vehicle then local skin = getElementModel ( player ) if skin == 255 then moveObject(Taxigate1, 3000, 2475.3000488281, -1514.4000244141, 23) end end end end addEventHandler ( "onMarkerLeave", MarkerTaxi2, MarkerLeave1 ) What i do wrong? The gates want go down iff player have driver skin 255 Link to comment
Castillo Posted June 4, 2012 Share Posted June 4, 2012 You're getting the skin and vehicle from an invalid player element, your argument name is: "hitElement", not "player". Link to comment
Cyandie Posted June 4, 2012 Share Posted June 4, 2012 Also when showing MTA:SA Scripting Code ( Lua Scripting ) please us the Lua Tags. and when you do you will get something like this function testCommand( thePlayer ) outputChatBox("Hello there Player", thePlayer, 214, 283, 135) end addCommandHandler("testCommand", testCommand) Link to comment
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