Jump to content

Help Please ###


☠ RaZeR ☠

Recommended Posts

when i hit the marker i want to check if the windows is closed

but the if and else ddint work !

the window is open = true but nothing

and when the window is close = false but nothing come

client !

        addEvent("reward4",true) 
addEventHandler("reward4",root, 
    function () 
    if ( guiGetVisible ( mis4 ) == true ) then 
    guiSetVisible (claim4, true) 
    guiSetVisible (change4, false) 
    fadeCamera(false,0,0,0,0) 
    sound = playSound("song.mp3") 
    else 
    guiSetVisible (claim4, false) 
    guiSetVisible (change4, true) 
    end 
    end 
) 

Edited by Guest
Link to comment
How are you triggering the "reward4" event? You said something about a marker, can you show us that piece?
function Finsh_Missoin(plr) 
if plr then 
    dropMarker = createMarker(858.14453,-587.89142,18.01809,"cylinder",7,255,255,0,100,plr) 
    dropBlip = createBlip(858.14453,-587.89142,18.01809,24,5,255,255,0,255,1,900000,plr) 
    function onDrop( hitter ) 
            if ( hitter == plr ) then 
                    triggerClientEvent ( plr,"show4", plr ) 
                    triggerClientEvent( plr,"reward4", plr ) 
            missionDone(hitter,true) 
        end 
    end  
    addEventHandler("onMarkerHit",dropMarker,onDrop)  
        end 
    end 

Link to comment

First of all, what a mess. Sorry to say, try to use tabs at every new line to see what's inside a block. Try something like this;

addEvent ( "reward4", true ); 
addEventHandler ( "reward4", root, 
    function ( thePlayer ) 
        if ( thePlayer == getLocalPlayer() ) then 
            if ( guiGetVisible ( mis4 ) ) then 
                guiSetVisible ( claim4, true ); 
                guiSetVisible ( change4, false ); 
                fadeCamera ( false, 0, 0, 0, 0 ); 
                sound = playSound ( "song.mp3" ); 
            else 
                guiSetVisible ( claim4, false ); 
                guiSetVisible ( change4, true ); 
            end 
        end 
    end 
); 

function Finsh_Missoin ( thePlayer ) 
    if ( thePlayer ) then 
        dropMarker = createMarker ( 858.14453, -587.89142, 18.01809, "cylinder", 7, 255, 255, 0, 100, thePlayer ); 
        dropBlip = createBlip ( 858.14453, -587.89142, 18.01809, 24, 5, 255, 255, 0, 255, 1, 900000, thePlayer ); 
        addEventHandler ( "onMarkerHit", dropMarker,  
            function ( hitElement ) 
                if ( hitElement == thePlayer ) then 
                    triggerClientEvent ( "show4", thePlayer, thePlayer ); 
                    triggerClientEvent ( "reward4", thePlayer, thePlayer ); 
                end 
            end 
        ); 
    end 
end 

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