Jump to content

somthing about gavemoney


abdalbaset

Recommended Posts

  
local x,y,z,amount = --[[x coordinate of marker]],--[[y coordinate of marker]],--[[z coordinate of marker]],--[[amount of money to give]] 
addEventHandler("onMarkerHit",createMarker(x,y,z),function(element,dimension) 
    if getElementType(element) == "player" and dimension then 
        givePlayerMoney(element,amount) 
    end 
end) 
  

Link to comment
 LS=createMarker ( 1949.4000244141,-2493.8999023438,13.199999809265, "cylinder", 1.5, 255, 255, 0, 170 ) 
  
  
 function pil() 
  
 LS2=createMarker (1811.5999755859,-2493.8000488281,13.199999809265, "cylinder", 1.5, 255, 255, 0, 170 ) 
  
  
 end 
 addEventHandler( "onMarkerHit", LS, pil ) 
  
  
 function money() 
  
  if isElementWithinMarker(theplayer,money) then 
    givePlayerMoney (theplayer , 5000 )  
     outputChatBox(" you got 5000$,", thePlayer, 255, 0, 0) 
  
 end 
  
  
 end 
 addEventHandler( "onMarkerHit", LS2, money ) 

the first function working fine but the 2nd not working |?| debug >>[00:22:12] WARNING: pilot-in-deve\pilots.lua:23: Bad argument @ 'addEventHan

' [Expected element at argument 2, got nil]

Link to comment

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