Jump to content

Recommended Posts

السلام عليكم 

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

و برضو تطلع  client   انا احطه في ملف 

ها هو الكود (شكرا

  1. buttons = {
  2.     ['F1'] = true,
  3.     ['F3'] = true,
  4.     ['b'] = true,
  5.     ['F4'] = true,
  6.     ['F5'] = true,
  7.     ['F6'] = true,
  8.     ['F7'] = true,
  9.     ['F9'] = true,
  10.     ['p'] = true,
  11.     ['h'] = true,
  12. }
  13.  
  14. addEventHandler( 'onClientKey',root,
  15.     function ( Player, button, prees )
  16.         if not getPlayerSerial ( Player ) == 'A8DACEB58D5778E96830D652B8950384' then
  17.             if prees and getElementDimension ( localPlayer ) == 30 then
  18.                 if buttons [ button ] then
  19.                     outputChatBox ( 'غير مصرح لك بفتح اللوحة',255,0,0 )
  20.                     cancelEvent ( )
  21.                 end
  22.             end
  23.         outputChatBox ( 'تم فتح اللوحة',0,255,0 )
  24.         end
  25.     end
  26. )
Link to comment
11 hours ago, 3laa33 said:

ماينفع getPlayerSerial
هاده سيرفر ماينفع تحطها ف الكلينت

ينفع ينحط في الكلينت لاكن بدون ارقمنت

جررب

buttons = {
    ['F1'] = true,
    ['F3'] = true,
    ['b'] = true,
    ['F4'] = true,
    ['F5'] = true,
    ['F6'] = true,
    ['F7'] = true,
    ['F9'] = true,
    ['p'] = true,
    ['h'] = true,
}
 
addEventHandler( 'onClientKey',root,
    function ( Player, button, prees )
        if not getPlayerSerial () == 'A8DACEB58D5778E96830D652B8950384' then
            if prees and getElementDimension ( localPlayer ) == 30 then
                if buttons [ button ] then
                    outputChatBox ( 'غير مصرح لك بفتح اللوحة',255,0,0 )
                    cancelEvent ( )
                end
            end
        outputChatBox ( 'تم فتح اللوحة',0,255,0 )
        end
    end
)

 

Link to comment

برضو لا :sad10:

buttons = {
    ['F1'] = true,
    ['F3'] = true,
    ['b'] = true,
    ['F4'] = true,
    ['F5'] = true,
    ['F6'] = true,
    ['F7'] = true,
    ['F9'] = true,
    ['p'] = true,
    ['h'] = true,
}
 
addEventHandler( 'onClientKey',root,
    function ( Player, button, prees )
        if not getPlayerSerial () == 'A8DACEB58D5778E96830D652B8950384' then
            if prees and getElementDimension ( localPlayer ) == 30 then
                if buttons [ button ] then
                    outputChatBox ( 'غير مصرح لك بفتح اللوحة',255,0,0 )
                    cancelEvent ( )
                end
            end
        outputChatBox ( 'تم فتح اللوحة',0,255,0 )
        end
    end
)

addEventHandler("onClientRender",getRootElement(),function()
if tostring(getElementData(getLocalPlayer(),"onCrossMap")) == "yes" then
setWorldSpecialPropertyEnabled("aircars", false)
setWorldSpecialPropertyEnabled("extrajump", false)
setWorldSpecialPropertyEnabled("hovercars", false)

end
end)

ها هو الكلنت

 

Link to comment
addEventHandler ( "onClientKey", root,
	function ( key )
	
	if tostring(getElementData(getLocalPlayer(),"onCrossMap")) == "yes" then
		for i=1,4 do
		if key == "F"..i then
		cancelEvent ( )
		end
		end
		for i=6,9 do
		if key == "F"..i then
		cancelEvent ( )
		end
		end
	end
	end
)

كود انا مسويه قديم ,
حطه في الكلاينت

أو

addEventHandler ( "onClientKey", root,
	function ( key )
	if tostring(getElementData(getLocalPlayer(),"onCrossMap")) == "yes" then
          if key:find("F") or key == "p" or key == "b" then
              cancelEvent ( )
          end
	end
	end
)

 

Edited by iMr.WiFi..!
  • Like 1
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...