Jump to content

[HELP] Try Help me pls


K4stic

Recommended Posts

Posted

HI i need one more time your help Community :)

1.

marker = createMarker ( x, y, z - 1, "cylinder", 3.5, 255, 255, 0, 170 ) 
blip = createBlipAttachedTo ( marker, 51 ) 

how make it to use one exported Attached blip and no the id?

2.

givePlayerMoney ( source, 200 ) 

how make it if the vehicle 100% to be give that money

Posted (edited)

ok i make it but it's make problem at line 27

addEvent ( "del", true ) 
addEventHandler("del", root, 
    function ( ) 
        if ( not isPedInVehicle ( source ) ) then 
            return 
        end 
  
        local vehicle = getPedOccupiedVehicle ( source ) 
        if ( not delses [ getElementModel ( vehicle ) ] ) then 
            return 
        end 
  
        local money = math.random ( 100, 400 ) 
        givePlayerMoney ( source, money ) 
        if getElementHealth(vehicle) > 990 then 
        givePlayerMoney ( source, 50 ) 
        outputChatBox("You get bonus for good condition!", player, 255, 0, 0, false) 
        setElementFrozen ( vehicle, true ) 
        setTimer ( 
            function ( ) 
                setElementFrozen ( vehicle, false ) 
            end 
            ,1000, 1 
        ) 
        getNewdelLocation ( source ) 
    end 
) 

Edited by Guest
Posted

'end' missed on line 26

    addEvent ( "del", true ) 
    addEventHandler("del", root, 
        function ( ) 
            if ( not isPedInVehicle ( source ) ) then 
                return 
            end 
      
            local vehicle = getPedOccupiedVehicle ( source ) 
            if ( not delses [ getElementModel ( vehicle ) ] ) then 
                return 
            end 
      
            local money = math.random ( 100, 400 ) 
            givePlayerMoney ( source, money ) 
            if getElementHealth(vehicle) > 990 then 
            givePlayerMoney ( source, 50 ) 
            setElementFrozen ( vehicle, true ) 
            setTimer ( 
                function ( ) 
                    setElementFrozen ( vehicle, false ) 
                end 
                ,1000, 1 
            ) 
            getNewdelLocation ( source ) 
        end 
end 
) 
     

Posted

thx i will try it

but say at line 17 i won if the vehicle 990 health and up to output the massage but if not 990 and up to not output it

Posted

that gives money to player when his vehicle health over 990

------------

this one gives player money if his vehicle health equal or more that 990

     if getElementHealth(vehicle) >= 990 then 
    givePlayerMoney ( source, 50 ) 

Posted

ok

local money = math.random ( 100, 400 ) 
givePlayerMoney ( source, money ) -- this is to get money then finnish the job 
if getElementHealth(vehicle) >= 990 then 
givePlayerMoney ( source, 50 ) -- and this is if have 990 and up vehicle health(The Bonus) 

Posted

the first 'givePlayerMoney' gives the player random money from $100 to $400

but the second, gives the player $50 only if his vehicle health more than 990

-----------

maybe the code will not work since 'delses' on line 8 not defined.

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