#Major . Posted January 27, 2018 Share Posted January 27, 2018 السلآم عليكم كيف اقدر اخليه يعطيك السكن على حسب الرقم الي مكتوب في الايدت بوكس ؟ addEventHandler("onClientResourceStart", resourceRoot, function() skintest = guiCreateWindow(502, 287, 306, 227, "", false) guiWindowSetSizable(skintest, false) guiSetVisible(skintest,false) skiNA = guiCreateEdit(83, 64, 146, 22, "", false, skintest) Skinb = guiCreateButton(91, 96, 128, 28, ":)", false, skintest) guiSetProperty(Skinb, "NormalTextColour", "FFAAAAAA") end ) bindKey("F7","down", function() guiSetVisible(skintest,not guiGetVisible(skintest)) showCursor(guiGetVisible(skintest)) end) addEventHandler("onClientGUIClick",getRootElement(), function() if ( source == skinb ) then skinn == guiGetText(skiNA) setPlayerSkin( source , skinn ) end end) Link to comment
coNolel Posted January 27, 2018 Share Posted January 27, 2018 (edited) guiGetText يجيب لك سترنق أظن جرب tonumber + إستعمل https://wiki.multitheftauto.com/wiki/SetElementModel Edited January 27, 2018 by coNolel Link to comment
#Major . Posted January 27, 2018 Author Share Posted January 27, 2018 1 minute ago, coNolel said: guiGetText يجيب لك سترنق أظن جرب tonumber + إستعمل https://wiki.multitheftauto.com/wiki/SetElementModel كيف استخدم الtonumber + وش الفرق بين SetElementMode and setPlayerSkin Link to comment
coNolel Posted January 27, 2018 Share Posted January 27, 2018 2 minutes ago, *RayaN-Alharbi. said: كيف استخدم الtonumber + وش الفرق بين SetElementMode and setPlayerSkin من الويكي : This function is deprecated. This means that its use is discouraged and that it might not exist in future versions, but there should be a more generic way to perform what it does. tonumber(string) Link to comment
' A F . Posted January 27, 2018 Share Posted January 27, 2018 addEventHandler("onClientGUIClick",resourceRoot,function() if ( source == skinb ) then setElementModel ( localPlayer , tonumber ( guiGetText (skiNA) ) or 0 ) end end) Link to comment
#Major . Posted January 27, 2018 Author Share Posted January 27, 2018 6 minutes ago, Default#^ said: addEventHandler("onClientGUIClick",resourceRoot,function() if ( source == skinb ) then setElementModel ( localPlayer , tonumber ( guiGetText (skiNA) ) or 0 ) end end) م يشتغل Link to comment
' A F . Posted January 27, 2018 Share Posted January 27, 2018 وش يقولك الدي بق ؟ /debugscript 3 Link to comment
#Major . Posted January 27, 2018 Author Share Posted January 27, 2018 Just now, Default#^ said: وش يقولك الدي بق ؟ /debugscript 3 م فيه شي بالدي بق addEventHandler("onClientResourceStart", resourceRoot, function() skintest = guiCreateWindow(502, 287, 306, 227, "", false) guiWindowSetSizable(skintest, false) guiSetVisible(skintest,false) skiNA = guiCreateEdit(83, 64, 146, 22, "", false, skintest) Skinb = guiCreateButton(91, 96, 128, 28, ":)", false, skintest) guiSetProperty(Skinb, "NormalTextColour", "FFAAAAAA") end ) bindKey("F7","down", function() guiSetVisible(skintest,not guiGetVisible(skintest)) showCursor(guiGetVisible(skintest)) end) addEventHandler("onClientGUIClick",resourceRoot,function() if ( source == skinb ) then setElementModel ( localPlayer , tonumber ( guiGetText (skiNA) ) or 0 ) end end) هذا هو الكود كامل Link to comment
' A F . Posted January 27, 2018 Share Posted January 27, 2018 addEventHandler("onClientGUIClick",resourceRoot,function() if ( source == Skinb ) then setElementModel ( localPlayer , tonumber ( guiGetText (skiNA) ) or 0 ) end end) Link to comment
#Major . Posted January 27, 2018 Author Share Posted January 27, 2018 3 minutes ago, Default#^ said: addEventHandler("onClientGUIClick",resourceRoot,function() if ( source == Skinb ) then setElementModel ( localPlayer , tonumber ( guiGetText (skiNA) ) or 0 ) end end) شكرا Link to comment
#Major . Posted January 27, 2018 Author Share Posted January 27, 2018 2 minutes ago, Default#^ said: العفو حياك الله . بس عندي سؤال بسيط بس ؟ كيف اضيف ارقام ممنوعه؟ يعني م يقدر يستخدمها زي 0 ؟ جربت كذا setElementModel ( localPlayer , tonumber ( guiGetText (skiNA) ) or 0 or 66 or 33) م زبط Link to comment
' A F . Posted January 27, 2018 Share Posted January 27, 2018 سوي جدول وحط فيه الايديات الي ماتبيه يستعملها وتحقق انها مو هي الي كاتبها واعطيه الشخصية Link to comment
#Major . Posted January 27, 2018 Author Share Posted January 27, 2018 14 minutes ago, Default#^ said: سوي جدول وحط فيه الايديات الي ماتبيه يستعملها وتحقق انها مو هي الي كاتبها واعطيه الشخصية skinnon = { "66","33" } addEventHandler("onClientGUIClick",resourceRoot,function() if ( source == Skinb ) then for i,v in ipairs(skinnon) do if guiGetText(skiNA) ~= v then setElementModel ( localPlayer , tonumber ( guiGetText (skiNA) ) or 0 ) else outputChatBox("شخصية ممنوعه",255,0,0) end end end end) مسويها انا كذا بس م يكنسل الامر شالحل؟ Link to comment
#SycroX Posted January 27, 2018 Share Posted January 27, 2018 Just now, *RayaN-Alharbi. said: skinnon = { "66","33" } addEventHandler("onClientGUIClick",resourceRoot,function() if ( source == Skinb ) then for i,v in ipairs(skinnon) do if guiGetText(skiNA) ~= v then setElementModel ( localPlayer , tonumber ( guiGetText (skiNA) ) or 0 ) else outputChatBox("شخصية ممنوعه",255,0,0) end end end end) مسويها انا كذا بس م يكنسل الامر شالحل؟ ForbSkins = {66, 33} addEventHandler("onClientGUIClick", guiRoot, function() if source == Skinb then local skinID = tonumber(guiGetText(skiNA)) or 0 if skinID >= 0 then for _,skin in ipairs(ForbSkins) do if skinID ~= skin then setElementModel(localPlayer, skinID) else outputChatBox("شخصية ممنوعه", 255, 0, 0) end end end end end ) Link to comment
#Major . Posted January 27, 2018 Author Share Posted January 27, 2018 11 minutes ago, #SycroX said: ForbSkins = {66, 33} addEventHandler("onClientGUIClick", guiRoot, function() if source == Skinb then local skinID = tonumber(guiGetText(skiNA)) or 0 if skinID >= 0 then for _,skin in ipairs(ForbSkins) do if skinID ~= skin then setElementModel(localPlayer, skinID) else outputChatBox("شخصية ممنوعه", 255, 0, 0) end end end end end ) يشيخ اموااح احلا واحد ض Link to comment
#SycroX Posted January 27, 2018 Share Posted January 27, 2018 Just now, *RayaN-Alharbi. said: يشيخ اموااح احلا واحد ض مشكور بس لازم تشكر ديفولت الراجل ساعدك كتير Link to comment
#Major . Posted January 27, 2018 Author Share Posted January 27, 2018 1 minute ago, #SycroX said: مشكور بس لازم تشكر ديفولت الراجل ساعدك كتير بس برضو كودك نفس المشكله يكتب لي الشخصية ممنوعه لكنه يعطيني هي Link to comment
#SycroX Posted January 27, 2018 Share Posted January 27, 2018 Just now, *RayaN-Alharbi. said: بس برضو كودك نفس المشكله يكتب لي الشخصية ممنوعه لكنه يعطيني هي كيف هيك ؟؟ طيب وش يقولك الدي بق Link to comment
#Major . Posted January 27, 2018 Author Share Posted January 27, 2018 (edited) 1 minute ago, #SycroX said: كيف هيك ؟؟ طيب وش يقولك الدي بق الدي بق كالعادة فاضي هو ترى يكتب لي ان الشخصية ممنوعة لكنه يعطيني هي Edited January 27, 2018 by *RayaN-Alharbi. Link to comment
#SycroX Posted January 27, 2018 Share Posted January 27, 2018 Just now, *RayaN-Alharbi. said: الدي بق كالعادة فاضي هو ترى يكتب لي ان الشخصية ممنوعة لكنه يعطيني هي ForbSkins = {66, 33} function isSkinAllowed(skin) if skin then for _,v in ipairs(ForbSkins) do if skin == v then return false end end end return true end addEventHandler("onClientGUIClick", guiRoot, function() if source == Skinb then local skinID = tonumber(guiGetText(skiNA)) or 0 if skinID >= 0 then if isSkinAllowed(skinID) then setElementModel(localPlayer, skinID) else outputChatBox("شخصية ممنوعه", 255, 0, 0) end end end end ) جرب و قولي Link to comment
#Major . Posted January 27, 2018 Author Share Posted January 27, 2018 1 minute ago, #SycroX said: ForbSkins = {66, 33} function isSkinAllowed(skin) if skin then for _,v in ipairs(ForbSkins) do if skin == v then return false end end end return true end addEventHandler("onClientGUIClick", guiRoot, function() if source == Skinb then local skinID = tonumber(guiGetText(skiNA)) or 0 if skinID >= 0 then if isSkinAllowed(skinID) then setElementModel(localPlayer, skinID) else outputChatBox("شخصية ممنوعه", 255, 0, 0) end end end end ) جرب و قولي تسلمم يدك شكرا 1 hour ago, Default#^ said: سوي جدول وحط فيه الايديات الي ماتبيه يستعملها وتحقق انها مو هي الي كاتبها واعطيه الشخصية شكرا اضياً 1 Link to comment
#SycroX Posted January 27, 2018 Share Posted January 27, 2018 Just now, *RayaN-Alharbi. said: تسلمم يدك شكرا شكرا اضياً عفوا 1 Link to comment
#Soking Posted January 28, 2018 Share Posted January 28, 2018 بس كدا الشخصيه بتكون وهمية و تظهر له فقط 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