Jump to content

فاّرس

Members
  • Posts

    4,805
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by فاّرس

  1. bool setVehicleWheelStates ( vehicle theVehicle, int frontLeft, [ int rearLeft = -1, int frontRight = -1, int rearRight = -1 ]) rearLeft: A whole number representing the wheel state (-1 for no change) frontRight: A whole number representing the wheel state (-1 for no change) rearRight: A whole number representing the wheel state (-1 for no change)
  2. الاحداثيات انت تحددها ذذ في اف8 pos او /pos خذ هذا الكود ينسخ لك الاحداثيات روح المكان الي تبيه واكتب في الشات -- Client Side # addCommandHandler('pos',function() local x,y,z = getElementPosition(localPlayer) setClipboard(string.format("%.5f", x)..','..string.format("%.5f", y)..','..string.format("%.5f", z)) end )
  3. الاحداثيات انت تاخذها مو احنا نعطيك -__-"
  4. -- Server Side # addCommandHandler('WheelStates',function(plr) if isPedInVehicle(plr) then setVehicleWheelStates(getPedOccupiedVehicle(plr),2) -- فك الكفر end end ) 0: Inflated 1: Flat 2: Fallen off 3: Collisionless
  5. addEventHandler ('onClientGUIClick', getRootElement(),function () if source == GUIEditor_Button[4] then setWeather ( 9 ) outputChatBox('تم تغير الطقص الى ضباب' ) elseif source == GUIEditor_Button[1] then setWeather ( 8 ) outputChatBox('تم تغير الطقس الى ماطر') elseif source == GUIEditor_Button[3] then setWeather ( 0 ) outputChatBox('تم تغير الطقس الى طبيعي') elseif source == GUIEditor_Button[5] then setWeather ( 19 ) outputChatBox('تم تغير الطقس الى عاصفة') elseif source == GUIEditor_Button[2] then setTime( 1, 0 ) outputChatBox('الساعة الان الواحدة') elseif source == GUIEditor_Button[8] then setTime( 6, 0 ) outputChatBox('الساعة الان السادسة') elseif source == GUIEditor_Button[7] then setTime( 12, 0 ) outputChatBox('الساعة الان الثانية عشر') elseif source == GUIEditor_Button[6] then setTime( 10, 0 ) outputChatBox('الساعة الان السادسة عشر') end end ) addEventHandler ( 'onClientRender', root,function ( ) if ( guiGetVisible ( GUIEditor.window[1] ) ) then guiSetText ( GUIEditor.label[21], 'Your money: ' .. getPlayerMoney ( ) ) end end ) addEventHandler('onClientGUIClick',getRootElement(),function() if ( source == GUIEditor.button[9] ) then local playerNick = guiGetText(nameEdit) local amount = guiGetText(amountEdit) triggerServerEvent('onSendMoney', localPlayer, playerNick, amount) end end )
  6. الكود اساسا , لازم واحد يضربك ذذ @ #Faceook السطر 2 ¬= > ==
  7. setTeamFriendlyFire لو دخلت على الكود https://wiki.multitheftauto.com/wiki/se ... iendlyFire تلقى مثال انسخه والصقه وخلاص ذذ -- Server Side # -- get a table with all teams local allTeams = getElementsByType ( "team" ) -- for every team, for index, theTeam in ipairs(allTeams) do -- if friendly fire is off, if ( getTeamFriendlyFire ( theTeam ) == false ) then -- switch it on setTeamFriendlyFire ( theTeam, true ) end end
  8. plr = x -- Client Side # function show() if getElementDimension ( localPlayer ) ~= 1 then return end if guiGetVisible(wnd) == false then guiSetVisible(wnd, true) showCursor(true) else guiSetVisible(wnd, false) showCursor(false) end end bindKey("F3", "down", show)
  9. العفو , اذا عندك اي مشكله احنا حاضرين
  10. ما اشوف انك نسخت الاكواد الي عطيتك بالاساس -__- -- Client Side # GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Edit = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(353,184,180,150,"",false) GUIEditor_Edit[1] = guiCreateEdit(12,88,146,32,"",false,GUIEditor_Window[1]) GUIEditor_Edit[2] = guiCreateEdit(14,46,50,35,"",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(80,46,80,33,"",false,GUIEditor_Window[1]) GUIEditor_Window[2] = guiCreateWindow(150,208,200,247,"",false) GUIEditor_Grid[1] = guiCreateGridList(10,24,181,180,false,GUIEditor_Window[2]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiGridListAddColumn(GUIEditor_Grid[1],"Car ",0.9) GUIEditor_Button[2] = guiCreateButton(60,204,86,34,"DELETE",false,GUIEditor_Window[2]) addEventHandler('onClientGUIClick',root,function () local row, col = guiGridListGetSelectedItem(GUIEditor_Grid[1]) local name = guiGridListGetItemText(GUIEditor_Grid[1],row,1) local vehicle = guiGridListGetItemText(GUIEditor_Grid[1],row,2) if ( source == GUIEditor_Button[1] ) then local plrName = guiGetText(GUIEditor_Edit[1]) local carID = guiGetText(GUIEditor_Edit[1]) if not tonumber(carID) or carID == '' or plrName == '' then return end local carName = getVehicleNameFromModel ( tonumber ( carID ) ) triggerServerEvent('Save',localPlayer, carName,plrName) elseif ( source == GUIEditor_Button[2] ) then if ( row and col and row ~= -1 and col ~= -1 ) then triggerServerEvent('RemoveRow', localPlayer, vehicle,name,row) end end end ) addEvent ( 'RemoveFromGrid' , true) addEventHandler ( 'RemoveFromGrid', root,function ( theRow ) guiGridListRemoveRow (GUIEditor_Grid[1], tostring(theRow) ) end ) addEvent ( 'AddDataCarName', true ) addEventHandler ( 'AddDataCarName', root,function (car,plr) local row = guiGridListAddRow ( GUIEditor_Grid[1] ) guiGridListSetItemText ( GUIEditor_Grid[1], row, 1,tostring ( plr ), false, false ) guiGridListSetItemText ( GUIEditor_Grid[1], row, 2,tostring ( car ), false, false ) end ) addEvent ( 'AddCarName', true ) addEventHandler ( 'AddCarName', root,function ( onClientSqlList ) guiGridListClear ( GUIEditor_Grid[1] ) for _, v in ipairs ( onClientSqlList ) do local row = guiGridListAddRow ( GUIEditor_Grid[1] ) guiGridListSetItemText (GUIEditor_Grid[1], row, 1, tostring ( v.plr ), false, false ) guiGridListSetItemText (GUIEditor_Grid[1], row, 2, tostring ( v.car ), false, false ) end end ) addEventHandler('onClientResourceStart',resourceRoot,function() triggerServerEvent ( 'Refresh', localPlayer ) end ) -- Server Side # addEventHandler ( 'onResourceStart', resourceRoot,function ( ) executeSQLQuery ( "CREATE TABLE IF NOT EXISTS `CarSystem` (car,plr)" ) outputDebugString("SQL Data Base Started!",0,0,255,0,0) end ) function setSQL_Data ( car , plr) return executeSQLQuery ( "INSERT INTO `CarSystem` ( `car`, `plr` ) VALUES ( ?,? )", tostring(car),tostring(plr) ) end function SelectFromSql ( ) local data = executeSQLQuery ( "SELECT * FROM `CarSystem`" ) if ( type ( data ) == "table" and #data == 0) or not data then return { } else return data; end end function UpDateListInSql ( element ) if ( not isElement ( element ) ) then return; end local Upsql = SelectFromSql ( ) triggerClientEvent ( element, "AddCarName", element, Upsql ) end addEvent ( 'Save', true ) addEventHandler ( 'Save', root,function (car,plr) setSQL_Data (car,plr) triggerClientEvent ( root, "AddDataCarName", root,car,plr ) end ) addEvent('RemoveRow', true) addEventHandler('RemoveRow', root, function(vehicle, name,row) executeSQLQuery("DELETE FROM `CarSystem` WHERE `car` = '" .. tostring(vehicle) .. "' AND plr = '".. tostring(name) .."'") triggerClientEvent('RemoveFromGrid',root,tonumber(row)) end ) addEvent ( 'Refresh', true ) addEventHandler ( 'Refresh', root,function ( ) UpDateListInSql ( source ) end )
  11. وش لا فائده؟ جربته شغال -__- اطرح اكوادك كلها مع النوافذ ,,
  12. ماقد شفت شركه عربية عندها خدمات سريعه -__-, , وانا اقول الاجانب اذا دخلوا العاب الحرب بالاون لاين كيف يقتلون بسرعه البنق ما يتعدى 10
  13. -- Client Side # addEventHandler('onClientGUIClick',root,function () local row, col = guiGridListGetSelectedItem(GUIEditor_Grid[1]) local name = guiGridListGetItemText(GUIEditor_Grid[1],row,1) local vehicle = guiGridListGetItemText(GUIEditor_Grid[1],row,2) if ( source == GUIEditor_Button[1] ) then local plrName = guiGetText(GUIEditor_Edit[1]) local carID = guiGetText(GUIEditor_Edit[1]) if not tonumber(carID) or carID == '' or plrName == '' then return end local carName = getVehicleNameFromModel ( tonumber ( carID ) ) triggerServerEvent('Save',localPlayer, carName,plrName) elseif ( source == GUIEditor_Button[2] ) then if ( row and col and row ~= -1 and col ~= -1 ) then triggerServerEvent('RemoveRow', localPlayer, vehicle,name,row) end end end ) addEvent ( 'RemoveFromGrid' , true) addEventHandler ( 'RemoveFromGrid', root,function ( theRow ) guiGridListRemoveRow (GUIEditor_Grid[1], tostring(theRow) ) end ) addEvent ( 'AddDataCarName', true ) addEventHandler ( 'AddDataCarName', root,function (car,plr) local row = guiGridListAddRow ( GUIEditor_Grid[1] ) guiGridListSetItemText ( GUIEditor_Grid[1], row, 1,tostring ( plr ), false, false ) guiGridListSetItemText ( GUIEditor_Grid[1], row, 2,tostring ( car ), false, false ) end ) addEvent ( 'AddCarName', true ) addEventHandler ( 'AddCarName', root,function ( onClientSqlList ) guiGridListClear ( GUIEditor_Grid[1] ) for _, v in ipairs ( onClientSqlList ) do local row = guiGridListAddRow ( GUIEditor_Grid[1] ) guiGridListSetItemText (GUIEditor_Grid[1], row, 1, tostring ( v.plr ), false, false ) guiGridListSetItemText (GUIEditor_Grid[1], row, 2, tostring ( v.car ), false, false ) end end ) addEventHandler('onClientResourceStart',resourceRoot,function() triggerServerEvent ( 'Refresh', localPlayer ) end ) -- Server Side # addEventHandler ( 'onResourceStart', resourceRoot,function ( ) executeSQLQuery ( "CREATE TABLE IF NOT EXISTS `CarSystem` (car,plr)" ) outputDebugString("SQL Data Base Started!",0,0,255,0,0) end ) function setSQL_Data ( car , plr) return executeSQLQuery ( "INSERT INTO `CarSystem` ( `car`, `plr` ) VALUES ( ?,? )", tostring(car),tostring(plr) ) end function SelectFromSql ( ) local data = executeSQLQuery ( "SELECT * FROM `CarSystem`" ) if ( type ( data ) == "table" and #data == 0) or not data then return { } else return data; end end function UpDateListInSql ( element ) if ( not isElement ( element ) ) then return; end local Upsql = SelectFromSql ( ) triggerClientEvent ( element, "AddCarName", element, Upsql ) end addEvent ( 'Save', true ) addEventHandler ( 'Save', root,function (car,plr) setSQL_Data (car,plr) triggerClientEvent ( root, "AddDataCarName", root,car,plr ) end ) addEvent('RemoveRow', true) addEventHandler('RemoveRow', root, function(vehicle, name,row) executeSQLQuery("DELETE FROM `CarSystem` WHERE `car` = '" .. tostring(vehicle) .. "' AND plr = '".. tostring(name) .."'") triggerClientEvent('RemoveFromGrid',root,tonumber(row)) end ) addEvent ( 'Refresh', true ) addEventHandler ( 'Refresh', root,function ( ) UpDateListInSql ( source ) end )
  14. 63 + 63 + 63 + 63 + 63 + 63 + 63 = 441 + 63 = 504. قناة جميله جدآ, https://www.youtube.com/user/alkaheeltube?feature=watch
  15. وش تبي تسوي بالضبط؟, الي فهمته انك تبي لو حذفت سيارته تختفي من الجريد ليست صح ولا لا؟ طيب كيف نظام الجريد ليست؟ يعني اسم اللاعب وجنبه رو مكتوب فيه انه معه سياره؟ واطرح اكوادك كامله ,,
  16. countPlayersInTeam getTeamFromName بالنسبه عدد الي داخل الماركر , استخدم وظيفه طلال, https://wiki.multitheftauto.com/wiki/getPlayersInMarker
  17. position = { {x,y,z}, {x,y,z}, {x,y,z}, {x,y,z} } for k,v in ipairs(position) do createMarker(v[1],v[2],v[3],'cylinder',2,255,0,255) end
  18. الله يعافيك, والعفو
×
×
  • Create New...