Jump to content

For Donators only <, Help


RdX

Recommended Posts

السلام عليكم ورحمة الله وبركاته

عندي window

الي ابيه انو محد يقدر يفتح الى قروب معين اسمه donators

و الي مو في دونيتور يقوله

[Donators] Sorry ur are not in Donators

اسم الويندو

win = guiCreateStaticImage(52,52,500,400, "manager.png", false ) -- windows donators

Link to comment
bindKey ("F1", "down", function ( ) 
if getElementData ( localPlayer, "gang" ) == "donators" then 
guiSetVisible ( win, true ) 
showCursor ( true ) 
else  
guiSetVisible ( win, false ) 
showCursor (false ) 
outputChatBox ("[Donators] Sorry ur are not in Donators ", 255, 0, 0 ) 
end 
end ) 

Link to comment
يب انا ابي انه محد يقدر يفتح القائمه الى الي في قروب

donators < acl

السلام عليكم

ملف سيرفر

addEventHandler ( 'onPlayerLogin', getRootElement ( ), 
    function ( _,acc) 
     local accName = getAccountName (acc)  
     if isObjectInACLGroup ("user."..accName, aclGetGroup ( "donators" ) ) then 
        setElementData ( source, "grp","donators") 
    end 
    end 
) 

ملف كلنت

  
bindKey ("F1", "down", function ( ) 
if getElementData ( localPlayer, "grp" ) and getElementData ( localPlayer, "grp" ) == "donators" then 
guiSetVisible ( win, not guiGetVisible(win) ) 
showCursor ( not guiGetVisible(win) ) 
else 
outputChatBox ("[Donators] Sorry ur are not in Donators ", 255, 0, 0 ) 
end 
end ) 
Link to comment
يب انا ابي انه محد يقدر يفتح القائمه الى الي في قروب

donators < acl

السلام عليكم

ملف سيرفر

addEventHandler ( 'onPlayerLogin', getRootElement ( ), 
    function ( _,acc) 
     local accName = getAccountName (acc)  
     if isObjectInACLGroup ("user."..accName, aclGetGroup ( "donators" ) ) then 
        setElementData ( source, "grp","donators") 
    end 
    end 
) 

ملف كلنت

  
bindKey ("F1", "down", function ( ) 
if getElementData ( localPlayer, "grp" ) and getElementData ( localPlayer, "grp" ) == "donators" then 
guiSetVisible ( win, not guiGetVisible(win) ) 
showCursor ( not guiGetVisible(win) ) 
else 
outputChatBox ("[Donators] Sorry ur are not in Donators ", 255, 0, 0 ) 
end 
end ) 

فيه عندكـ خطأ بسيط بسطر 5 بجانب كلاينت

showCursor ( not guiGetVisible(win) ) 

: التصحيح

showCursor ( guiGetVisible ( win ) ) 

Link to comment
يب انا ابي انه محد يقدر يفتح القائمه الى الي في قروب

donators < acl

السلام عليكم

ملف سيرفر

addEventHandler ( 'onPlayerLogin', getRootElement ( ), 
    function ( _,acc) 
     local accName = getAccountName (acc)  
     if isObjectInACLGroup ("user."..accName, aclGetGroup ( "donators" ) ) then 
        setElementData ( source, "grp","donators") 
    end 
    end 
) 

ملف كلنت

  
bindKey ("F1", "down", function ( ) 
if getElementData ( localPlayer, "grp" ) and getElementData ( localPlayer, "grp" ) == "donators" then 
guiSetVisible ( win, not guiGetVisible(win) ) 
showCursor ( not guiGetVisible(win) ) 
else 
outputChatBox ("[Donators] Sorry ur are not in Donators ", 255, 0, 0 ) 
end 
end ) 

الكود اذا الاعب سجل دخوله وهو بقروب donators راح يسويله الداتا

لاكن اذا شغل المود مراح تفتح اللوحة

وابضا اذا سجل الخروج راح تبقى الداتا

يبيله تحققات كثير

Link to comment
يب انا ابي انه محد يقدر يفتح القائمه الى الي في قروب

donators < acl

السلام عليكم

ملف سيرفر

addEventHandler ( 'onPlayerLogin', getRootElement ( ), 
    function ( _,acc) 
     local accName = getAccountName (acc)  
     if isObjectInACLGroup ("user."..accName, aclGetGroup ( "donators" ) ) then 
        setElementData ( source, "grp","donators") 
    end 
    end 
) 

ملف كلنت

  
bindKey ("F1", "down", function ( ) 
if getElementData ( localPlayer, "grp" ) and getElementData ( localPlayer, "grp" ) == "donators" then 
guiSetVisible ( win, not guiGetVisible(win) ) 
showCursor ( not guiGetVisible(win) ) 
else 
outputChatBox ("[Donators] Sorry ur are not in Donators ", 255, 0, 0 ) 
end 
end ) 

الكود اذا الاعب سجل دخوله وهو بقروب donators راح يسويله الداتا

لاكن اذا شغل المود مراح تفتح اللوحة

وابضا اذا سجل الخروج راح تبقى الداتا

يبيله تحققات كذير

لو يبي يسويه مثل ماتقول انت رح يسبب لاق للسيرفر، بحيث كل مايبي يفتح اللوحة رح يسوي تريقر للسيرفر ثم تريقر للكلاينت

فلنفرض لو جلس اللاعب يكرر بالفتح والإغلاق وهكذا .. رح يسبب لاق شديد بالسيرفر

