MR.Nour Posted August 14, 2018 Share Posted August 14, 2018 السلام عليكم كيف اخلي الوحة تفتح لرتبة معينة لو سمحتو Link to comment
KillerX Posted August 14, 2018 Share Posted August 14, 2018 (edited) وعليكم السلام --server getPlayerAccount isObjectInACLGroup triggerClientEvent getAccountName --client addEvent addEventHandler guiSetVisible : مثال addCommandHandler('Check', function(player) if(isObjectInACLGroup('user.'..getAccountName(getPlayerAccount(player)),aclGetGroup('Test'))) then outputChatBox('تمتلك الرتبة',player,0,255,0,true) else outputChatBox('لا تمتلك الرتبة',player,255,0,0,true) end end ) Edited August 14, 2018 by KillerX Link to comment
^iiEcoo'x_) Posted August 14, 2018 Share Posted August 14, 2018 1 hour ago, KillerX said: وعليكم السلام --server getPlayerAccount isObjectInACLGroup triggerClientEvent getAccountName --client addEvent addEventHandler guiSetVisible : مثال addCommandHandler('Check', function(player) if(isObjectInACLGroup('user.'..getAccountName(getPlayerAccount(player)),aclGetGroup('Test'))) then outputChatBox('تمتلك الرتبة',player,0,255,0,true) else outputChatBox('لا تمتلك الرتبة',player,255,0,0,true) end end ) + isGuestAccount ! 1 Link to comment
MR.Nour Posted August 14, 2018 Author Share Posted August 14, 2018 Just now, KillerX said: وعليكم السلام --server getPlayerAccount isObjectInACLGroup triggerClientEvent getAccountName --client addEvent addEventHandler guiSetVisible : مثال addCommandHandler('Check', function(player) if(isObjectInACLGroup('user.'..getAccountName(getPlayerAccount(player)),aclGetGroup('Test'))) then outputChatBox('تمتلك الرتبة',player,0,255,0,true) else outputChatBox('لا تمتلك الرتبة',player,255,0,0,true) end end ) سويتها هيك ماصارت addCommandHandler('Check', function(player) if(isObjectInACLGroup('user.'..getAccountName(getPlayerAccount(player)),aclGetGroup('Test'))) then guiSetVisible ( GUIEditor.window[1], not guiGetVisible(GUIEditor.window[1]) ) showCursor ( guiGetVisible(GUIEditor.window[1]) ) else outputChatBox('لا تمتلك الرتبة',player,255,0,0,true) end end ) هي اكواد فتح الوحة ممكن تسويها function DD( ) guiSetVisible ( GUIEditor.window[1], not guiGetVisible(GUIEditor.window[1]) ) showCursor ( guiGetVisible(GUIEditor.window[1]) ) end end bindKey( 'O', 'down', DD ) Link to comment
KillerX Posted August 14, 2018 Share Posted August 14, 2018 On ١٤/٨/٢٠١٨ at 19:02, MR.Nour said: addCommandHandler('Check', function(player) if(isObjectInACLGroup('user.'..getAccountName(getPlayerAccount(player)),aclGetGroup('Test'))) then guiSetVisible ( GUIEditor.window[1], not guiGetVisible(GUIEditor.window[1]) ) showCursor ( guiGetVisible(GUIEditor.window[1]) ) else outputChatBox('لا تمتلك الرتبة',player,255,0,0,true) end end ) ما يصير تسوي guiSetVisible في ملف السيرفر سوي التحقق في ملف السيرفر ولو فعلا معوا الرتبة يسوي تريقر للكلنت يفتحلك اللوحه 1 Link to comment
Trefeor Posted August 14, 2018 Share Posted August 14, 2018 -- Server addCommandHandler ( "check" , function ( player ) local acc = getPlayerAccount ( player ) if ( not isGuestAccount ( acc ) ) then if ( isObjectInACLGroup ( "user."..getAccountName(acc),aclGetGroup("Test") ) ) then triggerClientEvent ( player , "openWindow" , player ) end else outputChatBox("please login !",player) end end ) --- Client addEvent ( "openWindow" , true ) addEventHandler ( "openWindow" , root , function ( ) guiSetVisible ( GUIEditor.window[1] , not guiGetVisible ( GUIEditor.window[1] ) ) showCursor ( guiGetVisible ( GUIEditor.window[1] ) ) end ) 1 1 Link to comment
MR.Nour Posted August 14, 2018 Author Share Posted August 14, 2018 Just now, Trefeor said: -- Server addCommandHandler ( "check" , function ( player ) local acc = getPlayerAccount ( player ) if ( not isGuestAccount ( acc ) ) then if ( isObjectInACLGroup ( "user."..getAccountName(acc),aclGetGroup("Test") ) ) then triggerClientEvent ( player , "openWindow" , player ) end else outputChatBox("please login !",player) end end ) --- Client addEvent ( "openWindow" , true ) addEventHandler ( "openWindow" , root , function ( ) guiSetVisible ( GUIEditor.window[1] , not guiGetVisible ( GUIEditor.window[1] ) ) showCursor ( guiGetVisible ( GUIEditor.window[1] ) ) end ) كيف اخليه يكتب ليس لديك الرتبة + شكرا Link to comment
Trefeor Posted August 14, 2018 Share Posted August 14, 2018 addCommandHandler ( "check" , function ( player ) local acc = getPlayerAccount ( player ) if ( not isGuestAccount ( acc ) ) then if ( isObjectInACLGroup ( "user."..getAccountName(acc),aclGetGroup("Test") ) ) then triggerClientEvent ( player , "openWindow" , player ) else outputChatBox("you can't open window",player) end else outputChatBox("please login !",player) end end ) 1 Link to comment
MR.Nour Posted August 14, 2018 Author Share Posted August 14, 2018 Just now, Trefeor said: addCommandHandler ( "check" , function ( player ) local acc = getPlayerAccount ( player ) if ( not isGuestAccount ( acc ) ) then if ( isObjectInACLGroup ( "user."..getAccountName(acc),aclGetGroup("Test") ) ) then triggerClientEvent ( player , "openWindow" , player ) else outputChatBox("you can't open window",player) end else outputChatBox("please login !",player) end end ) ماصار + مافي شي في الديبق Link to comment
Trefeor Posted August 14, 2018 Share Posted August 14, 2018 اخوي شيل آمر check وأستبدله بأي شيء تبيه وراح يجي ان شاء الله Link to comment
MR.Nour Posted August 14, 2018 Author Share Posted August 14, 2018 Just now, Trefeor said: اخوي شيل آمر check وأستبدله بأي شيء تبيه وراح يجي ان شاء الله عنجد شكرا كتير الك اخي مابدي افتح موضوع جديد بدي السيارة تتلون اكثر من لون حاولت بس ماصار هي محاولتي addCommandHandler( 'random_color', setTimer(function( uPlayer ) if isPedInVehicle( uPlayer ) then local uVehicle = getPedOccupiedVehicle( uPlayer ) if uVehicle then local r, g, b = math.random( 255 ), math.random( 255 ), math.random( 255 ) setVehicleColor( uVehicle, r, g, b ) end, 3000, 0) end end ) Link to comment
Trefeor Posted August 14, 2018 Share Posted August 14, 2018 local Timer = { } addCommandHandler ( "random_color" , function ( Player ) if ( getPedOccupiedVehicle ( Player ) ) then if ( isTimer ( Timer [ Player ] ) ) then killTimer ( Timer [ Player ] ) return end Timer [ Player ] = setTimer ( function ( p ) if ( getPedOccupiedVehicle ( p ) ) then local r, g, b = math.random( 255 ), math.random( 255 ), math.random( 255 ) setVehicleColor( getPedOccupiedVehicle ( p ) , r , g , b ) end end,300,0,Player) end end ) function removeTimer ( ) if ( isTimer ( Timer [ source ] ) ) then killTimer ( Timer [ source ] ) Timer [ source ] = nil end end addEventHandler("onPlayerQuit",root,removeTimer) addEventHandler("onPlayerWasted",root,removeTimer) جرب هذا Link to comment
MR.Nour Posted August 14, 2018 Author Share Posted August 14, 2018 Just now, Trefeor said: local Timer = { } addCommandHandler ( "random_color" , function ( Player ) if ( getPedOccupiedVehicle ( Player ) ) then if ( isTimer ( Timer [ Player ] ) ) then killTimer ( Timer [ Player ] ) return end Timer [ Player ] = setTimer ( function ( p ) if ( getPedOccupiedVehicle ( p ) ) then local r, g, b = math.random( 255 ), math.random( 255 ), math.random( 255 ) setVehicleColor( getPedOccupiedVehicle ( p ) , r , g , b ) end end,300,0,Player) end end ) function removeTimer ( ) if ( isTimer ( Timer [ source ] ) ) then killTimer ( Timer [ source ] ) Timer [ source ] = nil end end addEventHandler("onPlayerQuit",root,removeTimer) addEventHandler("onPlayerWasted",root,removeTimer) جرب هذا ماصار عطاني لون اسود بس Link to comment
Trefeor Posted August 14, 2018 Share Posted August 14, 2018 تاكد , لاني جربته وضبط معاي Link to comment
^iiEcoo'x_) Posted August 14, 2018 Share Posted August 14, 2018 (edited) local Timer = { } addCommandHandler ( "random_color" , function ( Player ) if ( getPedOccupiedVehicle ( Player ) ) then if ( isTimer ( Timer [ Player ] ) ) then killTimer ( Timer [ Player ] ) return end Timer [ Player ] = setTimer ( function ( Player ) if ( getPedOccupiedVehicle ( Player ) ) then local r, g, b = math.random( 255 ), math.random( 255 ), math.random( 255 ) setVehicleColor( getPedOccupiedVehicle ( Player ) , r , g , b ) end end,300,0,Player) end end ) function removeTimer ( ) if ( isTimer ( Timer [ source ] ) ) then killTimer ( Timer [ source ] ) Timer [ source ] = nil end end addEventHandler("onPlayerQuit",root,removeTimer) addEventHandler("onPlayerWasted",root,removeTimer) Edited August 14, 2018 by #_iMr,[E]coo Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now