Jump to content

iPrestege

Members
  • Posts

    10,056
  • Joined

  • Last visited

  • Days Won

    27

Everything posted by iPrestege

  1. يب الكل او تقدر : getElementsByType
  2. حطة هنا : addEvent("setcol",true) addEventHandler("setcol",getRootElement(), function () xmlFileHandler(guiCheckBoxGetSelected(GUIEditor_Checkbox[1])) guiSetVisible(wnd,false) showCursor(false) guiSetInputEnabled(false) end )
  3. يخفية للكل كذا ذذ تبية كذآ؟
  4. 3 ارقمنتات شوف الويكي
  5. setElementVisibleTo setTimer
  6. شف ذا واعرف كيف : addCommandHandler("create", function ( player ) local x,y,z = getElementPosition ( player ) if isElement ( vehicle ) then destroyElement ( vehicle ) end vehicle = createVehicle ( 411 , x,y,z ) if not vehicle then return end warpPedIntoVehicle( player,vehicle ) marker = createMarker( x + 4, y + 2, z -1, "cylinder", 2, 255, 0, 0, 255 ) setElementData( vehicle,"Created",true ) setTimer( function ( ) if not getElementData( vehicle,"Created" ) == false then blowVehicle ( vehicle ) end end,15000,1 ) end ) addEventHandler("onMarkerHit",getRootElement(), function ( player ) if getElementType(player) == "player" then if source ~= marker then return end if not isPedInVehicle(player) then return end if vehicle and isElement(vehicle) then if getElementData(vehicle,"Created",false) then return end setElementData(vehicle,"Created",false) outputChatBox("True",player) end end end )
  7. https://forum.multitheftauto.com/viewtopic.php?f=160&t=58438setTimer
  8. setTimer createMarker "onMarkerHit" setElementData if not getElementData then blowVehicle
  9. -- Client Side -- GUIEditor_Button = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} function guiCreateWindow( x2, y2, width2, height2, titleBarText2, relative2 ) mainBackground = guiCreateStaticImage ( x2, y2, width2, height2, "1.png", relative2 ) local mainBackgroundLabel = guiCreateLabel ( 0, 0, 250, 100, titleBarText2, false, mainBackground ) guiSetEnabled ( mainBackgroundLabel, false ) return mainBackground end addEventHandler("onClientResourceStart", resourceRoot, function() showCursor(true) wnd = guiCreateWindow(0,0,0.9987,0.9983,"",true) GUIEditor_Image[1] = guiCreateStaticImage(12,21,800,400,"2.png",false,wnd) guiSetAlpha(wnd,1) GUIEditor_Edit[1] = guiCreateEdit(295,463,156,22,"",false,wnd) GUIEditor_Edit[2] = guiCreateEdit(295,489,156,22,"",false,wnd) guiEditSetMasked(GUIEditor_Edit[2],true) GUIEditor_Label[1] = guiCreateLabel(231,463,115,20,"username",false,wnd) GUIEditor_Label[2] = guiCreateLabel(231,492,115,20,"pass",false,wnd) GUIEditor_Label[3] = guiCreateLabel(298,49,495,34,"LOGIN BY BOLBN",false,wnd) GUIEditor_Button[1] = guiCreateButton(418,537,94,31,"register",false,wnd) GUIEditor_Button[2] = guiCreateButton(266,537,94,31,"login",false,wnd) GUIEditor_Checkbox[1] = guiCreateCheckBox(466,487,172,22,"Remember Me !",false,false,wnd) GUIEditor_Button[3] = guiCreateButton(93,549,26,22,"AR",false,wnd) GUIEditor_Button[4] = guiCreateButton(130,549,26,22,"EN",false,wnd) end ) addEventHandler("onClientGUIClick", root, function () local user = guiGetText(GUIEditor_Edit[1]) local pass = guiGetText(GUIEditor_Edit[2]) if ( source == GUIEditor_Button[3] ) then guiSetText(GUIEditor_Label[1],"اسم المستخدم") guiSetText(GUIEditor_Label[2],"كلمة المرور") guiSetText(GUIEditor_Button[2],"تسجيل الدخول") guiSetText(GUIEditor_Button[1],"تسجيل") elseif ( source == GUIEditor_Button[4] ) then guiSetText(GUIEditor_Label[1],"username") guiSetText(GUIEditor_Label[2],"pass") guiSetText(GUIEditor_Button[2],"Login") guiSetText(GUIEditor_Button[1],"Register") elseif ( source == GUIEditor_Button[2] ) then triggerServerEvent("onlogin",getLocalPlayer(),user,pass) elseif ( source == GUIEditor_Button[1] ) then triggerServerEvent("onre",getLocalPlayer(),user,pass) end end ) addEvent("setcol",true) addEventHandler("setcol",getRootElement(), function () xmlFileHandler(guiCheckBoxGetSelected(GUIEditor_Checkbox[1])) guiSetVisible(wnd,false) showCursor(false) guiSetInputEnabled(false) end ) addEventHandler("onClientGUIChanged",root, function ( element ) if ( element == GUIEditor_Edit[2] ) then local ID = guiGetText(GUIEditor_Edit[2]) if not tonumber(ID) then return guiSetText(GUIEditor_Edit[2],"") end end end ) function xmlFileHandler(gReturn) if gReturn == true then setElementData(localPlayer, "LoginAuto", true) else setElementData(localPlayer, "LoginAuto", false) end sName = "Login" xmlFileName = tostring("login_" .. sName .. ".xml") local xmlFile = xmlLoadFile(xmlFileName) if not xmlFile then xmlFile = xmlCreateFile(xmlFileName, "settings") xmlNodeSetAttribute(xmlFile, "autologin", tostring(getElementData(localPlayer, "LoginAuto"))) end xmlNodeSetAttribute(xmlFile, "autologin", tostring(getElementData(localPlayer, "LoginAuto"))) xmlNodeSetAttribute(xmlFile, "username", tostring(guiGetText(GUIEditor_Edit[1]))) xmlNodeSetAttribute(xmlFile, "password", tostring(guiGetText(GUIEditor_Edit[2],password))) xmlSaveFile(xmlFile) xmlUnloadFile(xmlFile) end function XML() sName = "Login" xmlFileName = tostring("login_" .. sName .. ".xml") local xmlFile = xmlLoadFile(xmlFileName) if xmlFile then status = xmlNodeGetAttribute(xmlFile, "autologin") end if status == "true" then local username = tostring(xmlNodeGetAttribute(xmlFile, "username")) local password = tostring(xmlNodeGetAttribute(xmlFile, "password")) if username ~= "" and password ~= "" then guiCheckBoxSetSelected(GUIEditor_Checkbox[1],true) guiSetText(GUIEditor_Edit[1],username) guiSetText(GUIEditor_Edit[2],password) end end end setTimer( XML,200, 1) -- Server Side -- addEvent("onlogin",true) addEventHandler("onlogin",getRootElement(), function (user,pass) local account = getAccount(user,pass) if ( account ) then logIn(source,account,pass) triggerClientEvent(source,"setcol",source) else outputChatBox("* Worng Username Or Password",source,255,0,0) end end ) addEvent("onre",true) addEventHandler("onre",getRootElement(), function (user,pass) local account = getAccount(user,pass) if ( account ) then outputChatBox("* This Account is Already Used",source,255,0,0) else addAccount(user,pass) outputChatBox("UserName: " .. user .. " PassWord : " .. pass,source,0,150,255) end end )
  10. انا اللي مستغربة لية !! "onPlayerJoin" ??
  11. حياكـ الله .. الى هنا انتهت مهمتي اللي ودهـ يكمل معه يكـمل .. ذذ
  12. استخدم : onClientGUIClick guiGetText triggerServerEvent getElementsByType givePlayerMoney ...
  13. جربه كذآ : local x, y, z = 2487.6398925781, -1666.7453613281, 13.34375 local size = 1.5 local Xtogo, Ytogo, Ztogo = 2496.6491699219, -1683.1557617188, 13.356028556824 local r, g, b = 255, 255, 0 local marker = createMarker ( x, y, z - 1, 'arrow', size, r, g, b, 255 ) addEventHandler("onMarkerHit",marker, function ( element ) if ( getElementType ( element ) == ( "player" ) ) then if not ( GetPlayerACLGroup ( element , "Console" ) or GetPlayerACLGroup ( element , "Admin" ) ) then outputChatBox("ممتلكات خاصة للسيرفر",player) return end setElementPosition ( element , Xtogo, Ytogo, Ztogo ) outputChatBox("مرحبا بك داخل البيت",player) end end ) function GetPlayerACLGroup ( player , Group ) if ( not player or not Group ) then return end if ( not getPlayerAccount ( player ) ) then return end if ( isGuestAccount ( getPlayerAccount ( player ) ) ) then return end if ( not aclGetGroup ( tostring ( Group ) ) ) then return end if ( isObjectInACLGroup ("user."..getAccountName ( getPlayerAccount ( player ) ) , aclGetGroup ( tostring ( Group ) ) ) ) then return player,Group else return false end end
  14. You can't say that you are not the admin of this site .
  15. My code i post it above should work fine maybe because there's something on the race 'Game Mode' Make it diffrient?
  16. dxDrawText ( getPlayerName(player), sx, sy - offset, sx, sy - offset, tocolor(0,0,0,255), textscale*NAMETAG_TEXTSIZE, "bankgothic", "center", "bottom", false, false, false,true,_ ) dxDrawText ( getPlayerName(player), sx, sy - offset, sx, sy - offset, tocolor(r,g,b,textalpha), textscale*NAMETAG_TEXTSIZE, "bankgothic", "center", "bottom", false, false, false,true,_ ) Try it.
  17. مادري مآغلق الوظيفة يمكنة نسى صح ؟
  18. removePedFromVehicle
  19. حياكـ الله .. وخذ كود سعد الاق راح يخففة بـ حيث مايكرر ..
×
×
  • Create New...