F_F Posted December 17, 2016 Share Posted December 17, 2016 ابي لما اكتب باف 8 كوماند تجيني سيارة تتلون الوان عشوائية ومايحتاج اركبها انا اول ماكتب الكوماند يدخلني السيارة Link to comment
Abu-Solo Posted December 17, 2016 Share Posted December 17, 2016 Server addEvent ( "GiveVV",true ) addEventHandler ( "GiveVV",root, function ( ID ) local vehicle = getPedOccupiedVehicle( source ) if vehicle then destroyElement( vehicle ) end if isElement ( Cars [ source ] ) then destroyElement ( Cars [ source ] ) end local x,y,z = getElementPosition ( source ) Cars [source] = createVehicle ( 535,x,y,z ) end ) Client addCommandHandler("Car", function() triggerServerEvent("GiveVV",localPlayer) end ) Link to comment
#STZ Posted December 17, 2016 Share Posted December 17, 2016 --S addEvent("Car",true) addEventHandler("Car",root, function ( ID ) local x,y,z = getElementPosition(source) Cars[source] = createVehicle(ID,x,y,z) end ) --C function CARR() triggerServerEvent("Car",localPlayer) end addCommandHandler ( "TheCommand", CARR ) مب مجرب غير الكلمة TheCommand Link to comment
MR.S3D Posted December 17, 2016 Share Posted December 17, 2016 (edited) Server Cars = {} addCommandHandler ( "Car", function ( p ) if isElement ( Cars [ p ] ) then destroyElement ( Cars [ p ] ) Cars [ p ] = nil end local x,y,z = getElementPosition ( p ) Cars [p] = createVehicle ( 535,x,y,z ) warpPedIntoVehicle(p,Cars [p]) outputChatBox('تم اعطائك السيارة!',p,255,0,0,true) end ) setTimer( function () for v in pairs( Cars ) do if isElement( Cars [v] ) then local R = math.random setVehicleColor( Cars [v],R(0,255),R(0,255),R(0,255)) else Cars [v] = nil end end end, 1000, 0) اسم الأمر Car Edited December 17, 2016 by MR.S3D 2 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