CRoW,,# Posted May 2, 2013 Share Posted May 2, 2013 (edited) السلام عليكم وش الخطاا بكودي 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 addEvent("load", true) addEventHandler("load", root, function() showCursor( true ) local xml = xmlLoadFile ( "account.xml" ) local n1 = xmlFindChild ( xml, "name", 0 ) local n2 = xmlFindChild ( xml, "pass", 0 ) if n1 and n2 then guiSetText(GUIEditor_Edit[1],xmlNodeGetValue ( n1 )) guiSetText(GUIEditor_Edit[2],xmlNodeGetValue ( n2 )) end end ) addEventHandler("onClientResourceStart", resourceRoot, function() showCursor( true ) end ) GUIEditor_Button = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} 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) 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) if ( guiCheckBoxGetSelected ( GUIEditor_Checkbox[1] ) == true ) then local file = xmlLoadFile("account.xml") or xmlCreateFile("account.xml","login") xmlNodeSetValue(xmlCreateChild(file,"name"),""..user.."") xmlNodeSetValue(xmlCreateChild(file,"pass"),""..pass.."") xmlNodeSetAttribute(file,"username",tostring(guiGetText(GUIEditor_Edit[1]))) xmlNodeSetAttribute(file,"password",tostring(guiGetText(GUIEditor_Edit[2]))) xmlSaveFile(file) xmlUnloadFile(file) end end end ) addEvent("setcol",true) addEventHandler("setcol",getRootElement(), function () 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 ) 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 ) addEventHandler("onPlayerJoin", root, function() triggerClientEvent(source, "load", source) end ) المشكلة انهه ما يحفظ البيانات Edited May 2, 2013 by Guest Link to comment
iMr.Dawix~# Posted May 2, 2013 Share Posted May 2, 2013 السلام عليكم وش الخطاا بكودي 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 addEvent("load", true) addEventHandler("load", root, function() showCursor( true ) local xml = xmlLoadFile ( "account.xml" ) local n1 = xmlFindChild ( xml, "name", 0 ) local n2 = xmlFindChild ( xml, "pass", 0 ) if n1 and n2 then guiSetText(GUIEditor_Edit[1],xmlNodeGetValue ( n1 )) guiSetText(GUIEditor_Edit[2],xmlNodeGetValue ( n2 )) end end ) addEventHandler("onClientResourceStart", resourceRoot, function() showCursor( true ) end ) GUIEditor_Button = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} 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) 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) if ( guiCheckBoxGetSelected ( GUIEditor_Checkbox[1] ) == true ) then local file = xmlLoadFile("account.xml") or xmlCreateFile("account.xml","login") xmlNodeSetValue(xmlCreateChild(file,"name"),""..user.."") xmlNodeSetValue(xmlCreateChild(file,"pass"),""..pass.."") xmlNodeSetAttribute(file,"username",tostring(guiGetText(GUIEditor_Edit[1]))) xmlNodeSetAttribute(file,"password",tostring(guiGetText(GUIEditor_Edit[2]))) xmlSaveFile(file) xmlUnloadFile(file) end end end ) addEvent("setcol",true) addEventHandler("setcol",getRootElement(), function () 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 ) 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 ) addEventHandler("onPlayerJoin", root, function() triggerClientEvent(source, "load", source) end ) المشكلة انهه ما يحفظ البيانات تسرق حسابات؟ Link to comment
3NAD Posted May 2, 2013 Share Posted May 2, 2013 [*]تأكد من وضع عنوان مناسب للمواضيع بحيث يكون العنوان يدل على محتوى الموضوع. عناوين المواضيع التي تحتوي على كلمات مثل "مساعد" أو "طلب كود" فهي غير مرغوب فيها و يرجى تجنبها. Link to comment
CRoW,,# Posted May 2, 2013 Author Share Posted May 2, 2013 قصدي انه يجي الحساب والباس في الايدت جاهز ع طول يضغط login Link to comment
iPrestege Posted May 2, 2013 Share Posted May 2, 2013 انا اللي مستغربة لية !! "onPlayerJoin" ?? Link to comment
CRoW,,# Posted May 2, 2013 Author Share Posted May 2, 2013 انا اللي مستغربة لية !! "onPlayerJoin" ?? !طيب وش يصير Link to comment
iPrestege Posted May 2, 2013 Share Posted May 2, 2013 -- 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 ) Link to comment
CRoW,,# Posted May 2, 2013 Author Share Posted May 2, 2013 ي لبيهه تسسسسلمم مشكووور ما تقصر !..ضبط Link to comment
CRoW,,# Posted May 2, 2013 Author Share Posted May 2, 2013 طيب لو بغيت يشتغل ذا الكود بعد ما اسجل دخول addEventHandler( "onClientResourceStart", getResourceRootElement( ), onResourceStart ) function cameraMoveSoft(camPosX, camPosY, camPosZ, newCamPosX, newCamPosY, newCamPosZ, camLookX, camLookY, camLookZ, newCamLookX, newCamLookY, newCamLookZ, typeCameraMove) local x = 0 local y = 0 function moveCamera() x = x + 0.0001 y = y + 0.0001 local cameraX, cameraY, cameraZ = interpolateBetween(camPosX, camPosY, camPosZ, newCamPosX, newCamPosY, newCamPosZ, x, "Linear") local lookX, lookY, lookZ = interpolateBetween(camLookX, camLookY, camLookZ, newCamLookX, newCamLookY, newCamLookZ, y, "Linear") setCameraMatrix(cameraX, cameraY, cameraZ, lookX, lookY, lookZ) if cameraX == newCamPosX and cameraY == newCamPosY and cameraZ == newCamPosZ and lookX == newCamLookX and lookY == newCamLookY and lookZ == newCamLookZ then removeEventHandler("onClientRender", getRootElement(), moveCamera) end end addEventHandler("onClientRender", getRootElement(), moveCamera) end cameraMoveSoft(1797.35229,842.19122,10.63315, 1797.35229,842.19122, 10.63315, 0, 0, 0, 0, 200000, 0, "Linear") function join(player) spawnPlayer ( player, x, y, z) repeat until setElementModel(player,46) setCameraTarget(player, player) showChat(player, true) end addEventHandler("onPlayerJoin", root, function() join(source) end ) Link to comment
CRoW,,# Posted May 2, 2013 Author Share Posted May 2, 2013 triggerServerEvent("onlogin",getLocalPlayer(),user,pass) ؟ Link to comment
iPrestege Posted May 2, 2013 Share Posted May 2, 2013 حطة هنا : addEvent("setcol",true) addEventHandler("setcol",getRootElement(), function () xmlFileHandler(guiCheckBoxGetSelected(GUIEditor_Checkbox[1])) guiSetVisible(wnd,false) showCursor(false) guiSetInputEnabled(false) end ) Link to comment
CRoW,,# Posted May 2, 2013 Author Share Posted May 2, 2013 طيب لازم اسوي تايقر عشان السباون addEvent("setcol",true) addEventHandler("setcol",getRootElement(), function () xmlFileHandler(guiCheckBoxGetSelected(GUIEditor_Checkbox[1])) guiSetVisible(wnd,false) showCursor(false) guiSetInputEnabled(false) addEventHandler( "onClientResourceStart", getResourceRootElement( ), onResourceStart ) function cameraMoveSoft(camPosX, camPosY, camPosZ, newCamPosX, newCamPosY, newCamPosZ, camLookX, camLookY, camLookZ, newCamLookX, newCamLookY, newCamLookZ, typeCameraMove) local x = 0 local y = 0 function moveCamera() x = x + 0.0001 y = y + 0.0001 local cameraX, cameraY, cameraZ = interpolateBetween(camPosX, camPosY, camPosZ, newCamPosX, newCamPosY, newCamPosZ, x, "Linear") local lookX, lookY, lookZ = interpolateBetween(camLookX, camLookY, camLookZ, newCamLookX, newCamLookY, newCamLookZ, y, "Linear") setCameraMatrix(cameraX, cameraY, cameraZ, lookX, lookY, lookZ) if cameraX == newCamPosX and cameraY == newCamPosY and cameraZ == newCamPosZ and lookX == newCamLookX and lookY == newCamLookY and lookZ == newCamLookZ then removeEventHandler("onClientRender", getRootElement(), moveCamera) end end addEventHandler("onClientRender", getRootElement(), moveCamera) end cameraMoveSoft(1797.35229,842.19122,10.63315, 1797.35229,842.19122, 10.63315, 0, 0, 0, 0, 999999, 0, "Linear") function join(player) spawnPlayer ( player, 1126.10657, 870.40637, 10.79780) repeat until setElementModel(player,46) setCameraTarget(player, player) showChat(player, true) end Link to comment
iPrestege Posted May 2, 2013 Share Posted May 2, 2013 كيف تسوي ماتركس وفـ نفس الوقت سباون؟ Link to comment
CRoW,,# Posted May 2, 2013 Author Share Posted May 2, 2013 كيف تسوي ماتركس وفـ نفس الوقت سباون؟ اذا خلص من الكميرا وهي تتحرك يسوي سباون Link to comment
iPrestege Posted May 2, 2013 Share Posted May 2, 2013 سوية يوم يسوي removeEventHandler triggerServerEvent Link to comment
CRoW,,# Posted May 2, 2013 Author Share Posted May 2, 2013 addEventHandler( "onClientResourceStart", getResourceRootElement( ), onResourceStart ) function cameraMoveSoft(camPosX, camPosY, camPosZ, newCamPosX, newCamPosY, newCamPosZ, camLookX, camLookY, camLookZ, newCamLookX, newCamLookY, newCamLookZ, typeCameraMove) local x = 0 local y = 0 function moveCamera() x = x + 0.0001 y = y + 0.0001 local cameraX, cameraY, cameraZ = interpolateBetween(camPosX, camPosY, camPosZ, newCamPosX, newCamPosY, newCamPosZ, x, "Linear") local lookX, lookY, lookZ = interpolateBetween(camLookX, camLookY, camLookZ, newCamLookX, newCamLookY, newCamLookZ, y, "Linear") setCameraMatrix(cameraX, cameraY, cameraZ, lookX, lookY, lookZ) if cameraX == newCamPosX and cameraY == newCamPosY and cameraZ == newCamPosZ and lookX == newCamLookX and lookY == newCamLookY and lookZ == newCamLookZ then removeEventHandler("onClientRender", getRootElement(), moveCamera) triggerServerEvent('Send', localPlayer) end end addEventHandler("onClientRender", getRootElement(), moveCamera) end cameraMoveSoft(1797.35229,842.19122,10.63315, 1797.35229,842.19122, 10.63315, 0, 0, 0, 0, 999999, 0, "Linear") addEvent ( 'Send', true) addEventHandler( 'Send', localPlayer, function join(player) spawnPlayer ( player, 1126.10657, 870.40637, 10.79780) repeat until setElementModel(player,46) setCameraTarget(player, player) showChat(player, true) end ؟؟ Link to comment
S4MuEL Posted May 2, 2013 Share Posted May 2, 2013 player = مآههو معرفف ! addEvent ( 'Send', true) addEventHandler( 'Send', localPlayer, function join(player) if ( getElementType(player) == ("player") ) then spawnPlayer ( player, 1126.10657, 870.40637, 10.79780) repeat until setElementModel(player,46) setCameraTarget(player, player) showChat(player, true) end ممآ إدري ع ذي repeat until ذذ Link to comment
iPrestege Posted May 2, 2013 Share Posted May 2, 2013 Client : addEvent("setcol",true) addEventHandler("setcol",getRootElement(), function () cameraMoveSoft(1797.35229,842.19122,10.63315, 1797.35229,842.19122, 10.63315, 0, 0, 0, 0, 999999, 0, "Linear") xmlFileHandler(guiCheckBoxGetSelected(GUIEditor_Checkbox[1])) guiSetVisible(wnd,false) showCursor(false) guiSetInputEnabled(false) addEventHandler( "onClientResourceStart", getResourceRootElement( ), onResourceStart ) end ) function cameraMoveSoft(camPosX, camPosY, camPosZ, newCamPosX, newCamPosY, newCamPosZ, camLookX, camLookY, camLookZ, newCamLookX, newCamLookY, newCamLookZ, typeCameraMove) local x = 0 local y = 0 function moveCamera() x = x + 0.0001 y = y + 0.0001 local cameraX, cameraY, cameraZ = interpolateBetween(camPosX, camPosY, camPosZ, newCamPosX, newCamPosY, newCamPosZ, x, "Linear") local lookX, lookY, lookZ = interpolateBetween(camLookX, camLookY, camLookZ, newCamLookX, newCamLookY, newCamLookZ, y, "Linear") setCameraMatrix(cameraX, cameraY, cameraZ, lookX, lookY, lookZ) if cameraX == newCamPosX and cameraY == newCamPosY and cameraZ == newCamPosZ and lookX == newCamLookX and lookY == newCamLookY and lookZ == newCamLookZ then removeEventHandler("onClientRender", getRootElement(), moveCamera) triggerServerEvent("Send",localPlayer) end end addEventHandler("onClientRender", getRootElement(), moveCamera) end Server : function join( ) spawnPlayer ( source,1126.10657, 870.40637, 10.79780,0,46) setCameraTarget(source, source) showChat(source, true) end addEvent ( 'Send', true) addEventHandler( 'Send',getRootElement(),join) Link to comment
CRoW,,# Posted May 2, 2013 Author Share Posted May 2, 2013 يقول السطر 77 فيهه خطا في كلنت Link to comment
iPrestege Posted May 2, 2013 Share Posted May 2, 2013 addEventHandler( "onClientResourceStart", getResourceRootElement( ), onResourceStart ) شيلة مدري كيف جآ Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now