gghvcffcv Posted June 26, 2014 Share Posted June 26, 2014 When the player is outside of the Marker "HouseRob" it gives the money to the player anyways, Other thing the debugscript says me Line 20 getelementtype bad first argument How to solve this?... HouseRob = createMarker ( 2024.5205078125, 1545.6474609375, 9.81995010376, "cylinder", 10, 255, 0, 0, 150) function Money(hitElement) if ( getElementType ( hitElement ) == "player" ) then local Criminals = getPlayerTeam ( hitElement ) if ( Criminals ) then if isElementWithinMarker(hitElement, HouseRob) then setTimer(givePlayerMoney,10000,1,hitElement, 10000) setTimer(setPlayerWantedLevel,10000,1,hitElement, 6) setTimer (destroyElement,10000,1,HouseRob) end end end end addEventHandler ("onMarkerHit", HouseRob, Money) function Otro(hitElement) if ( getElementType ( hitElement ) == "player" ) then HouseRobC = createMarker ( 2027.5205078125, 1545.6474609375, 9.81995010376, "cylinder", 10, 255, 0, 0, 150) if (markerevent == nil) then markerevent = addEventHandler ("onMarkerHit", HouseRobC, Otro) end end end addEventHandler ("onElementDestroy", HouseRob, Otro) function Otro(hitElement) if ( getElementType ( hitElement ) == "player" ) then local Criminals = getPlayerTeam ( hitElement ) if ( Criminals ) then if isElementWithinMarker(hitElement, HouseRob) then setTimer(givePlayerMoney,30000,1,hitElement, 10000) setTimer(setPlayerWantedLevel,10000,1,hitElement, 6) setTimer (destroyElement,30000,1,HouseRobC) end end end end Link to comment
Et-win Posted June 26, 2014 Share Posted June 26, 2014 And why not continueing your question in the other topic? This is your third topic already with the same script. Link to comment
ServerBoss Posted June 26, 2014 Share Posted June 26, 2014 This is server side right? And try using some indentations man, it helps read the script. Link to comment
gghvcffcv Posted June 27, 2014 Author Share Posted June 27, 2014 Et-win said: And why not continueing your question in the other topic? This is your third topic already with the same script. if you come to this topic is to help let this job to the moderators, and it's not against the rules. 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