Sign in to follow this  
MA[S]RIY

مشكلة بسيطه ؟

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
)

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

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

لاكن م يشتغل

وش الخطا ؟

Share this post


Link to post
15 hours ago, !#NssoR_) said:

اخوي الكود الي تستخدمه انت هذا ماراح يخلي السياره كـ ( الشبح )

المفروض تستخدم هالكود

setElementCollidableWith

تمام مشكور

Share this post


Link to post
On ١٣‏/٥‏/٢٠١٨ at 04:15, !#NssoR_) said:

حياك الله

ي نصور ارجوك ادخل سيرفر وناسة تايم

 

Share this post


Link to post

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.