Jump to content

مشكلة بسيطه ؟


Recommended Posts

--client
local markergrage = createMarker(-699.57581, 966.04437, 12.34501,'corona',2,0,255,255,255)


function hit( hitElement )
if localPlayer == hitElement then
if isPedInVehicle(localPlayer) then
local theVehicle = getPedOccupiedVehicle ( localPlayer )
triggerServerEvent ( "Visible", localPlayer, theVehicle )
end
end
end
addEventHandler( "onClientMarkerHit", markergrage, hit )


addEventHandler('onClientGUIClick',root,
function ()
if source == buttonbuy then
local theVehicle = getPedOccupiedVehicle ( localPlayer )
triggerServerEvent ( "unVisible", localPlayer, theVehicle )
end
end
)

-- server
addEvent ( "Visible", true )
addEventHandler ( "Visible", root,
function ( theVehicle )
if theVehicle then
setElementVisibleTo ( theVehicle, root, false )
setElementVisibleTo ( theVehicle, source, true )  
end
end
)

addEvent ( "unVisible", true )
addEventHandler ( "unVisible", root,
function ( theVehicle )
if theVehicle then
setElementVisibleTo ( theVehicle, root, true )  
end
end
)

المفروض الحين لما الاعب يدخل المركر يخفي سيارته ويجعلها م تصدم ولا احد يصدمها مثل الشبح يعني

ولما يضغط علي زر في لوحة يرجعه ثاني عادي

لاكن م يشتغل

وش الخطا ؟

Link to comment
  • 2 weeks later...

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...