baba Posted April 21, 2015 Share Posted April 21, 2015 سلام عليكم شباب ابي كود زر اضغط عليه في الوحه السياره الي ركبها تتصلح ارجو التوضيح Link to comment
yazan Posted April 21, 2015 Share Posted April 21, 2015 #كلنت addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == GUIEditor.button[1] ) then triggerServerEvent ( "fix", localPlayer ) end end) #سيرفر addEvent("fix", true) addEventHandler("fix",root, function () vehicle = getPedOccupiedVehicle ( source ) fixVehicle ( vehicle ) end) Link to comment
TAPL Posted April 21, 2015 Share Posted April 21, 2015 ^^ vehicle استخدم لوكل للمتغير يعني اللاعب معه سيارة قبل ما تصلحها عشان ما يجي خطأ في الدي بق false تحقق ان المتغير مو + Warning: You should use the global variable client serverside instead of passing the localPlayer by parameter or source. Otherwise event faking (passing another player instead of the localPlayer) would be possible. More information at addEventHandler Link to comment
кιηg-αвα∂у Posted April 21, 2015 Share Posted April 21, 2015 -- server addEvent("fix", true) addEventHandler("fix",root, function () local vehicle = getPedOccupiedVehicle ( source ) if vehicle then fixVehicle ( vehicle ) end end) Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now