Jump to content

طلب كود جاهز او فنكشات


Recommended Posts

:mrgreen::mrgreen: اتعبناكم بالطلبات

لكن هذي قفلة معي

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

وحاط زرين

ابغغى وظيفة للزر الاول

اقدر ادخل في قروب اسل

police

الزر اثاني

اطلع من قروب اسل

police

Link to comment

سويته لكـ مختصر اكثر بزر واحد يشيله او يرجعه

Client Side !

addEventHandler( "onClientGUIClick", resourceRoot, function(   ) 
  if ( source == button ) then 
    if ( guiGridListGetSelectedItem ( TheGrid ) ~= -1 ) then 
             local select = guiGridListGetItemText ( TheGrid, guiGridListGetSelectedItem ( TheGrid ), 1 ) 
             triggerServerEvent( "addOrRemoveGroup", localPlayer, select ) 
           end 
      end 
end ) 

Server Side !

local GroupName = "Police" 
  
  
addEvent( "addOrRemoveGroup", true ) 
addEventHandler( "addOrRemoveGroup", root, function( select ) 
  local account = getAccountName( getPlayerAccount( select ) ) 
  if not ( isObjectInACLGroup("user."..account, aclGetGroup( GroupName ) ) ) then 
      aclGroupAddObject ( aclGetGroup( GroupName ), "user."..account) 
  else 
      aclGroupRemoveObject ( aclGetGroup( GroupName ), "user."..account) 
      end 
end ) 

Link to comment
سويته لكـ مختصر اكثر بزر واحد يشيله او يرجعه

Client Side !

addEventHandler( "onClientGUIClick", resourceRoot, function(   ) 
  if ( source == button ) then 
    if ( guiGridListGetSelectedItem ( TheGrid ) ~= -1 ) then 
             local select = guiGridListGetItemText ( TheGrid, guiGridListGetSelectedItem ( TheGrid ), 1 ) 
             triggerServerEvent( "addOrRemoveGroup", localPlayer, select ) 
           end 
      end 
end ) 

Server Side !

local GroupName = "Police" 
  
  
addEvent( "addOrRemoveGroup", true ) 
addEventHandler( "addOrRemoveGroup", root, function( select ) 
  local account = getAccountName( getPlayerAccount( select ) ) 
  if not ( isObjectInACLGroup("user."..account, aclGetGroup( GroupName ) ) ) then 
      aclGroupAddObject ( aclGetGroup( GroupName ), "user."..account) 
  else 
      aclGroupRemoveObject ( aclGetGroup( GroupName ), "user."..account) 
      end 
end ) 

بالنسبة لجانب الخادم

* Server Side

يجب التحقق من أن الحساب حساب فعلي وليس حساب زآئر ..

local GroupName = "Police" 
  
  
addEvent( "addOrRemoveGroup", true ) 
addEventHandler( "addOrRemoveGroup", root, function( select ) 
  local account = getAccountName( getPlayerAccount( select ) ) 
  if isGuestAccount ( account ) then return false end 
  if not ( isObjectInACLGroup("user."..account, aclGetGroup( GroupName ) ) ) then 
      aclGroupAddObject ( aclGetGroup( GroupName ), "user."..account) 
  else 
      aclGroupRemoveObject ( aclGetGroup( GroupName ), "user."..account) 
      end 
end ) 

يجب أن يكون الكود كـ هذا أعلاهـ ..

Link to comment

هذأ كود بدلأ من التايمر من باب تخفيف اللاق يوم يسجل اللاعب يتحقق انه ب قروب الشرطة ولو هو بـ تيم 77 يشيله من التيم ذذ

addEventHandler( "onPlayerLogin", root, function ( _,acc ) 
  if ( isObjectInACLGroup("user."..acc, aclGetGroup( "police" ) ) ) then 
   if ( getPlayerTeam( source ) and getPlayerTeam( source ) == getTeamFromName( "77" ) ) then 
            setPlayerTeam( source, nil ) 
         end 
     end 
end ) 
Link to comment
لا قصدي الحين الكود يتحقق ان خو فالتيم ولالا

ان كان فالتيم يطلعه من التيم

لكن اذا تحقق طلع ماهو فالتيم

بعدين اللاعب حاول يدخل تيم

77

يقدر ؟؟

يقدر بـ مجرد ما يخرج اللاعب من حسابه مُثلأ .. بس يوم يدخل بحسابه وكان موجود بـ التيم يخرجه

Link to comment

اشرح لك انا القيم مود عندي يختار لعيبة

يعني تيمات

شرطي مسعف

مجرم

المجرم اسمة التيم حقة 77

اذا دخل بحسابة اوك

login

جاء يبغى يختار شخصية مجرم مايقدر

لانه بقروب اسل

police

Link to comment
local GroupName = "123" 
addEvent( "addOrRemoveGroup", true ) 
addEventHandler( "addOrRemoveGroup", root, function( select ) 
  local account = getAccountName( getPlayerAccount( select ) ) 
  if isGuestAccount ( account ) then return false end 
  if not ( isObjectInACLGroup("user."..account, aclGetGroup( 123 ) ) ) then 
      aclGroupAddObject ( aclGetGroup( 123 ), "user."..account) 
  else 
      aclGroupRemoveObject ( aclGetGroup( 123 ), "user."..account) 
      end 
end ) 

addEventHandler( "onClientGUIClick", resourceRoot, function(   ) 
  if ( source == GUIEditor_Button[1] ) then 
 local sel = guiGridListGetSelectedItem(grid) 
            local text = guiGridListGetItemText(grid,sel,1) 
            local player = getPlayerFromName(text) 
             triggerServerEvent( "addOrRemoveGroup", localPlayer, select ) 
           end 
      end 
end ) 

اش الخطا ؟؟؟ :?

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...