taha201100 Posted March 19, 2016 Author Share Posted March 19, 2016 ما زال الخطأ قائم Link to comment
#|_oskar_|# Posted March 19, 2016 Share Posted March 19, 2016 ما زال الخطأ قائم تبي تسوي بعد مده محده يعطيه سلاح ؟ Link to comment
taha201100 Posted March 19, 2016 Author Share Posted March 19, 2016 انا حاطط تايمر للزر يعني ما ينفع يوخذ سلاح الا بعد مدة Link to comment
#Mr.Rajo~,< Posted March 19, 2016 Share Posted March 19, 2016 انا حاطط تايمر للزر يعني ما ينفع يوخذ سلاح الا بعد مدة الارقمنت الاول بفنكشن سيت تايمر اسم الفنكشن او تحط الفنكشن داخله وانت حاط متغير Link to comment
#Mr.Rajo~,< Posted March 19, 2016 Share Posted March 19, 2016 timer setTimer ( function theFunction, int timeInterval, int timesToExecute, [ var arguments... ] ) اما مثل حق ميزو setTimer ( function () giveWeapon (source, 90,22) end,7000,1) او function Weap() giveWeapon (source, 90,22) end setTimer ( Weap,7000,1) ماينفع تجيب متغير وتحطه باول ارقمنت Link to comment
#|_oskar_|# Posted March 19, 2016 Share Posted March 19, 2016 (edited) سويته لك بظريقه اسهل ومفهومه local wtimers ={} function GiveWeaponInTimer(min,sic,elem,id,ammo,text,r,g,b) wtimers[elem] = setTimer ( function(elem) giveWeapon(elem,id,ammo,true) outputChatBox(text,elem,r,g,b,true) end, min,sic,elem) end ------ addCommandHandler( "g",function(player) GiveWeaponInTimer(1000,1,player,38,500,"#00FF00Minigun",255,0,0) GiveWeaponInTimer(2000,1,player,34,1000,"#FFFFA1Sniper",255,0,0) GiveWeaponInTimer(3000,1,player,4,1,"#FF0000Knife",255,0,0) end) Edited March 19, 2016 by Guest Link to comment
Mr.R Posted March 19, 2016 Share Posted March 19, 2016 انا حاطط تايمر للزر يعني ما ينفع يوخذ سلاح الا بعد مدة مثال على طلبك addEventHandler ( "onClientGUIClick", resourceRoot, function ( ) if ( source == اسم الزر ) then if ( isTimer ( Timer ) ) then return end Timer = setTimer ( function ( ) end, 4000, 1 ) -- بدّل 4000 بالمده الي تبيها end end ) Link to comment
!#NssoR_) Posted March 19, 2016 Share Posted March 19, 2016 سويته لك بظريقه اسهل ومفهومه local wtimers ={} function GiveWeaponInTimer(min,sic,elem,id,ammo,text,r,g,b) wtimers[elem] = setTimer ( function(elem) giveWeapon(elem,id,ammo) setPedWeaponSlot(elem, getSlotFromWeapon(id)) outputChatBox(text,elem,r,g,b,true) end, min,sic,elem) end ------ addCommandHandler( "g",function(player) GiveWeaponInTimer(1000,1,player,38,500,"#00FF00Minigun",255,0,0) GiveWeaponInTimer(2000,1,player,34,1000,"#FFFFA1Sniper",255,0,0) GiveWeaponInTimer(3000,1,player,4,1,"#FF0000Knife",255,0,0) end) عندي ملاحظة بسيطه علي كودك سطر 5 ماله داعي تقدر تسوي كذا giveWeapon(elem,id,ammo,true) وبيكون السلاح بيده علي طول واتمني لك التوفيق Link to comment
#|_oskar_|# Posted March 19, 2016 Share Posted March 19, 2016 سويته لك بظريقه اسهل ومفهومه local wtimers ={} function GiveWeaponInTimer(min,sic,elem,id,ammo,text,r,g,b) wtimers[elem] = setTimer ( function(elem) giveWeapon(elem,id,ammo) setPedWeaponSlot(elem, getSlotFromWeapon(id)) outputChatBox(text,elem,r,g,b,true) end, min,sic,elem) end ------ addCommandHandler( "g",function(player) GiveWeaponInTimer(1000,1,player,38,500,"#00FF00Minigun",255,0,0) GiveWeaponInTimer(2000,1,player,34,1000,"#FFFFA1Sniper",255,0,0) GiveWeaponInTimer(3000,1,player,4,1,"#FF0000Knife",255,0,0) end) عندي ملاحظة بسيطه علي كودك سطر 5 ماله داعي تقدر تسوي كذا giveWeapon(elem,id,ammo,true) وبيكون السلاح بيده علي طول واتمني لك التوفيق تسلم ع المعلومه تم اضافته وشكرا لك Link to comment
!#NssoR_) Posted March 19, 2016 Share Posted March 19, 2016 تسلم ع المعلومه تم اضافته وشكرا لك حيااك الله بأي وقت . 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