SAM!! Posted June 30, 2018 Share Posted June 30, 2018 السلام عليكم ورحمة الله وبركاتة ابي اذا ضغطت زر يسوي تحقق مثلا اني معي 1000 فلوس وياخد مني 1000 فلوس ويضيفني في الاسل مثلا كونسل لمدة معينة مثلا ساعة وبعدين يسحبها مني ولو انا في الجروب اصلا من قبل يقولي عذرا انت كونسل وشكرآآآ محاولتي ككلنت addEventHandler('onClientGUIClick', root, function ( ) if source == btn.buyvip then guiSetVisible( wnd1, false ) showCursor( false ) triggerServerEvent ( "buyvip", localPlayer ) end end ) سيرفر addEvent ( "buyvip", true ) addEventHandler ( "buyvip", root, function ( ) local Le3bA = getPlayerMoney ( source ) if Le3bA > 250000 then takePlayerMoney ( source, 250000 ) local name = getPlayerName(source) if accountName then aclGroupAddObject (aclGetGroup("Admin"), "user."..accountName) outputChatBox ("Account '"..accountName.."' succesfully added to the admin group", playerSource) else outputChatBox("You don't have $250000 to buy Super Jump", source, 255, 0, 0, true) end end ) Link to comment
SAM!! Posted June 30, 2018 Author Share Posted June 30, 2018 اي مساااااااااعدة Rakan# Link to comment
+Source|> Posted June 30, 2018 Share Posted June 30, 2018 Just now, SAM!! said: اي مساااااااااعدة Rakan# accountName = ? Link to comment
SAM!! Posted June 30, 2018 Author Share Posted June 30, 2018 +Source|> بي اضيف الاكونت حق الشخص بالاسل لما يضغط علي الزر اس مساعدة ياشباب تروة تصحيح لكود بسيط؟ Link to comment
TAPL Posted June 30, 2018 Share Posted June 30, 2018 (edited) addEvent("buyvip", true) addEventHandler("buyvip", root, function() local Le3bA = getPlayerMoney(source) if Le3bA >= 250000 then local account = getPlayerAccount(source) if account and not isGuestAccount(account) then local accountName = getAccountName(account) if not isObjectInACLGroup("user."..accountName, aclGetGroup("Admin")) then takePlayerMoney(source, 250000) aclGroupAddObject(aclGetGroup("Admin"), "user."..accountName) outputChatBox "Account '"..accountName.."' succesfully added to the admin group", source) else outputChatBox("You're already in admin group.", source, 255, 0, 0, true) end else outputChatBox("You're not logged in.", source, 255, 0, 0, true) end else outputChatBox("You don't have $250000 to buy VIP", source, 255, 0, 0, true) end end) Edited June 30, 2018 by TAPL 1 1 Link to comment
SAM!! Posted June 30, 2018 Author Share Posted June 30, 2018 TAPL للأسف الكود مو شغال الديبق يقولي اني سويت ترايقر لbuyvip للسيرفر ومافي ايفنت بالاسم ذا Link to comment
Rakan# Posted June 30, 2018 Share Posted June 30, 2018 7 minutes ago, SAM!! said: TAPL للأسف الكود مو شغال الديبق يقولي اني سويت ترايقر لbuyvip للسيرفر ومافي ايفنت بالاسم ذا لا جيت تكلمني سوي @Rakan# عشان يطلع لي تنبيه + غير اسم الايفنت الى Ranks:Buy1 او اي شي وجرب اشتري واذا مانفع الخطا منك اطرح اكوادك اقين Link to comment
SAM!! Posted June 30, 2018 Author Share Posted June 30, 2018 Rakan# @Rakan# لم تظبط معنا سيرفر addEvent("Ranks:Buy1", true) addEventHandler("Ranks:Buy1", root, function() local Le3bA = getPlayerMoney(source) if Le3bA >= 250000 then local account = getPlayerAccount(source) if account and not isGuestAccount(account) then local accountName = getAccountName(account) if not isObjectInACLGroup("user."..accountName, aclGetGroup("VIP")) then takePlayerMoney(source, 250000) aclGroupAddObject(aclGetGroup("VIP"), "user."..accountName) outputChatBox "Account '"..accountName.."' succesfully added to the VIP group", source) outputChatBox("You're in VIP group Now.", source, 255, 0, 0, true) else outputChatBox("You're already in VIP group.", source, 255, 0, 0, true) end else outputChatBox("You're not logged in.", source, 255, 0, 0, true) end else outputChatBox("You don't have $250000 to buy VIP", source, 255, 0, 0, true) end end) -------------------------- كلنت addEventHandler('onClientGUIClick', root, function ( ) if source == btn.buyvip then guiSetVisible( wnd1, false ) showCursor( false ) triggerServerEvent ( "Ranks:Buy1", localPlayer ) end end ) Link to comment
+Source|> Posted June 30, 2018 Share Posted June 30, 2018 سيرفر addEvent("Ranks:Buy1", true) addEventHandler("Ranks:Buy1", root, function() local Le3bA = getPlayerMoney(source) if Le3bA >= 250000 then local account = getPlayerAccount(source) if account and not isGuestAccount(account) then local accountName = getAccountName(account) if not isObjectInACLGroup("user."..accountName, aclGetGroup("VIP")) then takePlayerMoney(source, 250000) aclGroupAddObject(aclGetGroup("VIP"), "user."..accountName) outputChatBox( "Account "..accountName.." succesfully added to the VIP group", source) outputChatBox("You're in VIP group Now.", source, 255, 0, 0, true) else outputChatBox("You're already in VIP group.", source, 255, 0, 0, true) end else outputChatBox("You're not logged in.", source, 255, 0, 0, true) end else outputChatBox("You don't have $250000 to buy VIP", source, 255, 0, 0, true) end end ) 1 Link to comment
MR_Mahmoud Posted June 30, 2018 Share Posted June 30, 2018 52 minutes ago, +Source|> said: سيرفر addEvent("Ranks:Buy1", true) addEventHandler("Ranks:Buy1", root, function() local Le3bA = getPlayerMoney(source) if Le3bA >= 250000 then local account = getPlayerAccount(source) if account and not isGuestAccount(account) then local accountName = getAccountName(account) if not isObjectInACLGroup("user."..accountName, aclGetGroup("VIP")) then takePlayerMoney(source, 250000) aclGroupAddObject(aclGetGroup("VIP"), "user."..accountName) outputChatBox( "Account "..accountName.." succesfully added to the VIP group", source) outputChatBox("You're in VIP group Now.", source, 255, 0, 0, true) else outputChatBox("You're already in VIP group.", source, 255, 0, 0, true) end else outputChatBox("You're not logged in.", source, 255, 0, 0, true) end else outputChatBox("You don't have $250000 to buy VIP", source, 255, 0, 0, true) end end ) طيب وين التايمر هوة قال بدو لما يعطيعه الزر رتبة يبيه لمدة معينة وينسحب منه الرتبة + الكود لازمني لي كمان وشكرا ذذ 1 1 Link to comment
SAM!! Posted June 30, 2018 Author Share Posted June 30, 2018 MR_Mahmoud يب صحيح تصدق نسيت ض 1 Link to comment
+Source|> Posted July 1, 2018 Share Posted July 1, 2018 11 hours ago, SAM!! said: MR_Mahmoud يب صحيح تصدق نسيت ض addEvent("Ranks:Buy1", true) addEventHandler("Ranks:Buy1", root, function() local Le3bA = getPlayerMoney(source) if Le3bA >= 250000 then local account = getPlayerAccount(source) if account and not isGuestAccount(account) then local accountName = getAccountName(account) if not isObjectInACLGroup("user."..accountName, aclGetGroup("VIP")) then takePlayerMoney(source, 250000) aclGroupAddObject(aclGetGroup("VIP"), "user."..accountName) outputChatBox( "Account "..accountName.." succesfully added to the VIP group", source) outputChatBox("You're in VIP group Now.", source, 255, 0, 0, true) setTimer( function() aclGroupRemoveObject(aclGetGroup("VIP"),"user."..accountName) end, 60000*5,1) else outputChatBox("You're already in VIP group.", source, 255, 0, 0, true) end else outputChatBox("You're not logged in.", source, 255, 0, 0, true) end else outputChatBox("You don't have $250000 to buy VIP", source, 255, 0, 0, true) end end ) يسحب رتبه بعد ٥ دقايق 2 Link to comment
SAM!! Posted July 1, 2018 Author Share Posted July 1, 2018 (edited) Deleted Edited July 1, 2018 by SAM!! Link to comment
Rakan# Posted July 1, 2018 Share Posted July 1, 2018 9 hours ago, +Source|> said: addEvent("Ranks:Buy1", true) addEventHandler("Ranks:Buy1", root, function() local Le3bA = getPlayerMoney(source) if Le3bA >= 250000 then local account = getPlayerAccount(source) if account and not isGuestAccount(account) then local accountName = getAccountName(account) if not isObjectInACLGroup("user."..accountName, aclGetGroup("VIP")) then takePlayerMoney(source, 250000) aclGroupAddObject(aclGetGroup("VIP"), "user."..accountName) outputChatBox( "Account "..accountName.." succesfully added to the VIP group", source) outputChatBox("You're in VIP group Now.", source, 255, 0, 0, true) setTimer( function() aclGroupRemoveObject(aclGetGroup("VIP"),"user."..accountName) end, 60000*5,1) else outputChatBox("You're already in VIP group.", source, 255, 0, 0, true) end else outputChatBox("You're not logged in.", source, 255, 0, 0, true) end else outputChatBox("You don't have $250000 to buy VIP", source, 255, 0, 0, true) end end ) يسحب رتبه بعد ٥ دقايق غلط استعمالك للتايمر لازم تعرف فيه accountName setTimer( function(accountName) end,60000*5,1,accountName) بتوفيق Link to comment
SAM!! Posted July 1, 2018 Author Share Posted July 1, 2018 Rakan# ممكن تسويلي تايمر اسبوع لاني سويتة وماظبط Link to comment
Rakan# Posted July 1, 2018 Share Posted July 1, 2018 13 minutes ago, SAM!! said: Rakan# ممكن تسويلي تايمر اسبوع لاني سويتة وماظبط يخوي استعمل @ تبيه تايمر يعني لو طفى المود يختفي ؟ Link to comment
SAM!! Posted July 1, 2018 Author Share Posted July 1, 2018 Rakan# لا لا مابية لو طفي المود يختفي addEvent("Ranks:Buy1", true) addEventHandler("Ranks:Buy1", root, function() local Le3bA = getPlayerMoney(source) if Le3bA >= 250000 then local account = getPlayerAccount(source) if account and not isGuestAccount(account) then local accountName = getAccountName(account) if not isObjectInACLGroup("user."..accountName, aclGetGroup("VIP")) then takePlayerMoney(source, 250000) aclGroupAddObject(aclGetGroup("VIP"), "user."..accountName) outputChatBox( "Account "..accountName.." succesfully added to the VIP group", source) outputChatBox("You're in VIP group Now.", source, 255, 0, 0, true) setTimer( function() aclGroupRemoveObject(aclGetGroup("VIP"),"user."..accountName) setTimer( function(accountName) end,60000*5,1,accountName) else outputChatBox("You're already in VIP group.", source, 255, 0, 0, true) end else outputChatBox("You're not logged in.", source, 255, 0, 0, true) end else outputChatBox("You don't have $250000 to buy VIP", source, 255, 0, 0, true) end end ) صح هيك قصدك؟ Link to comment
Rakan# Posted July 2, 2018 Share Posted July 2, 2018 ماجاني تنبيه لانك تنسخ وتلصق ! المهم خطا امسح سطر 14 وحط مكانه اللي بسطر 16 Link to comment
SAM!! Posted July 2, 2018 Author Share Posted July 2, 2018 addEvent("Ranks:Buy1", true) addEventHandler("Ranks:Buy1", root, function() local Le3bA = getPlayerMoney(source) if Le3bA >= 250000 then local account = getPlayerAccount(source) if account and not isGuestAccount(account) then local accountName = getAccountName(account) if not isObjectInACLGroup("user."..accountName, aclGetGroup("VIP")) then takePlayerMoney(source, 250000) aclGroupAddObject(aclGetGroup("VIP"), "user."..accountName) outputChatBox( "Account "..accountName.." succesfully added to the VIP group", source) outputChatBox("You're in VIP group Now.", source, 255, 0, 0, true) setTimer( function(accountName) aclGroupRemoveObject(aclGetGroup("VIP"),"user."..accountName) end,60000*5,1,accountName) else outputChatBox("You're already in VIP group.", source, 255, 0, 0, true) end else outputChatBox("You're not logged in.", source, 255, 0, 0, true) end else outputChatBox("You don't have $250000 to buy VIP", source, 255, 0, 0, true) end end ) @Rakan# Link to comment
[T]|O|[P]George Posted July 5, 2018 Share Posted July 5, 2018 On 7/2/2018 at 17:39, SAM!! said: addEvent("Ranks:Buy1", true) addEventHandler("Ranks:Buy1", root, function() local Le3bA = getPlayerMoney(source) if Le3bA >= 250000 then local account = getPlayerAccount(source) if account and not isGuestAccount(account) then local accountName = getAccountName(account) if not isObjectInACLGroup("user."..accountName, aclGetGroup("VIP")) then takePlayerMoney(source, 250000) aclGroupAddObject(aclGetGroup("VIP"), "user."..accountName) outputChatBox( "Account "..accountName.." succesfully added to the VIP group", source) outputChatBox("You're in VIP group Now.", source, 255, 0, 0, true) setTimer( function(accountName) aclGroupRemoveObject(aclGetGroup("VIP"),"user."..accountName) end,60000*5,1) ----- else outputChatBox("You're already in VIP group.", source, 255, 0, 0, true) end else outputChatBox("You're not logged in.", source, 255, 0, 0, true) end else outputChatBox("You don't have $250000 to buy VIP", source, 255, 0, 0, true) end end ) في السطر ال16 احسها غلط؟ accountName مدري لو انا غلط او لا بس 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