YourMind Posted April 7, 2016 Posted April 7, 2016 -- client ranks = { -- Name.ID {'Army',2}, {'Army',29}, {'Army',287}, } local screenW, screenH = guiGetScreenSize() wnd = guiCreateWindow((screenW - 318) / 2, (screenH - 332) / 2, 318, 332, ":: Skins System :", false) guiWindowSetSizable(wnd, false) guiSetVisible (wnd,false) grid = guiCreateGridList(9, 23, 299, 236, false, wnd) guiSetFont(grid, "default-bold-small") guiGridListAddColumn(grid, "Name", 0.9) btn = guiCreateButton(19, 269, 276, 47, "Buy", false, wnd) guiSetFont(btn, "default-bold-small") bindKey ("x","down", function () guiSetVisible (wnd,not guiGetVisible(wnd)) showCursor (guiGetVisible(wnd)) end ) for _, v in ipairs (ranks) do local Row = guiGridListAddRow(grid) guiGridListSetItemText(grid,Row,1,v[1],false, false) guiGridListSetItemData (grid,Row,1,v[2]) end addEventHandler("onClientGUIClick",btn, function () local sel = guiGridListGetSelectedItem (grid) if sel ~= -1 then local skinID = guiGridListGetItemData (grid,sel,1) triggerServerEvent("SetSkin",localPlayer,skinID) guiSetVisible (wnd,false) guiSetInputEnabled(false) showCursor(false) end end ,false) -- server addEvent("SetSkin" ,true) addEventHandler("SetSkin" ,root, function (ID) PMoney = getPlayerMoney(source) if PMoney >= 2500 then setElementModel(source,tonumber(ID)) takePlayerMoney(source,2500) else return outputChatBox("You don't have 2500$.",source,255,5,5) end end )
YourMind Posted April 7, 2016 Posted April 7, 2016 -- client ranks = { -- Name.ID {'Army',2}, {'Army',29}, {'Army',287}, } local screenW, screenH = guiGetScreenSize() wnd = guiCreateWindow((screenW - 318) / 2, (screenH - 332) / 2, 318, 332, ":: Skins System :", false) guiWindowSetSizable(wnd, false) guiSetVisible (wnd,false) grid = guiCreateGridList(9, 23, 299, 236, false, wnd) guiSetFont(grid, "default-bold-small") guiGridListAddColumn(grid, "Name", 0.9) btn = guiCreateButton(19, 269, 276, 47, "Buy", false, wnd) guiSetFont(btn, "default-bold-small") bindKey ("x","down", function () guiSetVisible (wnd,not guiGetVisible(wnd)) showCursor (guiGetVisible(wnd)) end ) for _, v in ipairs (ranks) do local Row = guiGridListAddRow(grid) guiGridListSetItemText(grid,Row,1,v[1],false, false) guiGridListSetItemData (grid,Row,1,v[2]) end addEventHandler("onClientGUIClick",btn, function () local sel = guiGridListGetSelectedItem (grid) if sel ~= -1 then local skinID = guiGridListGetItemData (grid,sel,1) triggerServerEvent("SetSkin",localPlayer,skinID) guiSetVisible (wnd,false) guiSetInputEnabled(false) showCursor(false) end end ,false) -- server addEvent("SetSkin" ,true) addEventHandler("SetSkin" ,root, function (ID) PMoney = getPlayerMoney(source) if PMoney >= 2500 then setElementModel(source,tonumber(ID)) takePlayerMoney(source,2500) else return outputChatBox("You don't have 2500$.",source,255,5,5) end end )
#Untied Posted April 7, 2016 Author Posted April 7, 2016 ايه المشكله دي طيب؟ ranks = { {'Army',1}, {'Army',Army}, {'Army',Army} } addEventHandler("onClientResourceStart", resourceRoot, function() wnd = guiCreateWindow(242, 139, 318, 332, ":: Skins Systeam :", false) guiWindowSetSizable(wnd, false) guiSetVisible(wnd, false) grid = guiCreateGridList(9, 23, 289, 207, false, wnd) guiGridListAddColumn(grid, "Name", 0.9) btn = guiCreateButton(17, 254, 276, 47, "Buy", false, wnd) end ) bindKey("x","down", function ( ) guiSetVisible ( wnd , not guiGetVisible ( wnd ) ) SetSkins() showCursor ( not isCursorShowing ( ) ) end ); function SetSkins() for _, v in ipairs (ranks) do local Row = guiGridListAddRow(grid) guiGridListSetItemText(grid, Row, 1, v[1], false, false) guiGridListSetItemText(grid, Row, 2, v[2], false, false) end end addEventHandler("onGUIClientClick" ,resourceRoot , function () if ( source == btn ) then local SkinID = guiGridListGetItemText(grid ,guiGridListGetSelectedItem(grid) ,1) triggerServerEvent("SetSkin" ,localPlayer ,15 ) end end ) باجي اضعط علي القريد لست والبيتون مش بيغير الشخصيه * There is no God but Allah, Mohammed is the Messenger Of Allah
#Untied Posted April 7, 2016 Author Posted April 7, 2016 ايه المشكله دي طيب؟ ranks = { {'Army',1}, {'Army',Army}, {'Army',Army} } addEventHandler("onClientResourceStart", resourceRoot, function() wnd = guiCreateWindow(242, 139, 318, 332, ":: Skins Systeam :", false) guiWindowSetSizable(wnd, false) guiSetVisible(wnd, false) grid = guiCreateGridList(9, 23, 289, 207, false, wnd) guiGridListAddColumn(grid, "Name", 0.9) btn = guiCreateButton(17, 254, 276, 47, "Buy", false, wnd) end ) bindKey("x","down", function ( ) guiSetVisible ( wnd , not guiGetVisible ( wnd ) ) SetSkins() showCursor ( not isCursorShowing ( ) ) end ); function SetSkins() for _, v in ipairs (ranks) do local Row = guiGridListAddRow(grid) guiGridListSetItemText(grid, Row, 1, v[1], false, false) guiGridListSetItemText(grid, Row, 2, v[2], false, false) end end addEventHandler("onGUIClientClick" ,resourceRoot , function () if ( source == btn ) then local SkinID = guiGridListGetItemText(grid ,guiGridListGetSelectedItem(grid) ,1) triggerServerEvent("SetSkin" ,localPlayer ,15 ) end end ) باجي اضعط علي القريد لست والبيتون مش بيغير الشخصيه * There is no God but Allah, Mohammed is the Messenger Of Allah
#Untied Posted April 7, 2016 Author Posted April 7, 2016 شكرا لك . * There is no God but Allah, Mohammed is the Messenger Of Allah
#Untied Posted April 7, 2016 Author Posted April 7, 2016 شكرا لك . * There is no God but Allah, Mohammed is the Messenger Of Allah
#Mr.Rajo~,< Posted April 7, 2016 Posted April 7, 2016 (edited) ايه المشكله دي طيب؟ ranks = { {'Army',1}, {'Army',Army}, {'Army',Army} } addEventHandler("onClientResourceStart", resourceRoot, function() wnd = guiCreateWindow(242, 139, 318, 332, ":: Skins Systeam :", false) guiWindowSetSizable(wnd, false) guiSetVisible(wnd, false) grid = guiCreateGridList(9, 23, 289, 207, false, wnd) guiGridListAddColumn(grid, "Name", 0.9) btn = guiCreateButton(17, 254, 276, 47, "Buy", false, wnd) end ) bindKey("x","down", function ( ) guiSetVisible ( wnd , not guiGetVisible ( wnd ) ) SetSkins() showCursor ( not isCursorShowing ( ) ) end ); function SetSkins() for _, v in ipairs (ranks) do local Row = guiGridListAddRow(grid) guiGridListSetItemText(grid, Row, 1, v[1], false, false) guiGridListSetItemText(grid, Row, 2, v[2], false, false) end end addEventHandler("onGUIClientClick" ,resourceRoot , function () if ( source == btn ) then local SkinID = guiGridListGetItemText(grid ,guiGridListGetSelectedItem(grid) ,1) triggerServerEvent("SetSkin" ,localPlayer ,15 ) end end ) باجي اضعط علي القريد لست والبيتون مش بيغير الشخصيه حط هذا بسيرفر addEvent("SetSkin" ,true) addEventHandler("SetSkin" ,root, function (ID) PMoney = getPlayerMoney(source) if PMoney >= 2500 then setElementModel(source ,ID) takePlayerMoney(source,2500) else outputChatBox("U don't have 2500$",source ,255,255,255,false) end end ) Edited April 7, 2016 by Guest
#Mr.Rajo~,< Posted April 7, 2016 Posted April 7, 2016 (edited) ايه المشكله دي طيب؟ ranks = { {'Army',1}, {'Army',Army}, {'Army',Army} } addEventHandler("onClientResourceStart", resourceRoot, function() wnd = guiCreateWindow(242, 139, 318, 332, ":: Skins Systeam :", false) guiWindowSetSizable(wnd, false) guiSetVisible(wnd, false) grid = guiCreateGridList(9, 23, 289, 207, false, wnd) guiGridListAddColumn(grid, "Name", 0.9) btn = guiCreateButton(17, 254, 276, 47, "Buy", false, wnd) end ) bindKey("x","down", function ( ) guiSetVisible ( wnd , not guiGetVisible ( wnd ) ) SetSkins() showCursor ( not isCursorShowing ( ) ) end ); function SetSkins() for _, v in ipairs (ranks) do local Row = guiGridListAddRow(grid) guiGridListSetItemText(grid, Row, 1, v[1], false, false) guiGridListSetItemText(grid, Row, 2, v[2], false, false) end end addEventHandler("onGUIClientClick" ,resourceRoot , function () if ( source == btn ) then local SkinID = guiGridListGetItemText(grid ,guiGridListGetSelectedItem(grid) ,1) triggerServerEvent("SetSkin" ,localPlayer ,15 ) end end ) باجي اضعط علي القريد لست والبيتون مش بيغير الشخصيه حط هذا بسيرفر addEvent("SetSkin" ,true) addEventHandler("SetSkin" ,root, function (ID) PMoney = getPlayerMoney(source) if PMoney >= 2500 then setElementModel(source ,ID) takePlayerMoney(source,2500) else outputChatBox("U don't have 2500$",source ,255,255,255,false) end end ) Edited April 7, 2016 by Guest
#Untied Posted April 7, 2016 Author Posted April 7, 2016 لو سمحت ممكن تعملهالي لين يضعط ويشتري الشخصيه يقولو جمله في الشات * There is no God but Allah, Mohammed is the Messenger Of Allah
#Untied Posted April 7, 2016 Author Posted April 7, 2016 لو سمحت ممكن تعملهالي لين يضعط ويشتري الشخصيه يقولو جمله في الشات * There is no God but Allah, Mohammed is the Messenger Of Allah
N3xT Posted April 7, 2016 Posted April 7, 2016 outputChatBox("#ff0000# #ffffffYou Buy #FF0000A #FFFFFFskin",source,0,255,0,true) أما بخصوص بعض الأكواد اللي فوق كلكم ما لحظتم أن الحدث أسمه ' onGUIClientClick ' وأكيد ما بيشتغل لأن أسمه غلط , التصحيح ' onClientGUIClick '
N3xT Posted April 7, 2016 Posted April 7, 2016 outputChatBox("#ff0000# #ffffffYou Buy #FF0000A #FFFFFFskin",source,0,255,0,true) أما بخصوص بعض الأكواد اللي فوق كلكم ما لحظتم أن الحدث أسمه ' onGUIClientClick ' وأكيد ما بيشتغل لأن أسمه غلط , التصحيح ' onClientGUIClick '
#Mr.Rajo~,< Posted April 7, 2016 Posted April 7, 2016 (edited) لو سمحت ممكن تعملهاليلين يضعط ويشتري الشخصيه يقولو جمله في الشات addEvent("SetSkin" ,true) addEventHandler("SetSkin" ,root, function (ID) PMoney = getPlayerMoney(source) if PMoney >= 2500 then setElementModel(source ,ID) takePlayerMoney(source,2500) outputChatBox("U bought a new skin",source ,255,255,255,false) else outputChatBox("U don't have 2500$",source ,255,255,255,false) end end ) Edited April 7, 2016 by Guest
#Mr.Rajo~,< Posted April 7, 2016 Posted April 7, 2016 (edited) لو سمحت ممكن تعملهاليلين يضعط ويشتري الشخصيه يقولو جمله في الشات addEvent("SetSkin" ,true) addEventHandler("SetSkin" ,root, function (ID) PMoney = getPlayerMoney(source) if PMoney >= 2500 then setElementModel(source ,ID) takePlayerMoney(source,2500) outputChatBox("U bought a new skin",source ,255,255,255,false) else outputChatBox("U don't have 2500$",source ,255,255,255,false) end end ) Edited April 7, 2016 by Guest
#Mr.Rajo~,< Posted April 7, 2016 Posted April 7, 2016 outputChatBox("#ff0000# #ffffffYou Buy #FF0000A #FFFFFFskin",source,0,255,0,true) أما بخصوص بعض الأكواد اللي فوق كلكم ما لحظتم أن الحدث أسمه ' onGUIClientClick ' وأكيد ما بيشتغل لأن أسمه غلط , التصحيح ' onClientGUIClick ' متأكد ؟
#Mr.Rajo~,< Posted April 7, 2016 Posted April 7, 2016 outputChatBox("#ff0000# #ffffffYou Buy #FF0000A #FFFFFFskin",source,0,255,0,true) أما بخصوص بعض الأكواد اللي فوق كلكم ما لحظتم أن الحدث أسمه ' onGUIClientClick ' وأكيد ما بيشتغل لأن أسمه غلط , التصحيح ' onClientGUIClick ' متأكد ؟
#Untied Posted April 7, 2016 Author Posted April 7, 2016 استفسار انا عامل 2 كلوم في القريد لست وفاتح جدول الكلوم اسمو ID والتاني Skins {'Army','123',2}, ونا عايز اعمله يظهر في الكوم الاول 123 والتاني Army واخر شي مش كلوم اي دي الشخصيه * There is no God but Allah, Mohammed is the Messenger Of Allah
#Untied Posted April 7, 2016 Author Posted April 7, 2016 استفسار انا عامل 2 كلوم في القريد لست وفاتح جدول الكلوم اسمو ID والتاني Skins {'Army','123',2}, ونا عايز اعمله يظهر في الكوم الاول 123 والتاني Army واخر شي مش كلوم اي دي الشخصيه * There is no God but Allah, Mohammed is the Messenger Of Allah
#Mr.Rajo~,< Posted April 7, 2016 Posted April 7, 2016 استفسارانا عامل 2 كلوم في القريد لست وفاتح جدول الكلوم اسمو ID والتاني Skins {'Army','123',2}, ونا عايز اعمله يظهر في الكوم الاول 123 والتاني Army واخر شي مش كلوم اي دي الشخصيه مافهمت ممكن توضح اكثر
#Mr.Rajo~,< Posted April 7, 2016 Posted April 7, 2016 استفسارانا عامل 2 كلوم في القريد لست وفاتح جدول الكلوم اسمو ID والتاني Skins {'Army','123',2}, ونا عايز اعمله يظهر في الكوم الاول 123 والتاني Army واخر شي مش كلوم اي دي الشخصيه مافهمت ممكن توضح اكثر
#Untied Posted April 7, 2016 Author Posted April 7, 2016 يعني انا عامل 2 كلوم في القريد لست وفاتح جدول الكلوم اسمه ID والتاني Skins عاوز ال2 يتكتو في حاجات ومفروض اعمل حاجه 3 عشان رقم السكين انا عملته كدا {'Army','123',2}, ما طلعلي 123 في القريد لست @ * There is no God but Allah, Mohammed is the Messenger Of Allah
#Untied Posted April 7, 2016 Author Posted April 7, 2016 يعني انا عامل 2 كلوم في القريد لست وفاتح جدول الكلوم اسمه ID والتاني Skins عاوز ال2 يتكتو في حاجات ومفروض اعمل حاجه 3 عشان رقم السكين انا عملته كدا {'Army','123',2}, ما طلعلي 123 في القريد لست @ * There is no God but Allah, Mohammed is the Messenger Of Allah
#Mr.Rajo~,< Posted April 7, 2016 Posted April 7, 2016 يعني انا عامل 2 كلوم في القريد لستوفاتح جدول الكلوم اسمه ID والتاني Skins عاوز ال2 يتكتو في حاجات ومفروض اعمل حاجه 3 عشان رقم السكين انا عملته كدا {'Army','123',2}, ما طلعلي 123 في القريد لست @ شوف امسح اللي بالنوت باد كله وحط هذا بكلاينت ranks = { {'Skin1',1}, {'Skin2',2}, {'Skin3',3} } addEventHandler("onClientResourceStart", resourceRoot, function() wnd = guiCreateWindow(242, 139, 318, 332, ":: Skins Systeam :", false) guiWindowSetSizable(wnd, false) guiSetVisible(wnd, false) grid = guiCreateGridList(9, 23, 289, 207, false, wnd) guiGridListAddColumn(grid, "Name", 0.9) guiGridListAddColumn(grid, "ID", 0.9) btn = guiCreateButton(17, 254, 276, 47, "Buy", false, wnd) end ) bindKey("x","down", function ( ) guiSetVisible ( wnd , not guiGetVisible ( wnd ) ) SetSkins() showCursor ( not isCursorShowing ( ) ) end ); function SetSkins() for _, v in ipairs (ranks) do local Row = guiGridListAddRow(grid) guiGridListSetItemText(grid, Row, 1, v[1], false, false) guiGridListSetItemText(grid, Row, 2, v[2], false, false) end end addEventHandler("onGUIClientClick" ,resourceRoot , function () if ( source == btn ) then local SkinID = guiGridListGetItemText(grid ,guiGridListGetSelectedItem(grid) ,2) triggerServerEvent("SetSkin" ,localPlayer ,SkinID ) end end ) وهذا حطه بسيرفر addEvent("SetSkin" ,true) addEventHandler("SetSkin" ,root, function (ID) PMoney = getPlayerMoney(source) if PMoney >= 2500 then setElementModel(source ,ID) takePlayerMoney(source,2500) outputChatBox("U bought a new skin",source ,255,255,255,false) else outputChatBox("U don't have 2500$",source ,255,255,255,false) end end ) واذا تبي تحط عامود ثالث تسوي بفنكشن setSkins كذا function SetSkins() for _, v in ipairs (ranks) do local Row = guiGridListAddRow(grid) guiGridListSetItemText(grid, Row, 1, v[1], false, false) guiGridListSetItemText(grid, Row, 2, v[2], false, false) guiGridListSetItemText(grid, Row, 3, v[3], false, false) end end
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