Jump to content

Marker - Experience and Money


GerardWay

Recommended Posts

Hey, could anybody show me how to make a script that would create a marker (size 2) and place it at random coordinates out of a selection (like 0,0,5 or 10,10,10 or 1234.5678 etc..) and when a player enters the marker, they stay inside the marker for 1 Minute and when the Minute passes, they get 50 Experience and $10,000 along with a progress bar to show how far the player is through the minute and creating a blip on wherever the marker is

I'd really appreciate it

Link to comment

Friend .... try to learn scripting yourself....

Here tutorial :) (helping you a bit)

thePlayer = getLocalPlayer () -- this is for getting the player who is playing  
       local Marker = createMarker(x,y,z,"type",size,R,G,B,A)  -- x,y,z are positions of marker, type can be cylinder, arrow, etc 
       function shit () -- this is the function with its name and hitPlayer and matchingDimensions is when player hits marker with  
                                  same dimension of marker 
             givePlayerMoney(thePlayer, 10000) 
       end 
       addEventHandler("onClientMarkerHit", Marker, shit) 

Now learn it in mtasa wiki

Link to comment
Friend .... try to learn scripting yourself....

Here tutorial :) (helping you a bit)

thePlayer = getLocalPlayer () -- this is for getting the player who is playing  
       local Marker = createMarker(x,y,z,"type",size,R,G,B,A)  -- x,y,z are positions of marker, type can be cylinder, arrow, etc 
       function :~ () -- this is the function with its name and hitPlayer and matchingDimensions is when player hits marker with  
                                  same dimension of marker 
             givePlayerMoney(thePlayer, 10000) 
       end 
       addEventHandler("onClientMarkerHit", Marker, :~) 

Now learn it in mtasa wiki

You also need to learn it in mtasa wiki.

local player isn't always who hit the marker, it could be other player.

Also givePlayerMoney in client side doesn't require player argument.

Note: Using this function client side (not recommended) will not change a players money server side.
Link to comment

you talking about this?

https://community.multitheftauto.com/ind ... ls&id=8474

local x,y,z = 2152,-1684,16.1 
  
  
local MoneyMarker = createMarker(x,y,z-2,"cylinder", 5, 139, 0, 285,77) 
local MoneyBlip = createBlipAttachedTo(MoneyMarker,56) 
function Check(thePlayer) 
     if isElementWithinMarker(thePlayer, MoneyMarker) then 
          timer = setTimer ( function() givePlayerMoney(thePlayer,1) end 
          , 1000, 0)  
     end 
end 
addEventHandler("onMarkerHit",MoneyMarker,Check) 
  
function Stop(thePlayer) 
killTimer(timer) 
end 
addEventHandler("onMarkerLeave",MoneyMarker,Stop) 
  

Link to comment
  • 4 weeks later...
  • 1 month later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...