Jump to content

Support


Daniel RP

Recommended Posts

I have a small doubt, I made a script to send message through the client. With an infobox and it can only show 
if it is in the root element. And I want to know if it will send this message to 
everyone when a person passes by the marker or just to the client

 

function onClientCJMarkerHit ( hitElement, matchingDimension )
    if ( matchingDimension ) then
        if (not isElement(hitElement)) then return end
        if (isPedInVehicle(hitElement)) then return end
        if ( hitElement == localPlayer ) then
            if ( getElementModel ( localPlayer ) == 0 ) then
                local x1, y1, z1 = getElementPosition(source)
                local x2, y2, z2 = getElementPosition(hitElement)
                local maxZ = z1 + 2
                if (z2 > maxZ) then return end

                    fadeCamera( false, 1.0, 0, 0, 0 )
                    setTimer( fadeCamera, 2000, 1, true, 1.0, 0, 0, 0 )
                    
                    toggleAllControls ( false, true, false )
                    
                    local px, py, pz = getElementPosition( localPlayer )
                    x, y, z, int, dim = px, py, pz, getElementInterior( localPlayer ), getElementDimension( localPlayer )
                    
                    pricesModel = {}
                    previousModel = createClothesJSONString ( "table" )
                    
                    setTimer( function ()       
                        
                        setElementFrozen( localPlayer, true )
                        setElementPosition(localPlayer, 210.48928833008,-33.030361175537,1001.9296875)
                        setElementDimension( localPlayer, math.random( 10,6543 ) )
                        setCameraMatrix( 208.20829772949,-35.354099273682,1002.6522216797,208.90832519531,-34.640968322754,1002.6147460938,0,90 )
                        setTimer( function ()
						setElementRotation( localPlayer, 0, 0, 133.19290161133 )
						end, 1000, 2 )
                        setTimer( function ()
                            guiSetVisible ( CJClothesWindow, true )
                            showCursor( true )
                        end, 1000, 1 )
                    end, 1200, 1 )
            else
				 triggerEvent( "addNotification", root, "Você precisa da skin do CJ antes de poder definir a roupa!")
            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...