Jump to content

RLP[Farouk]

Members
  • Posts

    70
  • Joined

  • Last visited

Everything posted by RLP[Farouk]

  1. السلام عليكم ميكانيكي-- شباب بدي حد يصلح هاد الكود لما يصلح بدي مو ضروري يكون في السيارة ليصلحها لما اصلح: المصلح بنصق منه فلوس بدل ما ياخد --MechanicFix function fixCar (player,command) skin = getPedSkin (player) if ( skin == 50 ) then local vehicle = getPedOccupiedVehicle(player) if (vehicle) then fixVehicle(vehicle) takePlayerMoney(player,100) end end end addCommandHandler("repair" , fixCar) addCommandHandler("rp" , fixCar)
  2. مش ظابطه معي بعطيكم الكود كامل انا ما عدلت عليه شي سيرفر lockVehicles = { [470]=true } --sets the lock vehicles lockSkins = { [287] =true } -- sets the lock skins lockMedicVeiculos = { [416] = true ; } -- sets the lock skins lockMedicSkin = { [274] = true ; [275] = true ; [276] = true ; } -- sets the lock skins lockBomberVehicle = { [277] = true ; [407] = true ; [544] = true ; } -- sets the lock skins lockBomberSkin = { [277] = true ; [278] = true ; [279] = true ; } -- sets the lock skins lockPoliceVeiculos = { [598] = true ; [523] = true ; [427] = true ; [596] = true ; [597] = true ; [599] = true ; [428] = true ; [601] = true ; } -- sets the lock skins lockPoliceSkin = { [280] = true ; [281] = true ; [282] = true ; [283] = true ; [284] = true ; [285] = true ; [286] = true ; [287] = true ; [288] = true ; } -- sets the lock skins function lockenterVehicle ( player, seat, jacked ) if ( lockVehicles[getElementModel ( source )] ) and ( not lockSkins[getElementModel ( player )] ) and ( seat == 0 ) then cancelEvent() outputChatBox ( "*You can't get in this vehicle.", player , 255, 00, 00) end end addEventHandler ( "onVehicleStartEnter", getRootElement(), lockenterVehicle ) function lockPolice ( player, seat, jacked ) if ( lockPoliceVeiculos[getElementModel ( source )] ) and ( not lockPoliceSkin[getElementModel ( player )] ) and ( seat == 0 ) then cancelEvent() outputChatBox ( "*You can't get in this vehicle.", player , 255, 00, 00) end end addEventHandler ( "onVehicleStartEnter", getRootElement(), lockPolice ) function lockMedic ( player, seat, jacked ) if ( lockMedicVeiculos[getElementModel ( source )] ) and ( not lockMedicSkin[getElementModel ( player )] ) and ( seat == 0 ) then cancelEvent() outputChatBox ( "*You can't get in this vehicle.", player , 255, 00, 00) end end addEventHandler ( "onVehicleStartEnter", getRootElement(), lockMedic ) function lockBomber ( player, seat, jacked ) if ( lockBomberVehicle[getElementModel ( source )] ) and ( not lockBomberSkin[getElementModel ( player )] ) and ( seat == 0 ) then cancelEvent() outputChatBox ( "*You can't get in this vehicle.", player , 255, 00, 00) end end addEventHandler ( "onVehicleStartEnter", getRootElement(), lockBomber )
  3. طيب هيك مظبوط؟؟؟ function lockenterVehicle ( player, seat, jacked ) if ( lockVehicles[getElementModel ( source )] ) and ( not lockSkins[getElementModel ( player )] ) and ( seat == 0 ) then cancelEvent() GUIEditor_Label[1] = guiCreateLabel(328,549,157,19,"You can't enter this vehicle.",false) end end شباب رجاءً تحملوني شوي
  4. شباب هيك صح ؟؟؟ function lockenterVehicle ( player, seat, jacked ) if ( lockVehicles[getElementModel ( source )] ) and ( not lockSkins[getElementModel ( player )] ) and ( seat == 0 ) then cancelEvent() dxDrawText ( "*You can't get in this vehicle.", player , 255, 00, 00) end end
  5. ممكن تحط مثال كامل وانا اعدل عليه؟؟
  6. السلام عليكم شباب بدي كود يظهر الكلام في الشاشه مش بالشات مثلا, انا حرامي وبدي اركب سيارة شرطة وبكتب You can not enter the vehicle الكلام ده بدي يطلع في الشاشة في اي مكان تحت او فوق مش بالشات
  7. وش هو الماركر؟؟؟؟؟؟؟؟
  8. السلام عليكم اريد كود الادمن الوحيد يستطيع استخدام قائمة معينه ولدي مشكلة بهذه تظهر القائمة تلقئياً عند دخول السيرفر GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Window[1] = guiCreateWindow(0.3275,0.3383,0.48,0.4717,"Blip panel",true) x1 = guiCreateEdit(0.3021,0.1378,0.3698,0.106,"",true,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(0.4661,0.0707,0.224,0.0636,"X",true,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[1],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[1],"left",false) y1 = guiCreateEdit(0.3021,0.2968,0.3698,0.106,"",true,GUIEditor_Window[1]) y2 = guiCreateLabel(0.4609,0.2473,0.25,0.053,"Y",true,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[2],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[2],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[2],"left",false) z1 = guiCreateEdit(0.3021,0.4558,0.3724,0.1095,"",true,GUIEditor_Window[1]) z2 = guiCreateLabel(0.4609,0.3958,0.2214,0.053,"Z",true,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[3],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[3],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[3],"left",false) id = guiCreateEdit(0.3021,0.6325,0.3672,0.1095,"",true,GUIEditor_Window[1]) GUIEditor_Label[4] = guiCreateLabel(0.3906,0.5689,0.2266,0.0671,"blip number",true,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[4],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[4],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[4],"left",false) GUIEditor_Button[1] = guiCreateButton(0.6198,0.7774,0.2786,0.1272,"Get Position",true,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(0.1094,0.7774,0.2813,0.1272,"create blip",true,GUIEditor_Window[1]) function onGuiClick (button, state, absoluteX, absoluteY) if (source == GUIEditor_Button[1]) then local x,y,z = getElementPosition (getLocalPlayer()) guiSetText (x1, x ) guiSetText (y1, y ) guiSetText (z1, z ) end end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) function onGuiClick (button, state, absoluteX, absoluteY) if (source == GUIEditor_Button[2]) then local x = guiGetText( x1 ) local y = guiGetText( y1 ) local z = guiGetText( z1 ) local id = guiGetText( id ) createBlip( x, y, z, id) end end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) function blip() if guiGetVisible ( GUIEditor_Window[1] ) then guiSetVisible ( GUIEditor_Window[1], false ) showCursor(false) else guiSetVisible ( GUIEditor_Window[1], true ) showCursor(true) end end addCommandHandler ( "blip", blip )
  9. تقدر تعطي ادمن من لوحة الادمن P
  10. الله يعطيك العافيه تعبتك معاي
  11. ملاحظة: انا اريد ان ينزل الاعب الجديد في مكان معيين بعد التسجيل فقط هذه الاكواد ما عدلت عليها شي الكلنت ما دخله انا لما اعدل على ملف السيرفر الازرار تخرب Client: -- REPLACE THIS ! local serverInfo = "Put server information here" function centerWindow(center_window) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(center_window,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(center_window,x,y,false) end local loginWindow = {} local loginLabel = {} local loginEdit = {} local loginButton = {} local mainButton = {} local mainLabel = {} local mainMemo = {} local registerWindow = {} local registerLabel = {} local registerEdit = {} local registerButton = {} -- Login loginWindow["mainWindow"] = guiCreateWindow (0,0,505, 235,"Welcome to the server!", false) centerWindow( loginWindow["mainWindow"] ) guiWindowSetMovable( loginWindow["mainWindow"], false ) guiWindowSetSizable( loginWindow["mainWindow"], false ) guiSetInputEnabled( true ) showCursor(true) loginLabel["Username"] = guiCreateLabel( 20, 40, 70, 20, "Username:", false, loginWindow["mainWindow"]) loginEdit["Username"] = guiCreateEdit( 82, 38, 90, 20, "", false, loginWindow["mainWindow"] ) loginLabel["Password"] = guiCreateLabel( 20, 70, 70, 20, "Password:", false, loginWindow["mainWindow"]) loginEdit["Password"] = guiCreateEdit( 82, 68, 90, 20, "", false, loginWindow["mainWindow"] ) loginButton["Main"] = guiCreateButton( 82, 98, 90, 30, "Login", false, loginWindow["mainWindow"] ) -- Main mainLabel["New"] = guiCreateLabel( 57, 148, 160, 30, "Are you new to the server?", false, loginWindow["mainWindow"] ) mainButton["ClickHere"] = guiCreateButton( 82, 178, 90, 30, "Click here!", false, loginWindow["mainWindow"] ) mainMemo["ServerInfo"] = guiCreateMemo( 230, 38, 265, 170, serverInfo, false, loginWindow["mainWindow"] ) -- register registerWindow["mainWindow"] = guiCreateWindow (0,0,250, 150,"Register", false) centerWindow( registerWindow["mainWindow"] ) guiSetVisible( registerWindow["mainWindow"], false ) registerLabel["Username"] = guiCreateLabel( 45, 40, 70, 20, "Username:", false, registerWindow["mainWindow"]) registerEdit["Username"] = guiCreateEdit( 107, 38, 90, 20, "", false, registerWindow["mainWindow"] ) registerLabel["Password"] = guiCreateLabel( 45, 70, 70, 20, "Password:", false, registerWindow["mainWindow"]) registerEdit["Password"] = guiCreateEdit( 107, 68, 90, 20, "", false, registerWindow["mainWindow"] ) registerButton["Main"] = guiCreateButton( 107, 98, 90, 30, "Register", false, registerWindow["mainWindow"] ) registerButton["Close"] = guiCreateButton( 30, 30, 20, 20, "X", false, registerWindow["mainWindow"]) guiEditSetMasked(registerEdit["Password"], true) guiEditSetMasked(loginEdit["Password"], true) function clientSubmitLogin(button, state) if button == "left" and state == "up" then local username = guiGetText(loginEdit["Username"]) local password = guiGetText(loginEdit["Password"]) if username and password then triggerServerEvent("submitLogin",localPlayer, username, password) end end end addEventHandler("onClientGUIClick", loginButton["Main"], clientSubmitLogin, false) function clientSubmitRegister(button, state) if button == "left" and state == "up" then local username = guiGetText(registerEdit["Username"]) local password = guiGetText(registerEdit["Password"]) if username and password then triggerServerEvent("submitRegister",localPlayer, username, password) end end end addEventHandler("onClientGUIClick", registerButton["Main"], clientSubmitRegister, false) function hideLoginWindow() guiSetInputEnabled(false) guiSetVisible(loginWindow["mainWindow"], false) showCursor(false) end function showRegisterWindow() guiSetInputEnabled( true ) guiSetVisible(registerWindow["mainWindow"], true) showCursor(true) guiSetVisible(loginWindow["mainWindow"], false) end addEventHandler("onClientGUIClick", mainButton["ClickHere"], showRegisterWindow, false) function hideRegisterWindow1() guiSetInputEnabled( true ) guiSetVisible(registerWindow["mainWindow"], false) showCursor(true) guiSetVisible(loginWindow["mainWindow"], true) end addEventHandler("onClientGUIClick",registerButton["Close"], hideRegisterWindow1, false) function hideRegisterWindow() guiSetInputEnabled( false ) guiSetVisible(registerWindow["mainWindow"], false) showCursor(false) end addEvent("hideRegisterWindow", true) addEvent("hideLoginWindow", true) addEventHandler("hideRegisterWindow", getRootElement(), hideRegisterWindow) addEventHandler("hideLoginWindow", getRootElement(), hideLoginWindow) Server: function setCameraOnPlayerJoin() fadeCamera( source, true ) setCameraMatrix( source, 1468.8785400391, -919.25317382813, 100.153465271, 1468.388671875, -918.42474365234, 99.881813049316 ) end addEventHandler("onPlayerJoin", getRootElement(), setCameraOnPlayerJoin) --function stopCameraOnPlayerLogin() -- fadeCamera( source, false ) --end --addEventHandler("onPlayerLogin", getRootElement(), stopCameraOnPlayerLogin) addEvent("submitLogin", true) addEvent("submitRegister", true) function loginHandler(username, password) local account = getAccount(username, password) if (account ~= false) then if (logIn(source, account, password) == true) then triggerClientEvent (source, "hideLoginWindow", source) end end end addEventHandler("submitLogin", root, loginHandler) function registerHandler(username, password) local account = getAccount(username, password) if (account ~= false) then outputChatBox( "", root, 255, 255, 255 ) else account = addAccount(username, password) if (logIn(source, account, password) == true) then triggerClientEvent(source, "hideRegisterWindow", getRootElement()) end end end addEventHandler("submitRegister", root, registerHandler)
  12. هيك مظبوط؟؟؟ function setCameraOnPlayerJoin() fadeCamera( source, true ) setCameraMatrix( source, 1468.8785400391, -919.25317382813, 100.153465271, 1468.388671875, -918.42474365234, 99.881813049316 ) end addEventHandler("onPlayerJoin", getRootElement(), setCameraOnPlayerJoin) --function stopCameraOnPlayerLogin() -- fadeCamera( source, false ) --end --addEventHandler("onPlayerLogin", getRootElement(), stopCameraOnPlayerLogin) addEvent("submitLogin", true) addEvent("submitRegister", true) function loginHandler(username, password) local account = getAccount(username, password) if (account ~= false) then if (logIn(source, account, password) == true) then triggerClientEvent (source, "hideLoginWindow", source) end end end addEventHandler("submitLogin", root, loginHandler) function registerHandler(username, password) local account = getAccount(username, password) if (account ~= false) then outputChatBox( "", root, 255, 255, 255 ) else account = addAccount(username, password) if (logIn(source, account, password) == true) then triggerClientEvent(source, "hideRegisterWindow", getRootElement()) end end end addEventHandler("submitRegister", root, registerHandler) addEventHandler("onPlayerLogin", root, function() spawnPlayer(source, 1682.9846191406, -2245.932189063, 13.547117233276) setCameraTarget(source) end)
  13. ممكن تضع مثال كامل الله يخليك لاني ما اتعلم الا هيك
  14. عندي بس طلب انا وضعت loginpanel بس لما الواحد يسجل بضل الصورة معلقة كيف بدي اخليه ينزل مكان معين بعد التسجيل فقط؟؟
  15. الله يعطيك مليون عافيه!!!
  16. شباب ممكن كود لما اشغل السيرفر يشتغل معاه ملفات من الريسورس انا اخترته ؟؟؟ وفين بالظبت احطه؟
  17. مش اشتغل على العموم مشكورين
  18. مشكور اخي بس وين احط احط في ملف نوتي باد واحفظه بصيغة lua ?? ساعدوني رجاءً
  19. السلام عليكم اول شي انا مبتدىء جدا في السكربت والمودات واريد كود وتساعدوني فيه اوك؟ انا بدي كود الحراميه يعني يضرب حد بياخد نجمة+ بدي وظيفة الشرطي يقدر يمسكه بالعصه ويسجنه وشكرااا
×
×
  • Create New...