Jump to content

مساعدة


Recommended Posts

وعليكم السلام

--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 by KillerX
Link to comment
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 !

  • Like 1
Link to comment
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
On ١٤‏/٨‏/٢٠١٨ at 19:02, MR.Nour said:

ما يصير تسوي 

guiSetVisible  

في ملف السيرفر :| 

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

  • Like 1
Link to comment
-- 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 ) 

 

  • Like 1
  • Thanks 1
Link to comment
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
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 
)

 

  • Thanks 1
Link to comment
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
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
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
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
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 by #_iMr,[E]coo
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...