Jump to content

Marker - Experience and Money


GerardWay

Recommended Posts

Posted

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

Posted
table.random   
createMarker   
onMarkerHit  
setTimer    
setElementData   
getElementData 
givePlayerMoney   
triggerClientEvent 
guiCreateProgressBar 
createBlip 

Posted

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

Posted
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.
Posted

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) 
  

  • 4 weeks later...
Posted

I suggest to use a Table for the Markers...

markersPosTable= { 
[1] = {0, 0, 0, "cylinder", 2.0}, 
[2] = {1, 1, 1, "cylinder", 2.0}, 
[3] = {2, 2, 2, "cylinder", 2.0}, 
} 
  
for i=1,3 do 
 local object = createMarker(unpack(markersPosTable[i])) 
end 

  • 1 month later...
Posted
you are probably copying other old zombie server idea.

Actually, I own the Backup Server for Zombie Outbreak:Reloaded. I'm trying to get everything like it previously was, until the original Owner opens it back up.

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...