Me[Z]oO Posted January 6, 2016 Share Posted January 6, 2016 السلام عليكم ابي فنكشنات عندي ٣ ايفنت بسيرفر سايد ابي لما يضغط زر يسوي تريقر واحد من ال٣ عشوائي طبعا علي ما اظن math.random ثاني طلب ابي لو داتا زادت يعطيه فلوس بس كيف اتحقق ان الداتا زادت ؟ Note لا احد يخرج عن الموضوع وبعتذر لو في خطا املائي لاني اكتب من الجوال Link to comment
justboy Posted January 6, 2016 Share Posted January 6, 2016 الطلب الاول استخدم الطريقة ذي -- client side triggerServerEvent('tt',element,math.random(1,3)) -- server side addEvent('tt',true) addEventHandler('tt',root, function(num) if num == 1 then -- your code elseif num == 2 then -- your code elseif num == 3 then -- your code end end) بالنسبة للطلب الثاني استخدم onElementDataChange ^ مثال من الويكي function outputChange(dataName,oldValue) if getElementType(source) == "player" then -- check if the element is a player local newValue = getElementData(source,dataName) -- find the new value outputChatBox("Your element data '"..tostring(dataName).."' has changed from '"..tostring(oldValue).."' to '"..tostring(newValue).."'",source) -- output the change for the affected player end end addEventHandler("onElementDataChange",getRootElement(),outputChange) برب نوم 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