Black2 Posted April 15, 2016 Share Posted April 15, 2016 Hello, I found this race script and it works to hit the mark, but leave the marking and is well away from her the race starts, I want you to work only when the marking, Can anyone help me? Thank you very much in advance I do not know how, maybe if it is false setElementData (hitElement, "race_isSignedUp", true) for setElementData (hitElement, "race_isSignedUp", false) but I could not someone have any idea, thx function onSignUpMarkerHit( hitElement ) if getElementType ( hitElement ) == "player" then if not getElementData ( hitElement, "race_isSignedUp" ) then if getPedOccupiedVehicle ( hitElement ) then if getVehicleController ( getPedOccupiedVehicle ( hitElement ) ) == hitElement then local playerTeamName = getTeamName ( getPlayerTeam( hitElement ) ) if not copTeams[playerTeamName] then table.insert ( signedUpPlayers, hitElement ) exports.DENdxmsg:createNewDxMessage ( hitElement, "You succesfully signed up!", 0, 255, 0 ) setElementData ( hitElement, "race_isSignedUp", true ) else exports.DENdxmsg:createNewDxMessage ( hitElement, "Law can't sign up for a street race!", 255, 0, 0 ) end end else exports.DENdxmsg:createNewDxMessage ( hitElement, "You need a vehicle to sign up!", 255, 0, 0 ) end end end end Link to comment
Seba500PLK Posted April 15, 2016 Share Posted April 15, 2016 maybe check function onSignUpMarkerHit( hitElement ) if getElementType ( hitElement ) == "player" then --if not getElementData ( hitElement, "race_isSignedUp" ) then if getPedOccupiedVehicle ( hitElement ) then if getVehicleController ( getPedOccupiedVehicle ( hitElement ) ) == hitElement then local playerTeamName = getTeamName ( getPlayerTeam( hitElement ) ) if not copTeams[playerTeamName] then table.insert ( signedUpPlayers, hitElement ) exports.DENdxmsg:createNewDxMessage ( hitElement, "You succesfully signed up!", 0, 255, 0 ) -- setElementData ( hitElement, "race_isSignedUp", true ) else exports.DENdxmsg:createNewDxMessage ( hitElement, "Law can't sign up for a street race!", 255, 0, 0 ) end end else exports.DENdxmsg:createNewDxMessage ( hitElement, "You need a vehicle to sign up!", 255, 0, 0 ) end --end end end 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