Jump to content

طلب كيفية جعل زر لتيم معين


Recommended Posts

Client

addEventHandler("onClientResourceStart", resourceRoot, 
function() 
triggerServerEvent("Cheack", getLocalPlayer()) 
end) 
  
addEvent("No", true) 
addEventHandler("No", root, 
function() 
guiSetEnabled( theButton, false ) 
end 
) 

server

addEvent("Cheack", true) 
addEventHandler("Cheack", root, 
function() 
if ( not isGuestAccount ( getPlayerAccount ( source ) ) ) then 
if ( getPlayerTeam( source ) ~= getTeamFromName( "theTeam" ) ) then 
triggerClientEvent( source, "No", source ) 
      end 
   end 
end 
) 

Link to comment
function Cheack() 
if ( getPlayerTeam == getTeamFromName( "theTeam" ) ) then 
guiSetEnabled ( theButton, true ) 
   else 
guiSetEnabled ( theButton, false ) 
   end 
end 
addEventHandler("onClientResourceStart" resourceRoot, Cheack) 

كيف لمن يشتغل المود

يعني الاعب كيف رح ينظم لـ تيم معين والمود توه اشتغل

لازم يضغط لوحة او يكتب كلمة او اي شي ..

Link to comment

guiSetEnabled تقدر تسويه بدون استخدام ..

-- Client Side !

addEventHandler ( "onClientGUIClick", اسم الزر, 
    function ( ) 
        if ( getPlayerTeam ( localPlayer ) ) and ( getTeamName ( getPlayerTeam ( localPlayer ) ) == "NameTeam" ) then 
            -- Your Code ! 
        else 
            outputChatBox ( "You Must Be In Team 'NameTeam' !", 210, 0, 0, true ) 
        end 
    end, 
false ) 

NameTeam = اسم التيم الي تبي الزر خاص له وبس #

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