ivor Posted August 30, 2017 Share Posted August 30, 2017 السلام عليكم . انا مبرمج لوحة سحب عشوائي ع اشياء مثل فيب وماغير فـ طلع لي مشكلة بعد ماخلصتها وماعرفت احلها انه اذا جاب فيب من السحب يجي لكله مب له هذا كود الخاص بالفيب --server only elseif Table[3] == "VIP2" then for _,player in ipairs ( getElementsByType ( "player" ) ) do if not ( isObjectInACLGroup ( "user."..getAccountName ( getPlayerAccount ( player )), aclGetGroup ( "VIP2" ) ) ) then aclGroupAddObject(aclGetGroup("VIP2"), "user."..getAccountName ( getPlayerAccount ( player ) )) setElementData(player, "isPlayerVIP", source,Table[2],true) if ( isObjectInACLGroup ( "user."..getAccountName ( getPlayerAccount ( player ) ), aclGetGroup ( "VIP2" ) ) ) then setElementData(player, "isPlayerVIP", true) وإتمني الحل بأسرع وقت . Link to comment
Omoi Posted August 30, 2017 Share Posted August 30, 2017 17 minutes ago, #!Error.xD said: السلام عليكم . انا مبرمج لوحة سحب عشوائي ع اشياء مثل فيب وماغير فـ طلع لي مشكلة بعد ماخلصتها وماعرفت احلها انه اذا جاب فيب من السحب يجي لكله مب له هذا كود الخاص بالفيب --server only elseif Table[3] == "VIP2" then for _,player in ipairs ( getElementsByType ( "player" ) ) do if not ( isObjectInACLGroup ( "user."..getAccountName ( getPlayerAccount ( player )), aclGetGroup ( "VIP2" ) ) ) then aclGroupAddObject(aclGetGroup("VIP2"), "user."..getAccountName ( getPlayerAccount ( player ) )) setElementData(player, "isPlayerVIP", source,Table[2],true) if ( isObjectInACLGroup ( "user."..getAccountName ( getPlayerAccount ( player ) ), aclGetGroup ( "VIP2" ) ) ) then setElementData(player, "isPlayerVIP", true) وإتمني الحل بأسرع وقت . الالمنت داتا هذا ماله دخل ابدا ,, الداتا ذا تسوي تحقق فقط لو معه او لا وتستعمله لو مثلا بـ اللابل لو معك فيب يصير Active بـ إستعمال الداتا فـ الداتا هنا مالها لزوم Link to comment
ivor Posted August 30, 2017 Author Share Posted August 30, 2017 2 hours ago, Omoi said: الالمنت داتا هذا ماله دخل ابدا ,, الداتا ذا تسوي تحقق فقط لو معه او لا وتستعمله لو مثلا بـ اللابل لو معك فيب يصير Active بـ إستعمال الداتا فـ الداتا هنا مالها لزوم موجود فالكود الي امامك 2 داتا . كلامك ماحدد اي داتا بالظبط ! Link to comment
SycroX Posted August 30, 2017 Share Posted August 30, 2017 6 hours ago, #!Error.xD said: السلام عليكم . انا مبرمج لوحة سحب عشوائي ع اشياء مثل فيب وماغير فـ طلع لي مشكلة بعد ماخلصتها وماعرفت احلها انه اذا جاب فيب من السحب يجي لكله مب له هذا كود الخاص بالفيب --server only elseif Table[3] == "VIP2" then for _,player in ipairs ( getElementsByType ( "player" ) ) do if not ( isObjectInACLGroup ( "user."..getAccountName ( getPlayerAccount ( player )), aclGetGroup ( "VIP2" ) ) ) then aclGroupAddObject(aclGetGroup("VIP2"), "user."..getAccountName ( getPlayerAccount ( player ) )) setElementData(player, "isPlayerVIP", source,Table[2],true) if ( isObjectInACLGroup ( "user."..getAccountName ( getPlayerAccount ( player ) ), aclGetGroup ( "VIP2" ) ) ) then setElementData(player, "isPlayerVIP", true) وإتمني الحل بأسرع وقت . عايزنا ازاي نصدق انك مبرمجها بنفسك و انت اصلا بتطلب طلب ذي ده راجع كودك و قولي كدا وش فايده اللوب ما دام انت ما تباه للكل ؟ 1 2 Link to comment
ivor Posted August 30, 2017 Author Share Posted August 30, 2017 9 hours ago, #BrosS said: "مافهمت "يجي لكله يعني المود برمجته كلها صح بس المشكلة الموجوده انه لما يجي له هديه فيب تكون للجميع مب للاعب الي طلع له الفيب 8 hours ago, #x1AhMeD,-09 said: عايزنا ازاي نصدق انك مبرمجها بنفسك و انت اصلا بتطلب طلب ذي ده راجع كودك و قولي كدا وش فايده اللوب ما دام انت ما تباه للكل ؟ انت راجعت الموضوع صح ؟ Link to comment
#BrosS Posted August 30, 2017 Share Posted August 30, 2017 Just now, #!Error.xD said: يعني المود برمجته كلها صح بس المشكلة الموجوده انه لما يجي له هديه فيب تكون للجميع مب للاعب الي طلع له الفيب انت راجعت الموضوع صح ؟ لأنك حاطط لوب يجيب اللاعبين ;-; Link to comment
ivor Posted August 30, 2017 Author Share Posted August 30, 2017 1 minute ago, #BrosS said: لأنك حاطط لوب يجيب اللاعبين ;-; حاطه عشان السكربت يشتغل بالكامل اذا اشيله يخرب سكربت الفيب ومايعطيه شي بس وهمي :[ وانا حاطه ' player ' مب 'players' Link to comment
#BrosS Posted August 30, 2017 Share Posted August 30, 2017 Just now, #!Error.xD said: حاطه عشان السكربت يشتغل بالكامل اذا اشيله يخرب سكربت الفيب ومايعطيه شي بس وهمي :[ وانا حاطه ' player ' مب 'players' .______________________________________________________________________. مايهم اسم القيمة اللي تحطها باللوب Link to comment
^iiEcoo'x_) Posted August 30, 2017 Share Posted August 30, 2017 --server only elseif Table[3] == "VIP2" then local player = getRandomPlayer ( ) if isGuestAccount ( getPlayerAccount ( player ) ) then return end if not ( isObjectInACLGroup ( "user."..getAccountName ( getPlayerAccount ( player )), aclGetGroup ( "VIP2" ) ) ) then aclGroupAddObject(aclGetGroup("VIP2"), "user."..getAccountName ( getPlayerAccount ( player ) )) setElementData(player, "isPlayerVIP", source,Table[2],true) if ( isObjectInACLGroup ( "user."..getAccountName ( getPlayerAccount ( player ) ), aclGetGroup ( "VIP2" ) ) ) then setElementData(player, "isPlayerVIP", true) Link to comment
ivor Posted August 30, 2017 Author Share Posted August 30, 2017 1 hour ago, #_iMr.[E]coo said: --server onlyelseif Table[3] == "VIP2" thenlocal player = getRandomPlayer ( )if isGuestAccount ( getPlayerAccount ( player ) ) then return end if not ( isObjectInACLGroup ( "user."..getAccountName ( getPlayerAccount ( player )), aclGetGroup ( "VIP2" ) ) ) then aclGroupAddObject(aclGetGroup("VIP2"), "user."..getAccountName ( getPlayerAccount ( player ) )) setElementData(player, "isPlayerVIP", source,Table[2],true) if ( isObjectInACLGroup ( "user."..getAccountName ( getPlayerAccount ( player ) ), aclGetGroup ( "VIP2" ) ) ) then setElementData(player, "isPlayerVIP", true) دي بق ERROR : Loading script failed : Gift/server.lua:69 ')' expected (to close '(' at line 16) near 'end' الكود كامل : - addEvent("Gift",true) addEventHandler("Gift",root, function(Type,Table) if Type == "Gift" and source then local Account = getPlayerAccount(source) if not (isGuestAccount(Account) ) then if not (doesPlayerTokeGift(source) ) then if Table[3] == "Group" then local Group = getElementData(source,"Group") if Group then triggerEvent(source,"addPointToGroup",source,Group,Table[2]) end elseif Table[3] == "Diamond" then local GC = (getElementData(source,"Diamond") or 0 ) setElementData(source,"Diamond",GC + Table[2]) elseif Table[3] == "Money" then givePlayerMoney(source,Table[2]) elseif Table[3] == "xp" then local xp = (getElementData(source,"xp") or 0 ) setElementData(source,"xp",xp + Table[2]) elseif Table[3] == "Weapon" then if string.find(Table[1],"Rocket") then giveWeapon(source,36,Table[2],true) elseif string.find(Table[1],"Grenade") then giveWeapon(source,16,Table[2],true) end elseif Table[3] == "Launcher" then local Launcher = (getElementData(source,"Launcher") or 0 ) setElementData(source,"Launcher",Launcher + Table[2]) elseif Table[3] == "VIP2" then local player = getRandomPlayer ( ) if isGuestAccount ( getPlayerAccount ( player ) ) then return end if not ( isObjectInACLGroup ( "user."..getAccountName ( getPlayerAccount ( player )), aclGetGroup ( "VIP2" ) ) ) then aclGroupAddObject(aclGetGroup("VIP2"), "user."..getAccountName ( getPlayerAccount ( player ) )) setElementData(player, "isPlayerVIP", source,Table[2],true) if ( isObjectInACLGroup ( "user."..getAccountName ( getPlayerAccount ( player ) ), aclGetGroup ( "VIP2" ) ) ) then setElementData(player, "isPlayerVIP", true) end exports["guimessages"]:outputServer(source,"#00ACCF[Daily Gift] #00ff00 You have won #ffff00 "..Table[1].." #00ff00, Congratulations .",255,255,255) outputChatBox("#00ACCF[Daily Gift] #ffff00 "..getPlayerName(source).." #00ff00 had won #ffff00"..Table[1].." #00ff00.",root,255,255,255,true) table.insert(Gifts,{getAccountName(Account),2*60*60}) triggerClientEvent(source,"Gift",source,"Refresh",2*60*60) else exports["guimessages"]:outputServer(source,"#00ACCF[Daily Gift] #ff0000 you already have won a gift before",255,255,255) end end end end end end end) حطيت اكثر من 3 end بالاخر وبرضه يطلع هالمشكلة Link to comment
^iiEcoo'x_) Posted August 30, 2017 Share Posted August 30, 2017 addEvent("Gift",true) addEventHandler("Gift",root, function(Type,Table) if Type == "Gift" and source then local Account = getPlayerAccount(source) if not (isGuestAccount(Account) ) then if not (doesPlayerTokeGift(source) ) then if Table[3] == "Group" then local Group = getElementData(source,"Group") if Group then triggerEvent(source,"addPointToGroup",source,Group,Table[2]) end elseif Table[3] == "Diamond" then local GC = (getElementData(source,"Diamond") or 0 ) setElementData(source,"Diamond",GC + Table[2]) elseif Table[3] == "Money" then givePlayerMoney(source,Table[2]) elseif Table[3] == "xp" then local xp = (getElementData(source,"xp") or 0 ) setElementData(source,"xp",xp + Table[2]) elseif Table[3] == "Weapon" then if string.find(Table[1],"Rocket") then giveWeapon(source,36,Table[2],true) elseif string.find(Table[1],"Grenade") then giveWeapon(source,16,Table[2],true) end elseif Table[3] == "Launcher" then local Launcher = (getElementData(source,"Launcher") or 0 ) setElementData(source,"Launcher",Launcher + Table[2]) elseif Table[3] == "VIP2" then local player = getRandomPlayer ( ) if isGuestAccount ( getPlayerAccount ( player ) ) then return end if not ( isObjectInACLGroup ( "user."..getAccountName ( getPlayerAccount ( player )), aclGetGroup ( "VIP2" ) ) ) then aclGroupAddObject(aclGetGroup("VIP2"), "user."..getAccountName ( getPlayerAccount ( player ) )) setElementData(player, "isPlayerVIP", source,Table[2],true) if ( isObjectInACLGroup ( "user."..getAccountName ( getPlayerAccount ( player ) ), aclGetGroup ( "VIP2" ) ) ) then setElementData(player, "isPlayerVIP", true) end exports["guimessages"]:outputServer(source,"#00ACCF[Daily Gift] #00ff00 You have won #ffff00 "..Table[1].." #00ff00, Congratulations .",255,255,255) outputChatBox("#00ACCF[Daily Gift] #ffff00 "..getPlayerName(source).." #00ff00 had won #ffff00"..Table[1].." #00ff00.",root,255,255,255,true) table.insert(Gifts,{getAccountName(Account),2*60*60}) triggerClientEvent(source,"Gift",source,"Refresh",2*60*60) else exports["guimessages"]:outputServer(source,"#00ACCF[Daily Gift] #ff0000 you already have won a gift before",255,255,255) end end end end end -- type end -- function ) Link to comment
ivor Posted August 31, 2017 Author Share Posted August 31, 2017 كودك صح وتمام , بس فيه بق انه لما تفوت مده الفيب تبعه مايروح منه وهذا الي سويتها يقولي سطر 74 جانب 16 انا مب متأكد انه الكود صح او لا addEvent("Gift",true) addEventHandler("Gift",root, function(Type,Table) if Type == "Gift" and source then local Account = getPlayerAccount(source) if not (isGuestAccount(Account) ) then if not (doesPlayerTokeGift(source) ) then if Table[3] == "Group" then local Group = getElementData(source,"Group") if Group then triggerEvent(source,"addPointToGroup",source,Group,Table[2]) end elseif Table[3] == "Diamond" then local GC = (getElementData(source,"Diamond") or 0 ) setElementData(source,"Diamond",GC + Table[2]) elseif Table[3] == "Money" then givePlayerMoney(source,Table[2]) elseif Table[3] == "xp" then local xp = (getElementData(source,"xp") or 0 ) setElementData(source,"xp",xp + Table[2]) elseif Table[3] == "Weapon" then if string.find(Table[1],"Rocket") then giveWeapon(source,36,Table[2],true) elseif string.find(Table[1],"Grenade") then giveWeapon(source,16,Table[2],true) end elseif Table[3] == "Launcher" then local Launcher = (getElementData(source,"Launcher") or 0 ) setElementData(source,"Launcher",Launcher + Table[2]) elseif Table[3] == "VIP2" then local player = getRandomPlayer ( ) if isGuestAccount ( getPlayerAccount ( player ) ) then return end if not ( isObjectInACLGroup ( "user."..getAccountName ( getPlayerAccount ( player )), aclGetGroup ( "VIP2" ) ) ) then aclGroupAddObject(aclGetGroup("VIP2"), "user."..getAccountName ( getPlayerAccount ( player ) )) setElementData(player, "isPlayerVIP", source,Table[2],true) if ( isObjectInACLGroup ( "user."..getAccountName ( getPlayerAccount ( player ) ), aclGetGroup ( "VIP2" ) ) ) then setElementData(player, "isPlayerVIP", true) local player2 = getRandomPlayer ( ) == aclGroupListObjects(aclGetGroup( "VIP2" )) if isGuestAccount ( getPlayerAccount ( player2 ) ) then return end aclGroupRemoveObject(aclGetGroup("VIP2"), "user."..name,60*60) end exports["guimessages"]:outputServer(source,"#00ACCF[Daily Gift] #00ff00 You have won #ffff00 "..Table[1].." #00ff00, Congratulations .",255,255,255) outputChatBox("#00ACCF[Daily Gift] #ffff00 "..getPlayerName(source).." #00ff00 had won #ffff00"..Table[1].." #00ff00.",root,255,255,255,true) table.insert(Gifts,{getAccountName(Account),2*60*60}) triggerClientEvent(source,"Gift",source,"Refresh",2*60*60) else exports["guimessages"]:outputServer(source,"#00ACCF[Daily Gift] #ff0000 you already have won a gift before",255,255,255) end end end end end -- type end -- function ) 60*60 = مده تجريبيه انه بيروح مني او لا 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