Jump to content

[Help] I have problem


Miika

Recommended Posts

Posted

My resource not working...

local amark = { 
    {1667.2,1014.3,10.8}, 
} 
  
function createMarker() 
    local random = math.random ( #amark ) 
    local x, y, z = amark[random][1] 
    Marker = createMarker ( x, y, z "cylinder", 4, 255, 255, 0, 170 ) 
    setElementCollisionsEnabled( Marker, false ) 
    bl = createBlipAttachedTo(Marker,11) 
    outputChatBox( "Autokaupan ryöstö on saatavilla! Ryöstä se keltaisen rekan luota.", root, 0, 255, 0 ) 
end 
addEventHandler("onResourceStart", resourceRoot,createMarker) 
  
addEventHandler("onMarkerHit",root, 
function ( player ) 
    if ( source ~= Marker ) then 
        return 
    end 
    if ( isPedInVehicle( player ) ) then 
        return 
    end 
        destroyElement( Marker ) 
        destroyElement( bl ) 
        randomMoney = math.random ( 3000, 5000 ) 
        givePlayerMoney(player,randomMoney) 
        setPlayerWantedLevel ( player, 6 ) 
        outputChatBox("Sait $" .. tostring(randomMoney) .." rahaa ja 6 tähteä", player, 0, 250, 0) 
        setTimer( createMarker, 900000, 1 ) 
    end 
) 
  

Sorry my bad english D:

  • MTA Team
Posted
function createMarker() 

Change the name from your function because it overwrites the original MTA function.

Posted
function createMarker() 

Change the name from your function because it overwrites the original MTA function.

I change the function, but not working...

local amark = { 
    {1667.2,1014.3,10.8}, 
} 
  
function createRob() 
    local random = math.random ( #amark ) 
    local x, y, z = amark[random][1] 
    Marker = createMarker ( x, y, z "cylinder", 4, 255, 255, 0, 170 ) 
    setElementCollisionsEnabled( Marker, false ) 
    bl = createBlipAttachedTo(Marker,11) 
    outputChatBox( "Autokaupan ryöstö on saatavilla! Ryöstä se keltaisen rekan luota.", root, 0, 255, 0 ) 
end 
addEventHandler("onResourceStart", resourceRoot,createRob) 
  
addEventHandler("onMarkerHit",root, 
function ( player ) 
    if ( source ~= Marker ) then 
        return 
    end 
    if ( isPedInVehicle( player ) ) then 
        return 
    end 
        destroyElement( Marker ) 
        destroyElement( bl ) 
        randomMoney = math.random ( 3000, 5000 ) 
        givePlayerMoney(player,randomMoney) 
        setPlayerWantedLevel ( player, 6 ) 
        outputChatBox("Sait $" .. tostring(randomMoney) .." rahaa ja 6 tähteä", player, 0, 250, 0) 
        setTimer( createMarker, 900000, 1 ) 
    end 
) 
  

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