Ra7sErEom Posted April 19, 2014 Share Posted April 19, 2014 طلب تصحيح هذا الكود رسباون للمقرات الكود addEventHandler('onPlayerSpawn', root,function() if getTeamName(getPlayerTeam(source)) == "Police" and getElementData(source, 'gang') == '[sWAT]' then setTimer(setElementPosition, 500, 1, source, 1893.33215,489.56143,36.00030) setPedSkin ( player, 230 ) setElementHealth ( player, 100 ) setPedArmor ( player, 100 ) end end ) Link to comment
Ra7sErEom Posted April 19, 2014 Author Share Posted April 19, 2014 طبعا الكود من شكله يبين صحيح بسة ما يشتغل صح ههههههههه Link to comment
G.KinG Posted April 19, 2014 Share Posted April 19, 2014 جرب غير الحدث خله onPlayerWasted Link to comment
فاّرس Posted April 19, 2014 Share Posted April 19, 2014 حبيبي كيف الكود صح ؟ player : source غير معرفه بدلها بـ setPedSkin : setElementModel ماراح يشتغل في الاصدارات الجايه , استبدلها بـ Link to comment
KaduRo Posted April 19, 2014 Share Posted April 19, 2014 أسمح لي اخوي اوضح أخطاءك طبعآ جربت كودك اخوي وعرفت شنو الاخطاء addEventHandler('onPlayerSpawn', root,function() if getTeamName(getPlayerTeam(source)) == "Police" and getElementData(source, 'gang') == '[sWAT]' then -- ElementData بما أنه تيم ماله داعي setTimer(setElementPosition, 500, 1, source, 1893.33215,489.56143,36.00030) -- الموقع فوق البحر setPedSkin ( player, 230 ) -- لازم تستخدم تايمر هنا وحط المدة 50 جزء من الثانية , واستخدم امر -- setElementModel -- source مو معرفة , لازم تحط player ثانيآ setElementHealth ( player, 100 ) -- source نفس الكلام لازم تحط setPedArmor ( player, 100 ) -- هنا ايضآ end end ) وهذا كود شغال إذا حبيت تجربه addEventHandler('onPlayerSpawn', root, function() if getTeamName(getPlayerTeam(source)) == "Police" then setTimer(setElementPosition, 50, 1, source, 1893.33215,489.56143,36.00030) setTimer(setElementModel , 50 , 1 , source , 230) setElementHealth ( source, 30) setPedArmor ( source, 100 ) end end ) Link to comment
فاّرس Posted April 19, 2014 Share Posted April 19, 2014 (edited) -- Server Side # addEventHandler('onPlayerSpawn', root,function() if getPlayerTeam(source) and getTeamName( getPlayerTeam(source) ) == 'Police' then setTimer( function( source ) setElementPosition( source, 1893.33215,489.56143,36.00030 ) setElementModel( source , 230 ) setPedArmor( source, 1000 ) end,1000,1,source) end end ) Edited April 19, 2014 by Guest Link to comment
abu5lf Posted April 19, 2014 Share Posted April 19, 2014 -- Server Side # local Timer = {} addEventHandler('onPlayerSpawn', root,function() if getPlayerTeam(source) and getTeamName( getPlayerTeam(source) ) == 'Police' then if isTimer( Timer[source] ) then destroyElement(Timer[source]) Timer[source] = nil end Timer[source] = setTimer( function( ) setElementPosition( source, 1893.33215,489.56143,36.00030 ) setElementModel( source , 230 ) setPedArmor( source, 1000 ) end,1000,1,source) end end ) https://wiki.multitheftauto.com/wiki/SetTimer Once a timer has finished repeating, it no longer exists. Link to comment
فاّرس Posted April 19, 2014 Share Posted April 19, 2014 ممكن موت ورا بعض اكثر من مره ؟ يعني يمكن يسوي انتحار من الفري روم اكثر من مره . Link to comment
abu5lf Posted April 19, 2014 Share Posted April 19, 2014 ممكن موت ورا بعض اكثر من مره ؟ يعني يمكن يسوي انتحار من الفري روم اكثر من مره . واذا مات ورا بعض اكثر من مره وش راح يصير ؟ التايمر ثانية وينحذف مايحتاج تتحقق ولا جدول وسطر 7 في كودك لازم تحط source في الفنكشن Link to comment
KaduRo Posted April 19, 2014 Share Posted April 19, 2014 ممكن موت ورا بعض اكثر من مره ؟ يعني يمكن يسوي انتحار من الفري روم اكثر من مره . واذا مات ورا بعض اكثر من مره وش راح يصير ؟ التايمر ثانية وينحذف مايحتاج تتحقق ولا جدول وسطر 7 في كودك لازم تحط source في الفنكشن timesToExecute: The number of times you want the timer to execute, or 0 for infinite repetitions. لازم يحط 0 علشان يتكرر إلى لانهاية Link to comment
abu5lf Posted April 19, 2014 Share Posted April 19, 2014 timesToExecute: The number of times you want the timer to execute, or 0 for infinite repetitions. لازم يحط 0 علشان يتكرر إلى لانهاية باللهي ماكان احد يعرف : ( ؟ Link to comment
فاّرس Posted April 19, 2014 Share Posted April 19, 2014 اي صحيح عاشق هذي المعلومه ماقد انتبهت لها . Link to comment
KaduRo Posted April 19, 2014 Share Posted April 19, 2014 timesToExecute: The number of times you want the timer to execute, or 0 for infinite repetitions. لازم يحط 0 علشان يتكرر إلى لانهاية باللهي ماكان احد يعرف : ( ؟ اجل ليه ماقلتها من الاول -__- دامك تعرفها Link to comment
abu5lf Posted April 19, 2014 Share Posted April 19, 2014 اجل ليه ماقلتها من الاول -__- دامك تعرفها ب مناسبة ايش اقولها ؟ بعدين النقاش بيني وبين ذابيست وهو فاهم وش اقصد وانت الظاهر فهمت غلط @The Best على العموم ياذبيست ممكن تحصل مشكلة اذا كان التايمر اكثر من ثانية والافضل التحقق Link to comment
KaduRo Posted April 19, 2014 Share Posted April 19, 2014 ^ اعتذر عن التدخل بس كنت احب اوضح المعلومة , يمكن ما لاحظتوها 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