Jump to content

PaiN^

Members
  • Posts

    2,258
  • Joined

  • Last visited

Everything posted by PaiN^

  1. القسم غلط + نزل مشكلتك في موضوع ديلوكس https://forum.multitheftauto.com/viewtopic.php?f=165&t=50288
  2. ( C, C#, C++ ) Cأعتقد وحدة من لغات الـ
  3. PaiN^

    move Objcet

    3ssol = createObject( ... ) function move( ) local x, y, z = getElementPosition( 3ssol ) moveObject( 3ssol, 1000, x + 2, y, z ) return true end addEventHandler( "onResourceStart", resourceRoot, function( ) for k,v in ipairs( getElementsByType( "player" ) ) do bindKey( v, "arrow_l", "down", move ) end end )
  4. PaiN^

    move Objcet

    مافي جاهز ذذ
  5. PaiN^

    [HELP]Criminal

    The team name is "Criminal" not "Criminals" ! + You're missing and "end" function createCriminalTeam( ) Criminalteam = createTeam( "Criminal", 255, 0, 0 ) end addEventHandler( "onResourceStart", resourceRoot, createCriminalTeam ) addEvent( "enterCriminalJob", true ) function setPlayerCriminal( thePlayer ) if getElementType( thePlayer ) == "player" then local playerID = exports.server:playerID( thePlayer ) local oldTeam = getPlayerTeam( thePlayer ) local playerData = exports.DENmysql:querySingle( "SELECT * FROM accounts WHERE id=? LIMIT 1", playerID ) if ( playerData ) then setElementData( thePlayer, "Occupation", "Criminal", true ) setPlayerTeam( thePlayer, getTeamFromName( "Criminal") ) setElementModel( thePlayer, tonumber( playerData.skin ) ) if ( tonumber( playerData.skin ) == 0 ) then local CJCLOTTable = fromJSON( tostring( playerData.cjskin ) ) if CJCLOTTable then for theType, index in pairs( CJCLOTTable ) do local texture, model = getClothesByTypeIndex( theType, index ) addPedClothes( thePlayer, texture, model, theType ) end end end if ( getTeamName( oldTeam ) ~= "Criminal" ) then triggerEvent( "onPlayerTeamChange", thePlayer, oldTeam, getTeamFromName( "Criminal" ) ) end triggerEvent( "onPlayerJobChange", thePlayer, "Criminal", getTeamFromName( "Criminal" ) ) exports.CPTvehicles:reloadFreeVehicleMarkers( thePlayer, true ) exports.CPThelp:createNewHelpMessageForPlayer( thePlayer, "You are now a criminal!", 200, 0, 0 ) return true else return false end end end addEventHandler( "enterCriminalJob", root, setPlayerCriminal ) function givePlayerCJClothes( thePlayer ) local playerID = exports.server:playerID( thePlayer ) local playerData = exports.DENmysql:querySingle( "SELECT * FROM accounts WHERE id=? LIMIT 1", playerID ) if ( playerData ) then setElementModel( thePlayer, 0 ) local CJCLOTTable = fromJSON( tostring( playerData.cjskin ) ) if CJCLOTTable then for theType, index in pairs( CJCLOTTable ) do local texture, model = getClothesByTypeIndex( theType, index ) addPedClothes( thePlayer, texture, model, theType ) end end return true else return false end end
  6. PaiN^

    [HELP]Criminal

    You need a team element at setPlayerTeam, Use getTeamFromName .
  7. and please use [lua][ /lua] tag while posting lua codes
  8. PaiN^

    move Objcet

    getElementPosition لوول كلام سوجن صح راح يحتاج
  9. ! غير مجرب -- # Client Side GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(202,125,624,564,"Show gta3.img Files",false) guiSetAlpha(GUIEditor_Window[1],1) guiWindowSetSizable(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[1], false) GUIEditor_Grid[1] = guiCreateGridList(9,20,606,493,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) c1 = guiGridListAddColumn(GUIEditor_Grid[1],"Name",0.2) c = guiGridListAddColumn(GUIEditor_Grid[1],"the Info",0.9) GUIEditor_Button[1] = guiCreateButton(18,526,237,29,"Copy",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(413,519,202,36,"close Window",false,GUIEditor_Window[1]) function showWindow( ) guiSetVisible( GUIEditor_Window[1], not guiGetVisible( GUIEditor_Window[1] ) ) showCursor( guiGetVisible( GUIEditor_Window[1] ) ) end bindKey("F6","down",showWindow) addEvent("addInfo", true) addEventHandler("addInfo", root, function( line, theName ) local row = guiGridListAddRow( GUIEditor_Grid[1] ) guiGridListSetItemText ( GUIEditor_Grid[1], row, c1, theName, false, false ) guiGridListSetItemText ( GUIEditor_Grid[1], row, c, line, false, false ) end ) addEventHandler("onClientGUIClick", root, function() if (source == GUIEditor_Button[2]) then guiSetVisible(GUIEditor_Window[1], false) showCursor( false ) elseif (source == GUIEditor_Button[1]) then local r = guiGridListGetSelectedItem ( GUIEditor_Grid[1] ) if r and r ~= -1 then local theCopy = guiGridListGetItemText ( GUIEditor_Grid[1], r, c ) setClipboard( theCopy ) outputChatBox("Information has been copied", 255, 255, 0, false) else outputChatBox("Please select that you want to copy", 255, 0, 0, false) end end end ) -- # Server Side function handleOnPlayerModInfo(filename, modList) local theName = getPlayerName(source):gsub("#%x%x%x%x%x%x","") for idx, mod in ipairs(modList) do local line = tostring(idx)..") "..tostring(mod.name) triggerClientEvent(root, "addInfo", root, line, theName) end end addEventHandler("onPlayerModInfo", root, handleOnPlayerModInfo)
  10. .gif was his second opinion, read all his post :
  11. @ Mr.Pres[T]ege : بقيمته + واحد أو واحد number عناد عرف المتغير في أول مرة راح تعتبر قيمته 1, أما بعد كذا تعتبر قيمته + 1 nil يعني لو كان
  12. PaiN^

    move Objcet

    @ ][sojn][ : getElementPosition ما يحتاج @ xXDawiXx : و ليش التايمر ؟
  13. PaiN^

    move Objcet

    createObject bindKey moveObject
  14. وليه كل ذا التعقيد setTeamFriendlyFire( getTeamFromName( "Army" ), false ) ! Army إذا ما ضبط فما عندك تيم إسمه
  15. https://forum.multitheftauto.com/viewtopic.php?f=148&t=40809 https://forum.multitheftauto.com/viewtopic.php?f=91&t=39678
  16. You mean triggerServerEvent ? I didn't understand what you said !
  17. If you can do somehing server side or client side, Allways do it server side !
  18. setTimer or "onClientRender" guiSetPosition
  19. remove the "local" at the first line P.S. : Why are you reseting the timer while you can just make it infinite ?
  20. مو شرط ملف مضغوط عادي لو مجلد
  21. هنا منتدى تعليم ما نعطي لا اكواد ولا مودات نساعدك انت تسوي عشان تتعلم وانا عطيتك الوظايف اللي تحتاجها, حاول وبنساعدك ان شاء الله
  22. PaiN^

    faster

    I didn't understand
×
×
  • Create New...