#MostafaSaadi Posted March 8, 2015 Share Posted March 8, 2015 سـلام عليكم ورحمه الله وبريكاته يا شباب انا نزلت هذا موضوع اليوم عشان تسون لي تعديل على السكربت الي سويته امس المهم ابغى تعديل على كود التالي local marker = createMarker(x, y, z, 'cylinder', 2, 255,0,65,177) local Timer = {} addEventHandler('onMarkerHit', marker, function(player) if getElementType( player ) == 'player' then outputChatBox ( ' انتظر 40 ثانية ', player, 255, 209, 155, true ) setPedAnimation ( player, 'MISC', 'Hiker_Pose' ) toggleAllControls( player, false ) Timer[player] = setTimer( function(player) setElementHealth ( player, 100 ) setPedAnimation ( player, false ) toggleAllControls( player, true ) end,40000,1,player ) end end ) ابغى اذا دخل لاعب مره وحده ما يدخل كمان مره بسرعه على ماركر يعني ينتظر 1 دقيقه + اذا ما معه 30 دولار ما يخش ماركر يعني ما يعطيه دم Link to comment
The Killer Posted March 9, 2015 Share Posted March 9, 2015 local marker = createMarker(x, y, z, 'cylinder', 2, 255,0,65,177) local Timer = {} addEventHandler('onMarkerHit', marker, function(player) if getElementType( player ) == 'player' then if isTimer (Timer [player]) then return outputChatBox ( ' انتظر 40 ثانية ', player, 255, 209, 155, true ) end if (getPlayerMoney (player) < 30) then return outputChatBox ("You don't have enough money.", player, 255, 0, 0) end setPedAnimation ( player, 'MISC', 'Hiker_Pose' ) toggleAllControls( player, false ) Timer [player] = setTimer (function (player) setElementHealth ( player, 100 ) setPedAnimation ( player, false ) toggleAllControls( player, true ) end, 40000, 1, player) end end ) addEventHandler ("onPlayerQuit", root, function () if isTimer (Timer [source]) then killTimer (Timer [source]) Timer [source] = nil 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