Jump to content

[مساعدة في مود الفيب 4]


Doffy

Recommended Posts

ابي اول ما اللاعب يضغط زر تنقفل سيارته ومافي احد يقدر يدخل سيارته ويكتبله رسالة في ال TopBarChat
محاولتي الاولي

--Client
addEventHandler("onClientGUIClick",root,
function()
if ( source == GUIEditor.button[3] ) then
triggerServerEvent("lock",localPlayer)
end
end)
--Server
addEvent("lock",true)
addEventHandler("lock",root,
function()
    local theVehicle2 = getPedOccupiedVehicle ( client )
    if ( theVehicle2 ) then
    if isVehicleLocked ( theVehicle2 ) then
    setVehicleLocked ( theVehicle2, false )
	outputChatBox("#000000[#FFFF00 Ranks System#000000] #00FF00 تم اغلاق السيارة", source,255,255,255, true)
end
end
end)

مو شغاله الي يعرف ياليت يفدني :D 

Link to comment
--Client

addEventHandler("onClientGUIClick",root,

function()

if ( source == GUIEditor.button[3] ) then

triggerServerEvent("lock",localPlayer)

end

end
)
--Server

addEvent("lock",true)

addEventHandler("lock",root,

function()

    local theVehicle = getPedOccupiedVehicle(source)

    if ( theVehicle ) then

	 if not isVehicleLocked ( theVehicle ) then

setVehicleLocked(theVehicle,true)
	
outputChatBox("#000000[#FFFF00 Ranks System#000000] #00FF00 تم اغلاق السيارة", source,255,255,255, true)

end

end

end 
)

 

Link to comment
21 minutes ago, Ahmed Ly said:

--Client

addEventHandler("onClientGUIClick",root,

function()

if ( source == GUIEditor.button[3] ) then

triggerServerEvent("lock",localPlayer)

end

end
)
--Server

addEvent("lock",true)

addEventHandler("lock",root,

function()

    local theVehicle = getPedOccupiedVehicle(source)

    if ( theVehicle ) then

	 if not isVehicleLocked ( theVehicle ) then

setVehicleLocked(theVehicle,true)
	
outputChatBox("#000000[#FFFF00 Ranks System#000000] #00FF00 تم اغلاق السيارة", source,255,255,255, true)

end

end

end 
)

 

طيب ولو ابيها تنفتح اول ما يضغط نفس الزر مره ثانية ؟؟

Link to comment
addEventHandler("onClientGUIClick",root,

function()

if ( source == GUIEditor.button[3] ) then

triggerServerEvent("lock",localPlayer)

end

end
)

--Server

addEvent("lock",true)

addEventHandler("lock",root,

function()
 theVehicle = getPedOccupiedVehicle(source)
if ( theVehicle ) then
if not isVehicleLocked ( theVehicle ) then
setVehicleLocked(theVehicle,true)
exports["TopBarChat"]:sendClientMessage("#000000[#FFFF00 Ranks System#000000] #00FF00 تم اغلاق السيارة", source,255,255,255, true)
else
setVehicleLocked(theVehicle,false)
exports["TopBarChat"]:sendClientMessage("#000000[#FFFF00 Ranks System#000000] #00FF00 تم فتح السيارة", source,255,255,255, true)
end
end
end 
)

 

Edited by Ahmed Ly
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...