'donators' ويجلب فيه اللاعبين الي بقروب onResourceStart أنا من وجهة نظري أشوف طريقته أفضل من ناحية اللاق، لكن ناقصه يسوي حدث

. بحيث يحذف الداتا من اللاعب عند تسجيل خروجه onPlayerLogout بالإضافة إلى حدث / 'donators' ويعطهم الداتا حقت

Link to comment

انتم مو فاهمين عليه زين .. وكل اكوادكم غير صحيحة

بجانب سيرفر ويوم يجي يفتح النافذة تتحق من الاكاونت داتا حقه وتسوي تريقر لجانب كلنت وتفتح النافذة ذذ bindKey ي اخ سوي

Link to comment
local Key = "F3" 
local Window = Window 
  
function ZA7F() 
    triggerServerEvent("donators",localPlayer) 
end 
bindKey(Key,"down",ZA7F) 
  
addEvent("Open",true) 
addEventHandler("Open",root, 
    function () 
          if ( guiGetVisible(Window) == true ) then 
          guiSetVisible(Window,false) 
          showCursor(false) 
    else 
          guiSetVisible(Window,true) 
          showCursor(true) 
        end 
    end 
) 

  
addEvent("donators",true) 
addEventHandler("donators",root, 
    function () 
      local Group = "donators" 
      if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)),aclGetGroup(Group)) then 
            triggerClientEvent(source,"Open",source) 
        end 
    end 
) 

[/b]

Link to comment
local Key = "F3" 
local Window = Window 
  
function ZA7F() 
    triggerServerEvent("donators",localPlayer) 
end 
bindKey(Key,"down",ZA7F) 
  
addEvent("Open",true) 
addEventHandler("Open",root, 
    function () 
          if ( guiGetVisible(Window) == true ) then 
          guiSetVisible(Window,false) 
          showCursor(false) 
    else 
          guiSetVisible(Window,true) 
          showCursor(true) 
        end 
    end 
) 

  
addEvent("donators",true) 
addEventHandler("donators",root, 
    function () 
      local Group = "donators" 
      if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)),aclGetGroup(Group)) then 
            triggerClientEvent(source,"Open",source) 
        end 
    end 
) 

[/b]

لو يبي يسويه مثل ماتقول انت رح يسبب لاق للسيرفر، بحيث كل مايبي يفتح اللوحة رح يسوي تريقر للسيرفر ثم تريقر للكلاينت

فلنفرض لو جلس اللاعب يكرر بالفتح والإغلاق وهكذا .. رح يسبب لاق شديد بالسيرفر

'donators' ويجلب فيه اللاعبين الي بقروب onResourceStart أنا من وجهة نظري أشوف طريقته أفضل من ناحية اللاق، لكن ناقصه يسوي حدث

. بحيث يحذف الداتا من اللاعب عند تسجيل خروجه onPlayerLogout بالإضافة إلى حدث / 'donators' ويعطهم الداتا حقت

tumblr_mb3ncwok2s1rsju0o.gif

Link to comment
local Key = "F3" 
local Window = Window 
  
function ZA7F() 
    triggerServerEvent("donators",localPlayer) 
end 
bindKey(Key,"down",ZA7F) 
  
addEvent("Open",true) 
addEventHandler("Open",root, 
    function () 
          if ( guiGetVisible(Window) == true ) then 
          guiSetVisible(Window,false) 
          showCursor(false) 
    else 
          guiSetVisible(Window,true) 
          showCursor(true) 
        end 
    end 
) 

  
addEvent("donators",true) 
addEventHandler("donators",root, 
    function () 
      local Group = "donators" 
      if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)),aclGetGroup(Group)) then 
            triggerClientEvent(source,"Open",source) 
        end 
    end 
) 

[/b]

لو يبي يسويه مثل ماتقول انت رح يسبب لاق للسيرفر، بحيث كل مايبي يفتح اللوحة رح يسوي تريقر للسيرفر ثم تريقر للكلاينت

فلنفرض لو جلس اللاعب يكرر بالفتح والإغلاق وهكذا .. رح يسبب لاق شديد بالسيرفر

'donators' ويجلب فيه اللاعبين الي بقروب onResourceStart أنا من وجهة نظري أشوف طريقته أفضل من ناحية اللاق، لكن ناقصه يسوي حدث

. بحيث يحذف الداتا من اللاعب عند تسجيل خروجه onPlayerLogout بالإضافة إلى حدث / 'donators' ويعطهم الداتا حقت

tumblr_mb3ncwok2s1rsju0o.gif

ماقريت الردود ذذ

Link to comment
اللاق اعتقد بيتسبب للاعب نفسه .

وثانيا ما في لا مخرج شات ولا شي .. هو تحقق واحد لو انه بالقروب يرسل تريقر ذذ

triggerServerEvent:

This is the primary means of passing information between the client and the server.

Events are sent reliably, so the server will receive them, but there may be (but shouldn't be) a significant delay before they are received. You should take this into account when using them.

Keep in mind the bandwidth issues when using events - don't pass a large list of arguments unless you really need to. It is marginally more efficient to pass one large event than two smaller ones.

Link to comment
فرضاً السيرفر فيه 50+ لاعب ونقول 50% من الاعبين استخدموها 25 لاعب يفك اللوحة كل دقيقتين ويقفلها شوف كيف الاق .

صحيح , كلامكم صحيح

بس اللي اقصده من كلامي انه ما في احد بيجلس يضغط بالزر مدام ما في مخرج شات ويوم يضغطته ما يصير شي .

بس ما تدري ع الناس خير شر . ذذ

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...