f5amh Posted April 26, 2014 Posted April 26, 2014 اذا خش ماركر يعطيه كود حلو وابي بعدها اذا كتب بل شات رقم 1 او 3 يعطيه فلوس function 7ob () createMarker(x,y,z) addEventHandler(''onClientMarkerHit'',root outputChatBox("احفظ هذا رقم واكتب في شات رقمك ".. math.random(1,3).."",root,255,255,255,true) end مع شرح
ΞĪŚŚÀ Posted April 26, 2014 Posted April 26, 2014 'onPlayerChat' - عند كتابة كلمة givePlayerMoney - يعطي الاعب فلوس triggerServerEvent
</Mr.Tn6eL> Posted April 27, 2014 Posted April 27, 2014 'onPlayerChat' - عند كتابة كلمة givePlayerMoney - يعطي الاعب فلوس triggerServerEvent ليه ترايقر للسيرفر كلها بالسيرفر يحطها وخلاص
</Mr.Tn6eL> Posted April 27, 2014 Posted April 27, 2014 (edited) اذا خش ماركر يعطيه كود حلووابي بعدها اذا كتب بل شات رقم 1 او 3 يعطيه فلوس function 7ob () createMarker(x,y,z) addEventHandler(onMarkerHit'',root outputChatBox("احفظ هذا رقم واكتب في شات رقمك ".. math.random(1,3).."",root,255,255,255,true) end مع شرح marker = createMarker(x, y, z, "cylinder", 1) -- صنع ماركر addEventHandler("onMarkerHit", resourceRoot, -- عند دخول الماركر function(player) -- وظيفة مع متغير اللي دخل الماركر if source == marker then -- نتحقق ان السورس هو الماركر اللي حطينه طبعا السورس بالحدث ذا هو الماركر if not getElementType(player) == "player" then return end -- اذ ماكان الي دخل الماركر لاعب يقفل الوظيفة يعني اذ دخل بيد راح يقفل الوظيفة مو شرط بيد outputChatBox("احفظ هذا رقم واكتب في شات رقمك "..math.random(1,3)..,root,255,255,255,true) -- نص بالشات end -- اند الشرط الاول حق التحقق من السور انه الماركر end -- اند الوظيفة وهو كلمة function(player) ) -- قوس اغلاق الوظيفة Edited April 27, 2014 by Guest
iMr.Dawix~# Posted April 27, 2014 Posted April 27, 2014 م فهمت انت وش تقصد او وش تبي بالضبط لكن خذ ذا الكود ضيف الي تبيه عدل عليه انت local theMark = createMarker (x,y,z,"cylinder",1.5,255,255,0,170) function onMarkHit(element) if getElementType(element) == 'player' then outputChatBox("احفظ هذا رقم واكتب في شات رقمك ".. math.random(1,3).."",root,255,255,255,true) end end addEventHandler("onMarkerHit",theMark,onMarkHit) addEventHandler("onPlayerChat",root,function (msg,msgt) if isElementWithinMarker(source,theMark) then if msg == "1" then -- اذا كتب رقم 1 elseif msg == "2" then -- اذا كتب رقم 2 elseif msg == "3" then -- اذا كتب رقم 3 end end end )
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