aBo.F[ra]G<3 Posted July 4, 2014 Share Posted July 4, 2014 السلام عليكم ي شباب انا معي مود شراء رتب باللفل يعني اي واحد وصل للفل المعين يقدر يشتري ربته من اللوحه ذي بس اتوقع فيه نقص او غلط لاني شغلت المود والرتب نفس الى بالاسل وضغطت على الرتبه مايعمل ابي تشوفون المشكله وش بضبط Client GUIEditor = { gridlist = {}, window = {}, button = {} } Ranks = { {"vip",20}, {"pro",50}, {"superpro",100}, {"Moderator",280}, {"Admin",350}, {"SuperAdmin",480}, {"HeadAdmin",550}, {"kingserver",650}, } x,y = guiGetScreenSize () addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow((x-262)/2, (y-394)/2, 262, 394, "الترقيات", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor.window[1], false) GUIEditor.gridlist[1] = guiCreateGridList(0.04, 0.08, 0.92, 0.79, true, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "#", 0.2) guiGridListAddColumn(GUIEditor.gridlist[1], "Rank", 0.4) guiGridListAddColumn(GUIEditor.gridlist[1], "Level", 0.3) for k,v in ipairs ( Ranks ) do local row = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1], row, 1, k, false, false) guiGridListSetItemText(GUIEditor.gridlist[1], row, 2, v[1], false, false) guiGridListSetItemText(GUIEditor.gridlist[1], row, 3, v[2], false, false) end GUIEditor.button[1] = guiCreateButton(0.24, 0.90, 0.51, 0.08, "=[ Buy ]=", true, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFB936C8") end ) bindKey('F3','down',function () guiSetVisible(GUIEditor.window[1],not guiGetVisible(GUIEditor.window[1])) showCursor(guiGetVisible(GUIEditor.window[1])) end) addEventHandler("onClientGUIClick",root,function () local sel = guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ) if ( source == GUIEditor.button[1] ) then if ( sel ~= -1 ) then local Rank = guiGridListGetItemText ( GUIEditor.gridlist[1], sel, 2 ) local Level = guiGridListGetItemText ( GUIEditor.gridlist[1], sel, 3 ) triggerServerEvent("onBuyRank",localPlayer,Rank,Level) else outputChatBox("# Please Select Rank !",255,0,0,true) end end end) ----------------------------- Server addEvent("onBuyRank",true) addEventHandler("onBuyRank",root,function ( Rank,Level ) if ( isGuestAccount(getPlayerAccount(source)) ) then return outputChatBox("* Please Register To Buy Rank",source,255,0,0,true) end if ( isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Admin.ex")) ) then return end if ( tonumber( gettok(getElementData(source,"Level"), 2, string.byte(' ')) ) >= tonumber(Level) ) then aclGroupAddObject (aclGetGroup( tostring(Rank)),"user."..getAccountName(getPlayerAccount(source))) outputChatBox("* You Has Been Buy ".. Rank .." !",source,255,255,0,true) else outputChatBox("* You Dont Have ".. Level .." !",source,255,0,0,true) end end) Link to comment
AboShanab Posted July 5, 2014 Share Posted July 5, 2014 outputChatBox("* You Has Been Buy ".. Rank .." !",source,255,255,0,true) > outputChatBox("* You Has Been Buy ".. Level .." !",source,255,255,0,true) + جرب بعد م تعدل الكود اكتب في اف 8 debugscript 3 واشتر رتبة وصور لنا الاخطاء Link to comment
Max+ Posted July 5, 2014 Share Posted July 5, 2014 + غير الرسالة الى , you have bought .. you have bought .. لانك تستخدم بالماضي you has been buy ? Link to comment
#1ERuPTiON Posted July 5, 2014 Share Posted July 5, 2014 +غير الرسالة الى , you have bought .. you have bought .. لانك تستخدم بالماضي you has been buy ? 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