Jump to content

Blaawee

Members
  • Posts

    857
  • Joined

  • Last visited

Posts posted by Blaawee

  1. #مومججرب = )

    function arabicChat( thePlayer, cmd, ... ) 
        local msg = table.concat( { ... }, ' ' ); 
        for _, players in ipairs( getElementsByType( 'player' ) ) do 
            if ( exports.admin:getPlayerCountry( players ) == 'SA' and msg and msg ~= '' ) then 
                outputChatBox('Arabic | '..getPlayerName( thePlayer )..': #FFFFFF'..msg..'', players, 255, 255, 255, true ); 
            end 
        end 
    end 
    addCommandHandler( 'Arabic', arabicChat ); 
      
    addEventHandler( 'onPlayerJoin',root, 
        function( ) 
            bindKey( source, 'l', 'down', 'chatbox', 'Arabic' ); 
        end 
    ); 
      
    addEventHandler( 'onResourceStart', resourceRoot, 
        function ( ) 
            for _, player in ipairs( getElementsByType( 'player' ) ) do 
                bindKey( player, 'l', 'down', 'chatbox', 'Arabic' ); 
            end 
        end 
    ); 
    

  2. GUIEditor = { 
        gridlist = {}, 
        window = {} 
    } 
      
    addEventHandler ( "onClientResourceStart", resourceRoot, 
        function( ) 
            GUIEditor.window[1] = guiCreateWindow(550, 224, 422, 308, "", false) 
            guiWindowSetSizable(GUIEditor.window[1], false) 
      
            GUIEditor.gridlist[1] = guiCreateGridList(28, 108, 377, 176, false, GUIEditor.window[1]) 
            col2 = guiGridListAddColumn(GUIEditor.gridlist[1], "admin", 0.9)     
        end 
    ) 
      
    addEvent ( "Login" , true ) 
    addEventHandler ( "Login", root, 
        function  ( player ) 
            local row2 = guiGridListAddRow ( GUIEditor.gridlist[2] ) 
            guiGridListSetItemText ( GUIEditor.gridlist[2], row2, col2, getPlayerName ( player ), false, false ) 
        end 
    ) 
    

    addEventHandler ( 'onPlayerLogin', root, 
        function ( ) 
            if isObjectInACLGroup ( 'user.'.. getAccountName( getPlayerAccount( source ) ), aclGetGroup ( 'Admin' ) ) then 
                triggerClientEvent ( "Login", root, source ) 
            end 
        end  
    ) 
    

  3. wndMain = { 
        'wnd', 
        text = 'FR GUI', 
        x = 10, 
        y = 150, 
        width = 280, 
        controls = { 
                    -- شف اذا فيه الفنكشن ( {'br'},  ) بعد بدايه الكونترول  
            {'lbl', text='Local player'}, 
            {'br'},  
            {'btn', id='kill', onclick=killLocalPlayer}, 
            {'btn', id='skin', window=wndSkin}, 
            {'btn', id='anim', window=wndAnim}, 
            {'btn', id='weapon', window=wndWeapon}, 
            {'btn', id='clothes', window=wndClothes}, 
            {'btn', id='playergrav', text='grav', window=wndGravity}, 
            {'btn', id='warp', window=wndWarp}, 
            {'btn', id='stats', window=wndStats}, 
            {'btn', id='bookmarks', window=wndBookmarks}, 
            {'br'}, 
            {'chk', id='jetpack', onclick=toggleJetPack}, 
            {'chk', id='falloff', text='fall off bike', onclick=toggleFallOffBike}, 
            {'br'}, 
             
            {'lbl', text='Pos:'}, 
            {'lbl', id='xpos', text='x', width=45}, 
            {'lbl', id='ypos', text='y', width=45}, 
            {'lbl', id='zpos', text='z', width=45}, 
            {'btn', id='setpos', text='map', window=wndSetPos}, 
            {'btn', id='setinterior', text='int', window=wndSetInterior}, 
            {'br'}, 
            {'br'}, 
             
            {'lbl', text='Vehicles'}, 
            {'br'}, 
            {'lbl', text='Current:'}, 
            {'lbl', id='curvehicle'}, 
            {'br'}, 
            {'btn', id='createvehicle', window=wndCreateVehicle, text='create'}, 
            {'btn', id='repair', onclick=repairVehicle}, 
            {'btn', id='flip', onclick=flipVehicle}, 
            {'btn', id='upgrades', window=wndUpgrades}, 
            {'btn', id='color', onclick=openColorPicker}, 
            {'btn', id='paintjob', window=wndPaintjob}, 
            {'br'}, 
            {'chk', id='lightson', text='Lights on', onclick=forceLightsOn}, 
            {'chk', id='lightsoff', text='Lights off', onclick=forceLightsOff}, 
            {'br'}, 
            {'br'}, 
             
            {'lbl', text='Environment'}, 
            {'br'}, 
            {'btn', id='time', window=wndTime}, 
            {'chk', id='freezetime', text='freeze', onclick=toggleFreezeTime}, 
            {'btn', id='weather', window=wndWeather}, 
            {'btn', id='speed', window=wndGameSpeed} 
        }, 
        oncreate = mainWndShow, 
        onclose = mainWndClose 
    } 
    

  4. ططيب انت الحين غيرت ال TXD و DFF ?

    --

    ططريقهه ممكن تفيدك

    local gModel =  
    { 
        --[ 597 ] = { texture = "car/sentinel.txd", model = "car/sentinel.dff", collision = 'car/sentinel.col' } مثآل  
        [ ID ] = { texture = '', model = '', collision = '' }  
    }; 
      
    addEventHandler( 'onClientResourceStart', resourceRoot, 
        function( ) 
            for modelID, replace in next, gModel do 
                if ( replace.texture ) then 
                    gModel[ modelID ].txd = engineLoadTXD( replace.texture ); 
                    engineImportTXD( gModel[ modelID ].txd, modelID ); 
                elseif ( replace.model ) then 
                    gModel[ modelID ].dff = engineLoadDFF( replace.model, modelID ); 
                    engineReplaceModel( gModel[ modelID ].dff, modelID ); 
                elseif ( replace.collision ) then 
                    gModel[ modelID ].col = engineLoadCOL( replace.collision ); 
                    engineReplaceCOL ( gModel[ modelID ].col, modelID ); 
                end 
            end 
        end 
    ); 
    

  5. Try this i didn't test it

    Client:

    addEventHandler( 'onClientRender', root, 
        function ( ) 
            for i,v in ipairs( getElementsByType( "player" ) ) do 
                local x, y, z = getElementPosition( v ); 
                local cx, cy, cz = getCameraMatrix( ); 
                if getDistanceBetweenPoints3D( cx, cy, cz, x, y, z ) <= 15 then 
                    local px,py = getScreenFromWorldPosition( x, y, z + 1.3, 0.06 ); 
                    if px and py then 
                        dxDrawImage( px, py, px, py, getElementData( v, "Classicon" ), 0, 0, 0, tocolor( 255, 255, 255, 255 ) ); 
                    end 
                end 
            end 
        end 
    ); 
    

    Server:

    addEventHandler( 'onPlayerLogin', root, 
        function ( ) 
            local account = getPlayerAccount( source ) 
            if account and not isGuestAccount( account ) then 
                local accountName = getAccountName( account ); 
                if isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "Admin" ) ) then 
                    setElementData( source, "Classicon", tostring( ":experience/class/classicon_admin.png" ) ); 
                elseif isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "Moderator" ) ) then 
                    setElementData( source, "Classicon", tostring( ":experience/class/classicon_mod.png" ) ); 
                else 
                    setElementData( source, "Classicon", tostring( ":experience/class/classicon_player.png" ) ); 
                end 
           end 
        end 
    ); 
    

  6. addEventHandler ( "onClientResourceStart", root, 
        function ( ) 
            if (getElementType ( source ) == "vehicle" ) then 
    

    Are you kidding me !

    Hows the source would be a vehicle ?!

  7. interpolateBetween 
    

    شكلهآ صعبه عليكك

    موب شرط تكون الكآميرآ تتحركك تقدر تسوي تسوي فيد للكآميرآ احسن ب النسبه لكك

    +

    العوالم الوهميه

    جرب ذآ

    local gTable = 
    { 
        [ 1 ] = { text = '', dimension = 0, x = 0, y = 0, z = 0, lookAtX = 0, lookAtY = 0, lookAtZ = 0 }, 
        [ 2 ] = { text = '', dimension = 0, x = 0, y = 0, z = 0, lookAtX = 0, lookAtY = 0, lookAtZ = 0 }, 
        [ 3 ] = { text = '', dimension = 0, x = 0, y = 0, z = 0, lookAtX = 0, lookAtY = 0, lookAtZ = 0 } 
    }; 
    local i = 1; 
    local screen = { guiGetScreenSize( ) }; 
      
    function swingBettwenArrow( key ) 
        if key == 'arrow_l' then 
            if i == 1 then 
                i = #gTable; 
            else 
                i = i - 1; 
            end 
        else 
            if i == #gTable then 
                i = 1; 
            else 
                i = i + 1; 
            end 
        end 
        fadeCamera( true ); 
    end 
    bindKey ( 'arrow_l', 'down', swingBettwenArrow ); 
    bindKey ( 'arrow_r', 'down', swingBettwenArrow ); 
      
    function enterTheDimension( Key ) 
        if Key == 'enter' then 
            setElementDimension( localPlayer, gTable[i].dimension ); 
        end 
    end 
    bindKey( 'enter', 'down', enterTheDimension ); 
      
    addEventHandler( 'onClientRender', root, 
        function( ) 
            dxDrawText( gTable[i].text, screen[ 1 ] / 2 - dxGetTextWidth( gTable[i].text, 1, 'arial' ) / 2, screen[ 2 ] / 2 + 128, screen[ 1 ], screen[ 2 ], tocolor( 255, 255, 255, 255), 1, 'arial', 'left', 'top', false, false, false, true ); 
            setCameraMatrix( gTable[i].x, gTable[i].y, gTable[i].z, gTable[i].lookAtX, gTable[i].lookAtY, gTable[i].lookAtZ ); 
        end 
    ); 
    

×
×
  • Create New...