Jump to content

سلام : طلب كود وتصحيح كود


Recommended Posts

الكود ابي حق تيجير سيرفر ال

triggerClientEvent

وتصحيح كود 

Server

x, y, size =  970.03174, -1134.88831 , 100, 55
local greenzone = createColRectangle (970.03174, -1134.88831 , 100, 55 )
local greenzonemaparea = createRadarArea ( 970.03174, -1134.88831 , 100, 55,0, 255, 0, 120)
 
function greenzoneEnter ( thePlayer, matchingDimension )
if getElementType( thePlayer ) ~= "player" then return end
triggerClientEvent(localPlayer,"Safe",localPlayer)

 

Client

addEvent("Safe",true)
addEventHandler("Safe",root,
    function()
        dxDrawRectangle(1009, 485, 256, 87, tocolor(16, 15, 15, 179), false)
        dxDrawText("Safe Zoon", 1029, 503, 1245, 558, tocolor(70, 254, 13, 179), 2.00, "pricedown", "left", "top", false, false, false, false, false)
    end
)

 

Link to comment
x, y, size =  970.03174, -1134.88831 , 100, 55
local greenzone = createColRectangle (970.03174, -1134.88831 , 100, 55 )
local greenzonemaparea = createRadarArea ( 970.03174, -1134.88831 , 100, 55,0, 255, 0, 120)
 
function greenzoneEnter ( thePlayer, matchingDimension )
if getElementType( thePlayer ) ~= "player" then return end
triggerClientEvent("Safe",localPlayer)

 

هذا ملف سيرفر تم جرب وردلي خبر

Link to comment

هات الكود كآمل , لانه عندك أخطاء بسطر 7

1 hour ago, |M.r|LooFe| said:

x, y, size =  970.03174, -1134.88831 , 100, 55
local greenzone = createColRectangle (970.03174, -1134.88831 , 100, 55 )
local greenzonemaparea = createRadarArea ( 970.03174, -1134.88831 , 100, 55,0, 255, 0, 120)
 
function greenzoneEnter ( thePlayer, matchingDimension )
if getElementType( thePlayer ) ~= "player" then return end
triggerClientEvent("Safe",localPlayer)

هذا ملف سيرفر تم جرب وردلي خبر

triggerClientEvent رآجع الأرقيومنت للفنكشن

  • Like 1
Link to comment
----------------=====_ Server _=====----------------
----------------Safe1
function outButDxChat ( text, element, r, g, b, vaule )
exports["guimessages"]:outputServer(element, text, r, g, b)
end
x, y, size =  970.03174, -1134.88831 , 100, 55
local greenzone = createColRectangle (970.03174, -1134.88831 , 100, 55 )
local greenzonemaparea = createRadarArea ( 970.03174, -1134.88831 , 100, 55,0, 255, 0, 120)
 
function greenzoneEnter ( thePlayer, matchingDimension )
if getElementType( thePlayer ) ~= "player" then return end
triggerClientEvent("Safe",localPlayer)
toggleControl ( thePlayer, "fire", false )
toggleControl ( thePlayer, "next_weapon", false )
toggleControl ( thePlayer, "previous_weapon", false )
setPedWeaponSlot ( thePlayer, 0 )
toggleControl ( thePlayer, "aim_weapon", false )
toggleControl ( thePlayer, "vehicle_fire", false )
toggleControl ( thePlayer, "vehicle_secondary_fire", false )
end
addEventHandler ( "onColShapeHit", greenzone, greenzoneEnter )
 
function greenzoneExit ( thePlayer, matchingDimension )
if getElementType( thePlayer ) ~= "player" then return end
outButDxChat ( "* You Left The Greenzone!", thePlayer, 50, 252, 3 )
toggleControl ( thePlayer, "fire", true )
toggleControl ( thePlayer, "next_weapon", true )
toggleControl ( thePlayer, "previous_weapon", true )
toggleControl ( thePlayer, "aim_weapon", true )
toggleControl ( thePlayer, "vehicle_fire", true )
toggleControl ( thePlayer, "vehicle_secondary_fire", true )
end

addEventHandler ( "onColShapeLeave", greenzone, greenzoneExit )

----------------=====_ Client _=====----------------

addEvent("Safe",true)
addEventHandler("Safe",root,
    function()
        dxDrawRectangle(1009, 485, 256, 87, tocolor(16, 15, 15, 179), false)
        dxDrawText("Safe Zoon", 1029, 503, 1245, 558, tocolor(70, 254, 13, 179), 2.00, "pricedown", "left", "top", false, false, false, false, false)
    end
)

انا رجعتها بس مفهمة الامثلة الامثلة كلها حق الشت output    :lol: 

Edited by mr.pop
Link to comment
--  Server

function outButDxChat ( text, element, r, g, b, vaule )
exports["guimessages"]:outputServer(element, text, r, g, b)
end
x, y, size =  970.03174, -1134.88831 , 100, 55
local greenzone = createColRectangle (970.03174, -1134.88831 , 100, 55 )
local greenzonemaparea = createRadarArea ( 970.03174, -1134.88831 , 100, 55,0, 255, 0, 120)
 
function greenzoneEnter ( thePlayer, matchingDimension )
if getElementType( thePlayer ) ~= "player" then return end
toggleControl ( thePlayer, "fire", false )
toggleControl ( thePlayer, "next_weapon", false )
toggleControl ( thePlayer, "previous_weapon", false )
setPedWeaponSlot ( thePlayer, 0 )
toggleControl ( thePlayer, "aim_weapon", false )
toggleControl ( thePlayer, "vehicle_fire", false )
toggleControl ( thePlayer, "vehicle_secondary_fire", false )
triggerClientEvent ( thePlayer , "SatValue" , thePlayer , "show" );
end
addEventHandler ( "onColShapeHit", greenzone, greenzoneEnter )
 
function greenzoneExit ( thePlayer, matchingDimension )
if getElementType( thePlayer ) ~= "player" then return end
outButDxChat ( "* You Left The Greenzone!", thePlayer, 50, 252, 3 )
toggleControl ( thePlayer, "fire", true )
toggleControl ( thePlayer, "next_weapon", true )
toggleControl ( thePlayer, "previous_weapon", true )
toggleControl ( thePlayer, "aim_weapon", true )
toggleControl ( thePlayer, "vehicle_fire", true )
toggleControl ( thePlayer, "vehicle_secondary_fire", true )
triggerClientEvent ( thePlayer , "SatValue" , thePlayer , "hide" );
end

addEventHandler ( "onColShapeLeave", greenzone, greenzoneExit )


---------- Client 
function dx ( )
dxDrawRectangle(1009, 485, 256, 87, tocolor(16, 15, 15, 179), false)
dxDrawText("Safe Zoon", 1029, 503, 1245, 558, tocolor(70, 254, 13, 179), 2.00, "pricedown", "left", "top", false, false, false, false, false)
end

addEventHandler ( "SatValue" , root , function ( arg )
if ( arg == "show" ) then 
addEventHandler("onClientRender",root,dx);
elseif ( arg == "hide" ) then 
removeEventHandler("onClientRender",root,dx)
end
end
)

 

Edited by #kAsR
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...