Jump to content

X-SHADOW

Members
  • Posts

    721
  • Joined

  • Last visited

Everything posted by X-SHADOW

  1. تم حل المشكلة + ارسال المود على الخاص + اسفين على المشاركات المزدوجه ق1 تبآ للوحة تسجيل تتطلب ساعتين لتظبيطها ق1
  2. باقي اتاكد ان الاعب مسجل دخول مايخش ويسوي سبام + الرجستر بعد ~
  3. تم رفس المشكلة من قبل شأدو هع + يقبل حفظ البيانات ~
  4. اذا كود حسن شغال بعتزل البرمجه هع ~
  5. تم الاصلاح باقي مشكلة بسيطه والحين ارفع لك المود .
  6. كيف مستحيل والقيم مود اللي بقسم المودات بmta مبنية زي كاونتر سترايك شوف صورة القيم مود اللي عطيتك اسمه .
  7. You just fall in my same mistake forget to add user, pass on triggerServerEvent('save, localPlayer) lol .
  8. سويت اصلاحات بالكود جربه الحين .
  9. There is a GameMode Called First Person it's on Mta Communtry its shoot with out seen the weapon just like Counter-Strike !
  10. الا يمديك ض1 ~ + انا عارف الطريقة بس فاضي اسويها انا ذذ
  11. Fixed @ ---ClientSide GUIEditor_Button = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} wnd = guiCreateWindow(1,1,799,600,"",false) guiSetAlpha(wnd,1) GUIEditor_Image[2] = guiCreateStaticImage(10,24,781,449,"images/games.png",false,wnd) GUIEditor_Edit[1] = guiCreateEdit(299,484,166,27,"",false,wnd) GUIEditor_Edit[2] = guiCreateEdit(299,520,166,27,"",false,wnd) guiEditSetMasked(GUIEditor_Edit[2],true) GUIEditor_Label[1] = guiCreateLabel(238,487,106,18,"username",false,wnd) GUIEditor_Label[2] = guiCreateLabel(238,521,106,18,"password",false,wnd) GUIEditor_Button[1] = guiCreateButton(279,559,78,24,"login",false,wnd) GUIEditor_Button[2] = guiCreateButton(432,559,78,24,"register",false,wnd) GUIEditor_Checkbox[1] = guiCreateCheckBox(474,522,123,22,"تذكرني",false,false,wnd) addEventHandler("onClientGUIClick",getRootElement(), function () local user = guiGetText(GUIEditor_Edit[1]) local pass = guiGetText(GUIEditor_Edit[2]) if ( source == GUIEditor_Button[1] ) then if ( guiCheckBoxGetSelected ( GUIEditor_Checkbox[1] ) ) then triggerServerEvent('save',localPlayer,user,pass) triggerServerEvent('onlogin',localPlayer,user,pass) else triggerServerEvent('onlogin',localPlayer,user,pass) end elseif ( source == GUIEditor_Button[2] ) then triggerServerEvent('Register',localPlayer,user,pass) end end ) function show() guiSetVisible(wnd, not guiGetVisible(wnd)) showCursor(guiGetVisible(wnd)) end bindKey ("F2", "down", show) addEvent('xml', true) addEventHandler('xml', root, function ( ) local lr = xmlLoadFile("acc.xml") or xmlCreateFile("acc.xml"," acc") xmlNodeSetValue (xmlCreateChild ( lr, "UserName:"), ""..user.."" ) xmlNodeSetValue (xmlCreateChild ( lr, "password:"), ""..pass.."" ) xmlSaveFile(lr) xmlUnloadFile(lr) end ) ----ServerSide addEvent('onlogin',true) addEvent('onRegister', true) addEvent('save', true) addEventHandler('onlogin',getRootElement(), function (user,pass) local account = getAccount(user,pass) if ( account ) then logIn(source,account,pass) else outputChatBox("* Worng Username Or Password",source,255,0,0) end end ) addEventHandler('onRegister',root, 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 ( "Register : [ Username ] : " .. user .. " [ Password ] : " .. pass .. "", player, 255, 255, 0 , true ) end end ) addEventHandler('save',root, function ( player, user,pass ) local account = getAccount ( user,pass ) if ( account ~= false ) then if (logIn ( player, account, pass ) == true) then triggerClientEvent(player, 'xml', player) else outputChatBox ( "Error Login...", player, 255, 0, 0 ) end end end)
  12. --ServerSide addEvent('onlogin',true) addEventHandler('onlogin',getRootElement(), function (user,pass) local account = getAccount(user,pass) if ( account ) then logIn(source,account,pass) else outputChatBox("* Worng Username Or Password",source,255,0,0) end end ) addEvent('onre',true) addEventHandler('onre',root, 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 ) addEvent("save",true) addEventHandler("save",root, function ( player, user, pass ) local account = getAccount ( user, pass ) if ( account ~= false ) then if (logIn ( player, account, pass ) == true) then local lr = xmlLoadFile("acc.xml") or xmlCreateFile("acc.xml"," acc") xmlNodeSetValue (xmlCreateChild ( lr, "UserName:"), ""..user.."" ) xmlNodeSetValue (xmlCreateChild ( lr, "password:"), ""..pass.."" ) xmlSaveFile(lr) xmlUnloadFile(lr) else outputChatBox ( "Error Login...", player, 255, 0, 0 ) end end end) addEventHandler('register', root, function (player, user, pass ) account = addAccount ( user, pass ) if (logIn ( player, account, pass ) == true) then outputChatBox ( "Register : [ Username ] : " .. user .. " [ Password ] : " .. pass .. "", player, 255, 255, 0 , true ) else outputChatBox ( "Erorr Register", player, 255, 255, 0 ) end end) --ClientSide GUIEditor_Button = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} wnd = guiCreateWindow(1,1,799,600,"",false) guiSetAlpha(wnd,1) GUIEditor_Image[2] = guiCreateStaticImage(10,24,781,449,"images/games.png",false,wnd) GUIEditor_Edit[1] = guiCreateEdit(299,484,166,27,"",false,wnd) GUIEditor_Edit[2] = guiCreateEdit(299,520,166,27,"",false,wnd) guiEditSetMasked(GUIEditor_Edit[2],true) GUIEditor_Label[1] = guiCreateLabel(238,487,106,18,"username",false,wnd) GUIEditor_Label[2] = guiCreateLabel(238,521,106,18,"password",false,wnd) GUIEditor_Button[1] = guiCreateButton(279,559,78,24,"login",false,wnd) GUIEditor_Button[2] = guiCreateButton(432,559,78,24,"register",false,wnd) GUIEditor_Checkbox[1] = guiCreateCheckBox(474,522,123,22,"تذكرني",false,false,wnd) addEventHandler("onClientGUIClick",getRootElement(), function () local user = guiGetText(GUIEditor_Edit[1]) local pass = guiGetText(GUIEditor_Edit[2]) if ( source == GUIEditor_Button[1] ) then if ( guiCheckBoxGetSelected ( GUIEditor_Checkbox[1] ) ) then triggerServerEvent('save',localPlayer) triggerServerEvent('onlogin',localPlayer,user,pass) else triggerServerEvent('onlogin',localPlayer,user,pass) end elseif ( source == GUIEditor_Button[2] ) then triggerServerEvent('onre',localPlayer,user,pass) end end ) function show() guiSetVisible(wnd, not guiGetVisible(wnd)) showCursor(guiGetVisible(wnd)) end bindKey ("F2", "down", show)
  13. outputChatBox('Iam The Dam ClientSide', 255, 255, 0 ) -- no source or player in client. outputChatBox('Iam The Dam ServerSide', source, 255, 255, 0 ) --- must be source and colours.
  14. of course getElementsByType it's the faster than table .
  15. بآلتوفيق لك يابطل ومشكور ~
  16. oh i foget about source Thank's Any way .
  17. no it's not wrong why it well be worng ? and also he say when player he got damge and die the image wont hide because the health he should use setTimer .
  18. Fhode you didn't check the player Health if it changes . This Will Fix the Problem . local sx, sy = guiGetScreenSize ( ) local image = guiCreateStaticImage(0,0,sx,sy,"image.png",false) guiSetVisible ( image, false ) addEventHandler ( 'onClientPlayerDamage', localPlayer, function ( ) setTimer( function( ) local health = getElementHealth ( source ) outputChatBox ( "Your health is: ".. math.floor ( health ) .."%" ) if ( health <= 10 ) then guiSetVisible ( image, true ) end end, 1000, 0 ) end ) addEventHandler( 'onClientPlayerWasted', localPlayer, function ( ) guiSetVisible( image, false ) end )
  19. https://wiki.multitheftauto.com/wiki/Cl ... _functions
  20. source == thePlayer or the client or the one has enter the car . and ResourceStart it well work it's ok !
×
×
  • Create New...