-
Posts
171 -
Joined
-
Last visited
Everything posted by mustang
-
"bad argument @ killtimer epxected lua-timer at argument 1"
-
إنت متأكد إنه مفروض يتحرك أكثر من مرة ؟
-
local Mover = 0 addEvent ( "setit", true ) --if the vehicle is a car addEventHandler ( "setit", root, function ( theVeh ) theVeh = getPedOccupiedVehicle(localPlayer) outputChatBox("Working !") --tester x, y, z = getVehicleComponentPosition( theVeh, "coveral") -- get the position of the component moveT = setTimer ( function ( ) if ( Mover >= y ) then killTimer ( moveT ) end Mover = Mover + 0.001 end, 500, 0 ) setVehicleComponentPosition( theVeh, "coveral", x, Mover, z) end )
-
theVeh = getPedOccupiedVehicle(localPlayer) استبدلت vehicle ب theveh و الأمور زبطط بس في مشكله أخرى "bad argument @ killtimer epxected lua-timer at argument 1" and also the component moves 1 time only with the wrong value
-
إل سيارة أنا مصممها و إل component يتحرك على سكريبت ثاني
-
bad argument @ getVehicleComponentPosition expected vehicle at argument 1 got nil هاي المشكله
-
if ( Mover >= y ) then killTimer ( moveT ) end attempt to compare nil with number
-
ok ما بينتقل غير مرة وحده و بعض نصف ثانيه من تفعيل الفنكشن و إل قيمه إلي أريد إذا ازيده هي 0.001 ليس mover + 0.001
-
نعم لكن تدريجيا عشان يبين إنه بتحريك مو بينتقل
-
الكود الاصلي؟ هذا إل كود كامل أنا كاتبه ، مافي غير جانب السيرفر إلي إنته كتبته
-
بجرب الكود بس يجي صديقي , شكرا
-
كيف غلط و شغال ؟ بعمل ترجر كلشي شغال بس ما هاد بيشوف البزشن غيري أو الجالس جمبي
-
server : function bindKeysOnJoin(source) bindKey(source, "l", "down", setit) end addEventHandler("onVehicleEnter", getRootElement(), bindKeysOnJoin) function bindKeysOnJoin2(source) unbindKey(source, "l", "down", setit) end addEventHandler("onVehicleExit", getRootElement(), bindKeysOnJoin2) function winghide(source, key, keystate, veh) triggerClientEvent( "setit", root, veh ) end Client : addEvent ( "setit", true ) --if the vehicle is a car addEventHandler ( "setit", root, function ( veh ) theVeh = getPedOccupiedVehicle(localPlayer) if (theVeh) then outputChatBox("Working !") --tester x, y, z = getVehicleComponentPosition(theVeh, "coveral") -- get the position of the component setVehicleComponentPosition(theVeh, "coveral", x, y+0.1, z) end)
-
هذا أول شي حاولت أسوي بس للأسف ما زبط
-
لا مو ضروري في فنقشن مثل إل playsound3d إذا عملتله ترجر من إل سيرفر يسمعه كل الأشخاض إلي جمبه مع إنه كلاينت بعدين أنا قلت إنه لو كنت جالس جمب إل سائق تشوف إل تغيير
-
السلام عليكم في عندي مشكله بي هاد الفنكشن إنه بس إلي أطلقه يشوف إل بزشن الجديد أي إنه بس بيشتغل بال كلاينت هل يوجد طريقة لحل هذه المشكله؟ مع العلم إنه لو كنت جالس جمب السائق تشوف التغيير زيه أما إلي بينظر من الخارج ما يشوف إل بزشن الجديد و شكرا setVehicleComponentPosition
-
Thanks man , worked as i wanted !
-
I will try that and let you know
-
Iam trying to make draw an img with dxDrawImage but i want to show this img with different rotations for example i want this img to show on resource start with angle of 0 and after one second the angle changes to 10 then after 2 seconds it changes to 20 degrees i tried this x = 0 timer= 0 degree= 0 function drawit() while x <5 do degree = degree+ 10 timer = timer+ 1000 x = x +1 setTimer ( function() img= dxDrawImage(Disk_pos_X, Disk_pos_Y, 100, 100, "img.png", degree, 0, 0, tocolor ( 255, 255, 255, 255 ), true) end, timer, 1 ) end end but it didnt work i used outputChatBox to see what it prints , i noticed that the timer is 5000 which is 5 seconds and the degree is 50 and it prints that 5 times , any solution ? just to mention , if it was only 5 times i would do 5 timers , but iam using it for about 270 - 500 times Thanks.
-
Any answers ?
-
I have been working on a vehicle model to make it work with setVehicleComponentPosition funtion after i finished it i figured out that its Clinet-Only funtion , i have tried triggering it from a server script but still the play who triggered this function only see the change , any possible way to do it ? wiki : https://wiki.multitheftauto.com/wiki/SetVehicleComponentPosition setVehicleComponentPosition UPDATE : I have found out that if your sitting in the same car as a passenger and the driver triggers the funtion , you can see the change , maybe this will help