Jump to content

تصحيح


ayman1998

Recommended Posts

السلام عليكم و رحمة الله و بركاتة

ممكن تصحيح هاد الكود

ما بشتري و بجي ني في الكونسل اخطا في الترفل

كلنت

  
  addEventHandler('onClientGUIClick', root, 
   function ( ) 
    if ( source == GUIEditor.button[1] ) then 
    triggerServerEvent('a', localPlayer) 
   end 
end  
) 

سيرفر

addEvent('a', true)  
addEventHandler('aa', root, 
function ( ) 
local PlayerMoney = getPlayerMoney(source) 
   if ( PlayerMoney >= 2) then 
   takePlayerMoney(source,2) 
   setElementHealth ( source, getElementHealth(source) + 20 ) 
   else 
    outputChatBox('you dont have mony', source, 255, 0 ,0 ) 
end 
) 

Link to comment
addEvent( 'a', true )  
addEventHandler( 'a', root, 
    function( ) 
        if( getPlayerMoney( source ) >= 2 )then 
            if( getElementHealth( source ) ~= 100 )then 
                takePlayerMoney( source, 2 ) 
                setElementHealth( source, getElementHealth( source ) + 20 ) 
            end 
        else 
            outputChatBox( 'you dont have mony', source, 255, 0, 0 ) 
        end 
    end 
) 

Link to comment

ما اشتغل بيجيني في اف 8 هاد الكلام لما اعص على الزر

[14:16:43] ERROR: Client ( ayman) triggered serverside event a, but event is not added serverside

[14:16:43] ERROR: Client ( ayman) triggered serverside event aaaa, but event is not added serverside

[14:16:44] ERROR: Client ( ayman) triggered serverside event a, but event is not added serverside

[14:16:44] ERROR: Client ( ayman) triggered serverside event aaaa, but event is not added serverside

Link to comment
addEvent( 'a', true ) 
addEventHandler( 'a', root, 
    function( ) 
        if( getPlayerMoney( source ) >= 2 )then 
            if( getElementHealth( source ) < 100 )then 
                takePlayerMoney( source, 2 ) 
                setElementHealth( source, getElementHealth( source ) + 20 ) 
            end 
        else 
            outputChatBox( 'you dont have mony', source, 255, 0, 0 ) 
        end 
    end 
) 

Link to comment

ممكن كمان طلب بدي اخلي هدول الماركرات في كل عالم وهمي و كل انترو

markers = { 
  
    {-1635.18359375,1201.10546875,6.1796875}, 
    {369.77225,-6.03275,1001.85889}, 
    {375.74921,-118.80518,1001.49951}, 
  --{ x, y, z }, 
  } 
  
  
  
for i,v in ipairs (markers) do 
     
marker = createMarker(v[1], v[2], v[3], "cylinder", get("markerSize"), get("markerColorR"), get("markerColorG"), get("markerColorB"), get("markerAlpha")) 
end 
setElementInterior ( marker, 9 ) 
setElementDimension ( marker, 9 )  

Link to comment
aMarkers = 
{ 
    --{ aX, aY, aZ, interior, dimension }; 
    { 10, 20, 1, 10, 255 }; 
} 
  
for _, v in ipairs( aMarkers )do 
    print( 'aX:'.. v[1] ) 
    print( 'aY:'.. v[2] ) 
    print( 'aZ:'.. v[3] ) 
    print( 'interior:'.. v[4] ) 
    print( 'dimension:'.. v[5] ) 
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...