gadid-lua Posted May 1, 2017 Posted May 1, 2017 السلام عليكم شباب ممكن فاكشنات مثلا اذا ذهبت الى ماركر يدخلني للمهمة والمهمة عبارة عن سباق توصل للماركر انت الاول تربح وتأخذ فلوس والماركر اللي يدخل للمهمة يبدأ كل 5 دقائق وشكرا
#BrosS Posted May 1, 2017 Posted May 1, 2017 setTimer "onMarkerHit" setElementPosition warpPedIntoVehicle -- Maybe ? "onMarkerHit" -- ماركر اللي داخل المهمة givePlayerMoney setElementPosition -- خرجهم من المهمة “من أراد الفشل عليه بالنجاح”
^iiEcoo'x_) Posted May 2, 2017 Posted May 2, 2017 حسب ما فهمت إنه جري بين اللاعبين ! local aTable_ = { } local aMarker_ = createMarker ( ... ) local aMissionJoin_ = false function openMission_ ( ) local aTimer_ = setTimer ( function ( ) outputChatBox ( ' Mission Has Been Opend ' , root ) aMissionJoin = true end , 1000*60*5 , 1 ) end openMission_ ( ) function getPlayerTable(player, Table) for i, v in ipairs (Table) do if (v == player) then return true end end end addEventHandler ( 'onMarkerHit' , root , function ( aPlayer_ ) if ( source == aMarker_ ) then if ( getElementType ( aPlayer_ ) == 'player' ) and ( not isPedInVehicle ( aPlayer ) ) then if ( aMissionJoin_ == false ) then return outputChatBox ( ' Mission Close ' , aPlayer_ ) end table.insert ( aTable_ , aPlayer_ ) setElementPosition ( aPlayer_ , x , y , z ) setElementFrozen ( aPlayer_ , true ) outputChatBox ( ' Your Join To Mission ', aPlayer_ ) setTimer ( function ( ) for _ , v in ipairs ( getElementsByType ( 'player' ) ) do if ( getPlayerTable ( v , aTable_ ) ) then setElementFrozen ( v , false ) outputChatBox ( ' Mission Started ' , root ) setElementData ( aMarker2_ , 'Data' , false ) aMissionJoin_ = false end end end , 1000*30 , 1 ) end end end ) local aMarker2_ = createMarker ( ... ) setElementData ( aMarker2_ , 'Data' , true ) addEventHandler ( 'onMarkerHit' , root , function ( aPlayer_ ) if ( source == aMarker2_ ) then if ( getElementType ( aPlayer_ ) == 'player' ) and ( not isPedInVehicle ( aPlayer ) ) then if ( getElementData ( aMarker2_ , 'Data' ) == true ) then return end givePlayerMoney ( aPlayer_ , 1000 ) setElementData ( aMarker2_ , 'Data' , true ) outputChatBox ( ' * [ '.. getPlayerName ( aPlayer_ ) .. ' ] فاز في المهمة ' , root ) for _ , v in ipairs ( getElementsByType ( 'player' ) ) do if ( getPlayerTable ( v , aTable_ ) ) then table.remove ( aTable , v ) killPed ( v ) end end openMission_ ( ) end end end ) - Hashemite Kingdom Of Jordan -
MR.StoRm Posted May 3, 2017 Posted May 3, 2017 23 hours ago, #_iMr.[E]coo said: حسب ما فهمت إنه جري بين اللاعبين ! local aTable_ = { } local aMarker_ = createMarker ( ... ) local aMissionJoin_ = false function openMission_ ( ) local aTimer_ = setTimer ( function ( ) outputChatBox ( ' Mission Has Been Opend ' , root ) aMissionJoin = true end , 1000*60*5 , 1 ) end openMission_ ( ) function getPlayerTable(player, Table) for i, v in ipairs (Table) do if (v == player) then return true end end end addEventHandler ( 'onMarkerHit' , root , function ( aPlayer_ ) if ( source == aMarker_ ) then if ( getElementType ( aPlayer_ ) == 'player' ) and ( not isPedInVehicle ( aPlayer ) ) then if ( aMissionJoin_ == false ) then return outputChatBox ( ' Mission Close ' , aPlayer_ ) end table.insert ( aTable_ , aPlayer_ ) setElementPosition ( aPlayer_ , x , y , z ) setElementFrozen ( aPlayer_ , true ) outputChatBox ( ' Your Join To Mission ', aPlayer_ ) setTimer ( function ( ) for _ , v in ipairs ( getElementsByType ( 'player' ) ) do if ( getPlayerTable ( v , aTable_ ) ) then setElementFrozen ( v , false ) outputChatBox ( ' Mission Started ' , root ) setElementData ( aMarker2_ , 'Data' , false ) aMissionJoin_ = false end end end , 1000*30 , 1 ) end end end ) local aMarker2_ = createMarker ( ... ) setElementData ( aMarker2_ , 'Data' , true ) addEventHandler ( 'onMarkerHit' , root , function ( aPlayer_ ) if ( source == aMarker2_ ) then if ( getElementType ( aPlayer_ ) == 'player' ) and ( not isPedInVehicle ( aPlayer ) ) then if ( getElementData ( aMarker2_ , 'Data' ) == true ) then return end givePlayerMoney ( aPlayer_ , 1000 ) setElementData ( aMarker2_ , 'Data' , true ) outputChatBox ( ' * [ '.. getPlayerName ( aPlayer_ ) .. ' ] فاز في المهمة ' , root ) for _ , v in ipairs ( getElementsByType ( 'player' ) ) do if ( getPlayerTable ( v , aTable_ ) ) then table.remove ( aTable , v ) killPed ( v ) end end openMission_ ( ) end end end ) ناسي إيند لـ سطر 57 :": @#_iMr.[E]coo
Abdul KariM Posted May 3, 2017 Posted May 3, 2017 الاكواد فيها اخطاء [ Skype : kreee89 - Discord : Abdul_KariM#1326 / طلبات البرمجة ] https://www.paypal.me/AbdulKariMx / اذا حاب تدعمني
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