Jump to content

طلب فنكشنات


Recommended Posts

Client :

addEvent ( "SetData", true ) 
addEventHandler ( "SetData", root, function ( ) 
 if ( isTransferBoxActive ( ) == true ) then 
  setElementData ( source, "CannotChat", "ON" ) 
 else 
  setElementData ( source, "CannotChat", "OFF" ) 
 end 
end ) 

Server :

addEventHandler ( "onResourceStart", root, function ( ) 
 for k, v in ipairs ( getElementsByType ( "player" ) ) do 
  triggerClientEvent ( v, "SetData", v ) 
 end 
end ) 
  
addEventHandler ( "onPlayerChat", root, function ( ) 
 if ( getElementData ( source, "CannotChat" ) == "ON" and getElementData ( source, "CannotChat" ) ~= "OFF" ) then 
  cancelEvent ( ) 
 end 
end ) 
Link to comment

Client :

addEvent ( "SetData", true )
addEventHandler ( "SetData", root, function ( )
 if ( isTransferBoxActive ( ) == true ) then
  setElementData ( source, "CannotChat", "ON" )
 else
  setElementData ( source, "CannotChat", "OFF" )
 end
end )

Server :

addEventHandler ( "onResourceStart", root, function ( )
 for k, v in ipairs ( getElementsByType ( "player" ) ) do
  triggerClientEvent ( v, "SetData", v )
 end
end )
 
addEventHandler ( "onPlayerChat", root, function ( )
 if ( getElementData ( source, "CannotChat" ) == "ON" and getElementData ( source, "CannotChat" ) ~= "OFF" ) then
  cancelEvent ( )
 end
end )

طلبت فنكشنات , + هذي الاكواد تخليه ما يقدر يتكلم ابدا وانا ابيه بعد ما يسجل يقدر يتكلم

Link to comment

@ #,+( _xiRoc[K]; > : طريقتكـ خطا .

@ Strong : استخدم ذا الكود ..

Client Side

addEventHandler( "onClientResourceStart", resourceRoot, function(  ) 
  TimerDownload = setTimer( function(   ) 
   if ( isTransferBoxActive (    ) ~= true ) then 
         setElementData( localPlayer, "download", false ) 
         killTimer( TimerDownload ) 
      end 
   end, 10000, 0 ) 
end ) 

Server Side

addEventHandler( "onPlayerJoin", root, function(  ) 
     setElementData( source, "download", "Download" ) 
end ) 
  
addEventHandler ( "onPlayerChat", root, function ( ) 
 if ( getElementData( source, "download" ) == "Download" ) then 
          cancelEvent ( ) 
    end 
end ) 
Link to comment
@ #,+( _xiRoc[K]; > : طريقتكـ خطا .

@ Strong : استخدم ذا الكود ..

Client Side

addEventHandler( "onClientResourceStart", resourceRoot, function(  ) 
  TimerDownload = setTimer( function(   ) 
   if ( isTransferBoxActive (    ) ~= true ) then 
         setElementData( localPlayer, "download", false ) 
         killTimer( TimerDownload ) 
      end 
   end, 10000, 0 ) 
end ) 

Server Side

addEventHandler( "onPlayerJoin", root, function(  ) 
     setElementData( source, "download", "Download" ) 
end ) 
  
addEventHandler ( "onPlayerChat", root, function ( ) 
 if ( getElementData( source, "download" ) == "Download" ) then 
          cancelEvent ( ) 
    end 
end ) 

ما تغير شي , يقدر يكتب عادي

Link to comment
ممكن تعمل أول لما لاعب يكتب يتحقق ان كان مسجل او لا

لو لآ يكنسل الحدث وخلاص لية وجع القلب هذه :)

فكرة حلوة ,

مشكورين زاحف وبرستيج , والشسمه BigJoe

العفو دائما انا اختصر الطريق الصعب فيصبح سهل :P

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