PaulDK Posted January 18, 2015 Share Posted January 18, 2015 http://data2.whicdn.com/images/157778185/large.jpg please help me to create properties that gives money. command: sell* buy* function: if you buy the properties it will gives money every 2 minutes to 3 minutes if you are online. but if you are offline the text will draw - Owner: offline $100000 . but example you are online and your name is PauLXD it will appear - Owner: PauLXD $100000 . if you already buy the property it will not buy again and the outputchatbox will say that you already buy that property but if it's not you will buy it. if does anyone buy the property it will turn to red blip but if its not it will turns to green. no owner = green. have owner = red . Owner:None . Owner:Paul $100,000 $100,000 /buy /buy (Marker) (Marker) ^ ^ | | if enemies buy your properties your money that you buy in property will be back to you. can anyone help me please? give me the functions. thanks in advance. sorry in my bad english Link to comment
LaCosTa Posted January 18, 2015 Share Posted January 18, 2015 Well to get this script you should contact any skilled scripter to make it to you however you should pay him . Link to comment
PaulDK Posted January 19, 2015 Author Share Posted January 19, 2015 i just want the functions :3 getElementData setElementData blabla :3 i can create this but i need the functions and a little help dude Link to comment
xeon17 Posted January 19, 2015 Share Posted January 19, 2015 Well to get this script you should contact any skilled scripter to make it to you however you should pay him . He asked for the functions he need to create , he didn't requested the script or seached a scripter. @PaulDK createMarker setElementData getElementData setAccountData setTimer givePlayerMoney Link to comment
PaulDK Posted January 22, 2015 Author Share Posted January 22, 2015 anyone help me please !? help me please dudessssss 3 i am a beginner but i try to create this script but i dont think it is good this is server sided. i want if you are the owner of the property it will not buy again or anti spam. and if the enemies buy your property your money that you buy to that property it will be back to you.and if you log out then you online again that property still yours. but if the enemies buy that property while you are logout the money will not be back to you again. marker1 = createMarker(2086, 2090.4, 10, "cylinder", 2, 153, 255) blip1 = createBlipAttachedTo(marker1, 31) function Propes(thePlayer) if isElementWithinMarker(thePlayer, marker1) then pmoney = getPlayerMoney(thePlayer) if ( pmoney >= 500000 ) then destroyElement(blip1) blip2 = createBlipAttachedTo(marker1, 32) takePlayerMoney(thePlayer,500000) outputChatBox("amazing! this is yours now. you will receive $5000 every 2 minutes",thePlayer, 0, 255, 0) timer = setTimer ( function() givePlayerMoney(thePlayer, 5000) end, 5000, 0 ) end end end addCommandHandler("buy",Propes) function checkmoney(thePlayer) if isElementWithinMarker(thePlayer,marker1) then if (pmoney < 500000) then outputChatBox("you dont have money to buy it nigga!", thePlayer, 255, 0, 0) end end end addCommandHandler("buy",checkmoney) function sell(thePlayer) if isElementWithinMarker(thePlayer,marker1) then killTimer(timer) givePlayerMoney(thePlayer, 500000) outputChatBox("you selled it!", thePlayer, 255, 0, 0) destroyElement(blip2) createBlipAttachedTo(marker1, 31) end end addCommandHandler("sell",sell) function check1(thePlayer) outputChatBox("to buy type /buy $500000 but if it's yours type /sell to sell it",thePlayer, 255, 0, 0) end addEventHandler("onMarkerHit",marker1,check1) this is client sided. this is not working idont know how to fix this things. but i want displays the name of owner and the price of the property. and the blip if anyone who owns the property it will be red. but if no one owns that property it will be green. but if you are log out the blip will still be red. local hirX, hirY = scX/20, scY/15.95; addEventHandler( 'onClientRender', gRoot, function() for i, v in ipairs( getElementsByType( 'marker' ) ) do if isElementStreamedIn( v ) then local x, y, z = getElementPosition( v ); local cx, cy, cz = getCameraMatrix(); if isLineOfSightClear( cx, cy, cz, x, y, z, false, false, false, false, false, false, false, v ) then local dist = getDistanceBetweenPoints3D( cx, cy, cz, x, y, z ); if dist >= 5 and dist <= 15 then local px, py = getScreenFromWorldPosition( x, y, z + 1.8, 0.06 ); if px then local r, g, b = getMarkerColor( v ); if r == 0 and g == 153 and b == 255 then r, g, b = 255, 255, 255; end; dxDrawText( 'Price: $500000', px + 1, py + scY/15, px + 1, py + 1, tocolor( 0, 0, 0, 255 ), 1, 'default-bold', 'top', 'center', false, false ); dxDrawText( 'Price: $500000', px, py + scY/15, px, py, tocolor( 255, 255, 255, 255 ), 1, 'default-bold', 'top', 'center', false, false ); end; end; end; 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