kuwalda Posted June 9, 2014 Share Posted June 9, 2014 (edited) I have this part of code that I am trying to fix: function testejam() destroyElement(getElementData(thePlayer, "checkpoints")) setElementData(thePlayer, "checkpoints", createMarker(..., "checkpoint", 6, 190, 156, 252, 50, thePlayer)) setMarkerTarget(getElementData(thePlayer, "checkpoints"), ... ) setElementVisibleTo(getElementData(thePlayer, "checkpoints"), root, false) setElementVisibleTo(getElementData(thePlayer, "checkpoints"), thePlayer, true) setElementData ( thePlayer, "dbid", getElementData ( thePlayer, "dbid" ) + 1 ) end if isElementVisibleTo(getElementData(thePlayer, "checkpoints"),thePlayer) then addEventHandler( "onMarkerHit", getElementData(thePlayer, "checkpoints"), testejam ) end The thing I can`t manage to fix: if 2 players have to drive through 1 checkpoint, the first one who drives through gets "dbid" value added by +2 if 3 players have checkpoint there - first one will get "dbid" +3, second "dbid" +2 and third +1 I need that it only counts your checkpoints and only adds +1 vaule every time you hit checkpoint. Where is the problem and how can I fix it? Edited June 10, 2014 by Guest Link to comment
kuwalda Posted June 11, 2014 Author Share Posted June 11, 2014 up? still can`t find a fix. 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