αвυ-wαleed Posted August 4, 2014 Posted August 4, 2014 الكود هذا فتح بوابة بكلمة كلما سويت ترايقر للكينت عشان يطلع صوت اذا فتحت البوابة او قفلت يجي اخطاء اتمنى التصحيح function createTheGata () myGate2 = createObject ( 980, 489.5, -2499.1000976563, 3.0999999046326, 0, 0, 90 ) end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createTheGata ) function openMyGata ( ) moveObject ( myGate2, 1500, 489.5, -2499.1000976563, -3.0999999046326, 0, 0, 0 ) exports['topbarchat']:sendClientMessage ( "تم فتح البوابة ", root, 255, 255, 255, true ) triggerClientEvent("ee",getLocalPlayer()) end addCommandHandler("O",openMyGata) function movingMyGataBack () moveObject ( myGate2, 1500, 489.5, -2499.1000976563, 3.0999999046326, 0, 0, 0 ) exports['topbarchat']:sendClientMessage ( "تم إغلاق البوابة ", root, 255, 255, 255, true ) triggerClientEvent("ee",getLocalPlayer()) end addCommandHandler("C",movingMyGataBack) client addEvent ( "ee", true ) addEventHandler ( "ee", root, function ( ) aa = playSound("abu1.mp3",false) end end )
nxFairlywell Posted August 4, 2014 Posted August 4, 2014 (edited) تم تعديل الكود وشغال 100% ء ,# addEvent ( "ee", true ) addEventHandler ( "ee", root, function ( ) sound = playSound("abu1.mp3",false) end ) addEvent ( "gg", true ) addEventHandler ( "gg", root, function ( ) stopSound( sound ) end ) EDITED# SEVER SIDE --- function createTheGata () myGate2 = createObject ( 980, 489.5, -2499.1000976563, 3.0999999046326, 0, 0, 90 ) end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createTheGata ) function openMyGata ( playerSource ) moveObject ( myGate2, 1500, 489.5, -2499.1000976563, -3.0999999046326, 0, 0, 0 ) exports['topbarchat']:sendClientMessage ( "تم فتح البوابة ", root, 255, 255, 255, true ) triggerClientEvent("ee",playerSource) end addCommandHandler("O",openMyGata) function movingMyGataBack ( playerSource ) moveObject ( myGate2, 1500, 489.5, -2499.1000976563, 3.0999999046326, 0, 0, 0 ) exports['topbarchat']:sendClientMessage ( "تم إغلاق البوابة ", root, 255, 255, 255, true ) triggerClientEvent("gg",playerSource) end addCommandHandler("C",movingMyGataBack) Edited August 5, 2014 by Guest
TAPL Posted August 4, 2014 Posted August 4, 2014 myGate2 = createObject(980, 489.5, -2499.1, 3.1, 0, 0, 90) function openMyGata(player) moveObject(myGate2, 1500, 489.5, -2499.1, -3.1) exports['topbarchat']:sendClientMessage("تم فتح البوابة ", player, 255, 255, 255, true) triggerClientEvent(player, "ee", player) end addCommandHandler("O", openMyGata) function movingMyGataBack() moveObject(myGate2, 1500, 489.5, -2499.1, 3.1, 0, 0, 0 ) exports['topbarchat']:sendClientMessage("تم إغلاق البوابة ", player, 255, 255, 255, true) triggerClientEvent(player, "ee", player) end addCommandHandler("C", movingMyGataBack) addEvent("ee", true) addEventHandler("ee", root, function() playSound("abu1.mp3") end)
αвυ-wαleed Posted August 4, 2014 Author Posted August 4, 2014 اش الخطأ عشان اتعلم منه ابغى شرح الف الف شكر جنرال + تابل
αвυ-wαleed Posted August 4, 2014 Author Posted August 4, 2014 جنرال كودك مدري اش الخطا اللي فيه لكن تابل البوابة اذا فتحتها يشتغل الصوت ويطلع الكلام لكن اذا قفلتها مايطلع الكلام ولا الصوت تابل كاتبة كذا فما اشتغل function movingMyGataBack() انا اضفت ارقمنت function movingMyGataBack(player) والف الف شكر ياتابل وجنرال منكم نتعلم
αвυ-wαleed Posted August 4, 2014 Author Posted August 4, 2014 عوافي الانسان كثير النسيان وانت ابونا في البرمجة
#=|>[A]sMr,\~> Posted August 4, 2014 Posted August 4, 2014 وش بلاك قبل شوي تسوي الموضوع وتوخره @_@المهم سويته لك ججرب كلنت : [lua] addEvent ( "ee", true ) addEventHandler ( "ee", root, function ( ) playSound("abu1.mp3",false) end end ) عندك اند زيآده
EH10 Posted August 4, 2014 Posted August 4, 2014 عوافي الانسان كثير النسيان وانت ابونا في البرمجة , شـأإرب شـي ؟
nxFairlywell Posted August 5, 2014 Posted August 5, 2014 وش الخطأ الي عندي واحد اند زائد تقدر توخره + اذا تبي تتعلم لازم تكتشف الاخطاء لأني انا الي حاط الاند الزائد متعمد ^ لا جد متعمد :]
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