-#Saimon Posted March 24, 2014 Share Posted March 24, 2014 السلام عليكم ورحمة الله وبركاته شباب انا ابي اجيب اسماء جميع القروبات بقريد لست اسم الالمنت داتا حق القروبات grp ابي الكود الي يجيب لي اسماء جميع القروبات Link to comment
</Mr.Tn6eL> Posted March 24, 2014 Share Posted March 24, 2014 استعمل لوب يجلب جميع الداتا بمود القروبات عندك Link to comment
iPrestege Posted March 24, 2014 Share Posted March 24, 2014 السلام عليكم ورحمة الله وبركاتهشباب انا ابي اجيب اسماء جميع القروبات بقريد لست اسم الالمنت داتا حق القروبات grp ابي الكود الي يجيب لي اسماء جميع القروبات ACL Groups or Groups System? Link to comment
al-Kobra Posted March 24, 2014 Share Posted March 24, 2014 for i,v in ipairs(getElementData (player, "gang") == "اسم الجانج") do Link to comment
-#Saimon Posted March 24, 2014 Author Share Posted March 24, 2014 السلام عليكم ورحمة الله وبركاتهشباب انا ابي اجيب اسماء جميع القروبات بقريد لست اسم الالمنت داتا حق القروبات grp ابي الكود الي يجيب لي اسماء جميع القروبات ACL Groups or Groups System? Group System Link to comment
-#Saimon Posted March 24, 2014 Author Share Posted March 24, 2014 for i,v in ipairs(getElementData (player, "gang") == "اسم الجانج") do انا ابي اجيب اسماء القروبات بقريد لست مو انا احطها قروب قروب Link to comment
al-Kobra Posted March 24, 2014 Share Posted March 24, 2014 for i,v in ipairs(getElementData (player, "gang")) do guiGridListAddRow guiGridListSetItemText Link to comment
-#Saimon Posted March 24, 2014 Author Share Posted March 24, 2014 for i,v in ipairs(getElementData (player, "gang")) do guiGridListAddRow guiGridListSetItemText for i,v in ipairs(getElementData (player, "gang")) do هذي مافهمتها ممكن مثال بسيط عليها ؟ Link to comment
jafar Posted March 24, 2014 Share Posted March 24, 2014 for i,v in ipairs(getElementData (player, "gang")) do guiGridListAddRow guiGridListSetItemText X Link to comment
-#Saimon Posted March 24, 2014 Author Share Posted March 24, 2014 for i,v in ipairs(getElementData (player, "gang")) do guiGridListAddRow guiGridListSetItemText X طيب تقدر تعطيني الكود الصحيح ؟ واكون شاكر لك Link to comment
-#Saimon Posted March 24, 2014 Author Share Posted March 24, 2014 elseif source == GList then WGList = guiCreateWindow(680, 289, 297, 373, "Groups List", false) guiWindowSetSizable(WGList, false) GridGList = guiCreateGridList(9, 61, 278, 271, false, WGList) guiGridListAddColumn(GridGList, "Groups", 0.4) guiGridListAddColumn(GridGList, "Founder", 0.3) guiGridListAddColumn(GridGList, "Members", 0.2) + Plrgang = getElementData(source,"grp") وهذا الالمنت داتا حق القروب grp بس لو بخليه يجيب جميع اسماء القروبات مايجي Link to comment
#DRAGON!FIRE Posted March 24, 2014 Share Posted March 24, 2014 بـ حفظ القروبات ؟ ذذ ( SQL ) اطرح الاكواد كاملة .. واللي يهمني انه مستخدم Link to comment
jafar Posted March 24, 2014 Share Posted March 24, 2014 جيب كل القروبات من قاعدة البيانات وأرسل الجدول بواسطة الترايقر للكلنت Link to comment
-#Saimon Posted March 24, 2014 Author Share Posted March 24, 2014 بـ حفظ القروبات ؟ ذذ ( SQL ) اطرح الاكواد كاملة .. واللي يهمني انه مستخدم Client: function onClick() if source == create then triggerServerEvent("onCreateGang",getLocalPlayer(),guiGetText(ENG)) Server: addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()),onStart ) addEvent("onCreateGang",true) addEventHandler("onCreateGang",getRootElement(), function(EditNameG) acc = getAccountName(getPlayerAccount(source)) if not ( acc == "guest" ) then checkold = executeSQLQuery("SELECT * FROM Gangs where Name = '" .. EditNameG .. "'") if ( #checkold == 0 ) and not ( EditNameG == "N/A") then executeSQLInsert ( "Gangs", "'".. EditNameG .."','".. tonumber("0") .."','".. tonumber("0") .."'" ) outputChatBox("Your Gang is successfully Created!",source,0,255,0,true) setElementData(source,"grp",tostring(EditNameG)) Namer = getPlayerName(source) triggerClientEvent(source,"setOpCreate",source) executeSQLInsert ( "GangsMoney", "'".. EditNameG .."','".. tonumber("0") .."'" ) executeSQLInsert ( "GangMemberSQLS", "'".. EditNameG .."','".. Namer .."','".. acc .."','".. tostring("yes") .."','".. tostring("no") .."'" ) else outputChatBox("Gang Name Has been Creared Adleay ",source,255,0,0,true) end else outputChatBox("Please Loign to Created Gang",source,255,0,0,true) end end ) كلش شغال تمام اللهم ناقصني اجيب جميع القروبات بقريد لست Link to comment
jafar Posted March 24, 2014 Share Posted March 24, 2014 -- Client triggerServerEvent ( "GetData", localPlayer ); -- حطه في مكان فتح القريد ليست .. addEvent ( "ReturnData", true ); addEventHandler ( "ReturnData", root, function ( table ) guiGridListClear ( GridGList ); for i, v in ipairs ( table ) do local row = guiGridListAddRow ( GridGList ); guiGridListSetItemText ( GridGList, row, 1, tostring ( v [ "Name" ] ), false, false ); end end ); -- Server addEvent ( "GetData", true ); addEventHandler ( "GetData", root, function ( ) local GroupsList = executeSQLQuery ( "SELECT * FROM Gangs" ); triggerClientEvent ( source, "ReturnData", source, GroupsList ); end ); Link to comment
#DRAGON!FIRE Posted March 24, 2014 Share Posted March 24, 2014 + خاطء executeSQLInsert استخدمك لـ getGroups ( ) -- ضعها بـ كود فتح النافذة function getGroups ( ) triggerServerEvent( "GetallGroups", localPlayer ) end addEvent( "UpGroups", true ) addEventHandler( "UpGroups", root, function( allGro ) guiGridListClear( Grid ) for _,Groups in ipairs ( allGro ) do local row = guiGridListAddRow( Grid ) guiGridListSetItemText( Grid, row, 1, tostring( Groups.groupName ), false, false ) end end ) function allGroups() local Row = executeSQLQuery("SELECT * FROM Gangs") if ( type( Row ) == "table" and #Row == 0 or not Row ) then return {} else return Row end end addEvent( "GetallGroups", true ) addEventHandler( "GetallGroups", root, function( ) local Groups = { } for _,NameGroups in ipairs ( allGroups( ) ) do table.insert( Groups, {groupName = NameGroups.Name} ) end triggerClientEvent( source, "UpGroups", source, Groups ) end ) Link to comment
-#Saimon Posted March 24, 2014 Author Share Posted March 24, 2014 + خاطء executeSQLInsert استخدمك لـ getGroups ( ) -- ضعها بـ كود فتح النافذة function getGroups ( ) triggerServerEvent( "GetallGroups", localPlayer ) end addEvent( "UpGroups", true ) addEventHandler( "UpGroups", root, function( allGro ) guiGridListClear( Grid ) for _,Groups in ipairs ( allGro ) do local row = guiGridListAddRow( Grid ) guiGridListSetItemText( Grid, row, 1, tostring( Groups.groupName ), false, false ) end end ) function allGroups() local Row = executeSQLQuery("SELECT * FROM Gangs") if ( type( Row ) == "table" and #Row == 0 or not Row ) then return {} else return Row end end addEvent( "GetallGroups", true ) addEventHandler( "GetallGroups", root, function( ) local Groups = { } for _,NameGroups in ipairs ( allGroups( ) ) do table.insert( Groups, {groupName = NameGroups.Name} ) end triggerClientEvent( source, "UpGroups", source, Groups ) end ) احطه مع الكود ذا ؟ elseif source == GList then MEN1 = guiCreateWindow(680, 289, 297, 373, "Window Members", false) guiWindowSetSizable(MEN1, false) GMEN2 = guiCreateGridList(9, 61, 278, 271, false, MEN1) guiGridListAddColumn(GMEN2, "Group", 0.4) guiGridListAddColumn(GMEN2, "Founder", 0.3) guiGridListAddColumn(GMEN2, "Members", 0.2) Link to comment
#DRAGON!FIRE Posted March 24, 2014 Share Posted March 24, 2014 Client Side ! < بــ جانب كلنت لو ما فهمت قصدي انه بـ اول سطر انه تضعها مع كود فتح النافذة .. : واللاعب يفتح النافذة تحط اول سطر به زي كذا مثال bindKey يعني اقصد يوم تسوي فنكشن الـ bindKey( "F2", "down", function ( ) guiSetVisible ( element, not guiGetVisible( element ) ) showCursor( guiGetVisible( element ) ) getGroups ( ) -- ضعها بـ كود فتح النافذة end ) getGroups ( ) -- ضعها بـ كود فتح النافذة function getGroups ( ) triggerServerEvent( "GetallGroups", localPlayer ) end addEvent( "UpGroups", true ) addEventHandler( "UpGroups", root, function( allGro ) guiGridListClear( Grid ) for _,Groups in ipairs ( allGro ) do local row = guiGridListAddRow( Grid ) guiGridListSetItemText( Grid, row, 1, tostring( Groups.groupName ), false, false ) end end ) Server Side ! < بـ جانب سيرفر function allGroups() local Row = executeSQLQuery("SELECT * FROM Gangs") if ( type( Row ) == "table" and #Row == 0 or not Row ) then return {} else return Row end end addEvent( "GetallGroups", true ) addEventHandler( "GetallGroups", root, function( ) local Groups = { } for _,NameGroups in ipairs ( allGroups( ) ) do table.insert( Groups, {groupName = NameGroups.Name} ) end triggerClientEvent( source, "UpGroups", source, Groups ) end ) Link to comment
-#Saimon Posted March 24, 2014 Author Share Posted March 24, 2014 تمت الافاده Thanx: # ZĀ7F jafar 3NAD k__s__a Mr.Pres[T]ege al-Kobra Link to comment
#DRAGON!FIRE Posted March 24, 2014 Share Posted March 24, 2014 حياك الله بـ اي وقت .. ^ 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