mohssan123 Posted February 19, 2013 Share Posted February 19, 2013 السلام عليكم طلب كود اذا ضغطت على زر يخلي دمك ما ينقص لمدة معينه Link to comment
iPrestege Posted February 19, 2013 Share Posted February 19, 2013 "onClientGUIClick" setTimer setElementHealth triggerServerEvent Link to comment
Mr.T9 Posted February 19, 2013 Share Posted February 19, 2013 "onClientGUIClick" setTimer setElementHealth triggerServerEvent هو يقصد زر اف 2 وكذا استخدم bindKey Link to comment
TAPL Posted February 19, 2013 Share Posted February 19, 2013 "onClientGUIClick" setTimer setElementHealth triggerServerEvent setElementHealth "onClientPlayerDamage" cancelEvent Link to comment
iPrestege Posted February 19, 2013 Share Posted February 19, 2013 "onClientGUIClick" setTimer setElementHealth triggerServerEvent setElementHealth "onClientPlayerDamage" cancelEvent Thanks. Link to comment
mohssan123 Posted February 19, 2013 Author Share Posted February 19, 2013 "onClientGUIClick" setTimer setElementHealth triggerServerEvent هو يقصد زر اف 2 وكذا استخدم bindKey لا اقصد زر في نافذه Link to comment
Max+ Posted February 19, 2013 Share Posted February 19, 2013 اذا في اخطاء يرجى التصحيح --ClientSide addEventHandler('onClientGUIClick', root, function( ) if ( source == ButtonName ) then triggerServerEvent('qwe', localPlayer) end end ) --ServerSide addEvent('qwe', true) addEventHandler('qwe', root, setTimer ( function ( thePlayer ) if ( thePlayer and isElement ( thePlayer ) ) then setElementHealth ( thePlayer, getElementHealth ( thePlayer ) + 100 ) end end ,1000, 0, source) ) setTimer(removeEventHandler,5000,1,'qwe',getRootElement(), source) Link to comment
iPrestege Posted February 19, 2013 Share Posted February 19, 2013 "onClientGUIClick" setTimer setElementHealth triggerServerEvent setElementHealth "onClientPlayerDamage" cancelEvent Link to comment
===|OSAMA|=== Posted February 19, 2013 Share Posted February 19, 2013 اذا في اخطاء يرجى التصحيح --ClientSide addEventHandler('onClientGUIClick', root, function( ) if ( source == ButtonName ) then triggerServerEvent('qwe', localPlayer) end end ) --ServerSide addEvent('qwe', true) addEventHandler('qwe', root, setTimer ( function ( thePlayer ) if ( thePlayer and isElement ( thePlayer ) ) then setElementHealth ( thePlayer, getElementHealth ( thePlayer ) + 100 ) end end ,1000, 0, source) ) setTimer(removeEventHandler,5000,1,'qwe',getRootElement(), source) ^ Wrong -_-" ================== -- Client Side ! addEventHandler ( "onClientGUIClick", اسم الزر, function ( ) addEventHandler ( "onClientPlayerDamage", localPlayer, Cancel ) setTimer ( function ( ) removeEventHandler ( "onClientPlayerDamage", localPlayer, Cancel ) end, 60000, 1 ) end ) function Cancel ( ) cancelEvent ( ) end على فكرة انا مسويلكـ الوقت هو 1 دقيقة ثم يرجع للوضع الطبيعي تقدر تغيرهـ بنفسكـ من خلال رقم 60000 الي موجود بسطر رقم 6 milli secondsولازم تحسب الزمن بالـ مثآل لو تبيها 2 دقيقة رح لقوقل واكتب بالبحث 2 minute = milliseconds رح يجيكـ أول خيآر ( آلة حاسبة قوقل ) و يعطيكـ الرقم وإذا ما عرفت , قلي الوقت الي تبيه وأسويةة لككـ # 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