Jump to content

x[كود | سيارة لشخص واحد]x


Recommended Posts

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

سويت لوحة فيها جريد ليست و اقدر انزل من القريد ليست سيارات

ابغى ان ما احد يقدر يركب السيارة الا المنزل السيارة

Link to comment
ما يحتاج المنت داتا لان هو اساسا راح يستخدم الجدول عشان يسوي السيارهـ

فـ بكل بساطة يتحقق انه هل اللي السيارة اللي ركبها اللاعب هي اللي مخزنها بالجدول وبس .

توضيح ؟

انا اقصد انى ابى اللاعب المنزل السيارة هو الوحيد اليقدر يركب السيارة هذه

Link to comment

كور :D

انا متأكد انك هتقول على اهبل :D

شوف الهبل الانا كاتبه :D

و ساعدنى فيه :D

setElementData(localPlayer,"onlyWhoSpawned",Vehicle1[source]) 

الكود ذه :arrowup:

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

يعنى لما السيارة تتعمل يسوى المنت داتا

addEventHandler ( "onVehicleEnter", root, 
function() 
local plr = getLocalPlayer() 
getElementData(plr,"onlyWhoSpawned") 
if not getElementData(plr,"onlyWhoSpawned") then 
removePedFromVehicle(plr) 
outputChatBox("This Vehicle Belongs To V.I.P",plr,255,0,0) 
end 
end 
end 
) 

و الكود ذه :arrowup: حطيته لوحده تحت

Link to comment
addEventHandler ( "onVehicleEnter", root, 
function() 
local plr = getLocalPlayer() 
getElementData(plr,"onlyWhoSpawned") 
if not getElementData(plr,"onlyWhoSpawned") then 
cancelEvent() 
outputChatBox("This Vehicle Belongs To V.I.P",plr,255,0,0) 
end 
end 
end 
) 

صار ما ينزل السيارة :D

Link to comment

addEventHandler ( "onClientVehicleEnter", root, 
function ( ) 
    if not ( getElementData(localPlayer,"onlyWhoSpawned") ) then 
        cancelEvent( ) 
            outputChatBox("This Vehicle Belongs To V.I.P",255,0,0) 
        end 
    end 
end ) 

# The Code Clinet Side -

Link to comment
addEventHandler ( "onClientVehicleEnter", root, 
function ( ) 
    if not ( getElementData(localPlayer,"onlyWhoSpawned") ) then 
        cancelEvent( ) 
            outputChatBox("This Vehicle Belongs To V.I.P",255,0,0) 
        end 
    end 
end ) 

# The Code Clinet Side -

يقدر يركب بس الكلام يظهرله بالشات !!

Link to comment
addEventHandler ( "onClientVehicleEnter", root, 
function ( ) 
    if not ( getElementData(localPlayer,"onlyWhoSpawned") ) then 
        cancelEvent( ) 
            outputChatBox("This Vehicle Belongs To V.I.P",255,0,0) 
        end 
    end 
end ) 

# The Code Clinet Side -

الإفنت حقك غلط ، ذا الإفنت إذا ركب الموتر وخلص من كل شيء فـ كيف تبي تكنسل الإفنت ؟ + عندك إند زيادة بسطر 6

التصحيح :

addEventHandler ( "onClientVehicleStartEnter", root, 
function ( ) 
    if not ( getElementData(localPlayer,"onlyWhoSpawned") ) then 
        cancelEvent () 
        outputChatBox("This Vehicle Belongs To V.I.P",255,0,0) 
    end 
end ) 

Link to comment
اها المعذره ,

+ شكرا على التوضيح انا اخذت الافنت وخليته كلينت فقط مشان يتنكسل يعني بالاساس الكود حقه هو

العفو , وحياك الله :)

Link to comment
addEventHandler ( "onClientVehicleEnter", root, 
function ( ) 
    if not ( getElementData(localPlayer,"onlyWhoSpawned") ) then 
        cancelEvent( ) 
            outputChatBox("This Vehicle Belongs To V.I.P",255,0,0) 
        end 
    end 
end ) 

# The Code Clinet Side -

الإفنت حقك غلط ، ذا الإفنت إذا ركب الموتر وخلص من كل شيء فـ كيف تبي تكنسل الإفنت ؟ + عندك إند زيادة بسطر 6

التصحيح :

addEventHandler ( "onClientVehicleStartEnter", root, 
function ( ) 
    if not ( getElementData(localPlayer,"onlyWhoSpawned") ) then 
        cancelEvent () 
        outputChatBox("This Vehicle Belongs To V.I.P",255,0,0) 
    end 
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...