Jump to content

تعديل على كود الماركر


Recommended Posts

سلام عليكم

كيفكم ان شاء الله بخير

عندي كود حق ماركر الي يفتح لوحه يعني اول ما اجي على الماركر يفتح لي الوحه

ابيه يكون لي قروب يعني الي داخل القروب تفتح له الوحه بس

ويعطيكم العافيه 

local marker = createMarker (223.19098, 1889.78125, 16.64063, "cylinder", 1.5, 255, 255, 0, 170 )
addEventHandler("onClientMarkerHit",marker, 
function()
guiSetVisible(W1,true)
showCursor(true) 
end 
)

 

Edited by r2x
Link to comment
marker = createMarker (223.19098, 1889.78125, 16.64063, "cylinder", 1.5, 255, 255, 0, 170 )

addEventHandler("onClientMarkerHit",marker, 

function(hitplayer)

if ( hitplayer == localPlayer ) and  getElementData(hitPlayer, 'Group' ) == 'You Team' then

guiSetVisible(W1,true)

showCursor(true) 

end 

end 

)

 

Link to comment
7 minutes ago, Ahmed Ly said:

marker = createMarker (223.19098, 1889.78125, 16.64063, "cylinder", 1.5, 255, 255, 0, 170 )

addEventHandler("onClientMarkerHit",marker, 

function(hitplayer)

if ( hitplayer == localPlayer ) and  getElementData(hitPlayer, 'Group' ) == 'You Team' then

guiSetVisible(W1,true)

showCursor(true) 

end 

end 

)

 

غلط في الصطر السابع

Link to comment
6 minutes ago, iMr.WiFi..! said:

غير You Team 

الى اسم القروب حقك *

مغيرو 

يعطيني كذا

WARNING: j/Tc.lua:27: Bad argument @ 'getElementData'[Expected element at argument 1, got nil]

السطر 27هو نفسه سطر 7

Edited by r2x
Link to comment
-- Server

marker = createMarker (223.19098, 1889.78125, 16.64063, "cylinder", 1.5, 255, 255, 0, 170 )

addEventHandler("onMarkerHit",marker, 

	function ( EnterP )

        if ( getElementType(EnterP) == "player" ) and ( getElementData( EnterP, "Group" ) == "GroupName" ) then

			triggerClientEvent(EnterP,"Open",EnterP)
      
        end 

	end 

)

-- Client
addEvent ( "Open", true )
addEventHandler ( "Open", root, function ( )
     guiSetVisible(W1,true)
   	 showCursor(true)     
end )

 

Link to comment
6 minutes ago, iMr.WiFi..! said:

-- Server

marker = createMarker (223.19098, 1889.78125, 16.64063, "cylinder", 1.5, 255, 255, 0, 170 )

addEventHandler("onMarkerHit",marker, 

	function ( EnterP )

        if ( getElementType(EnterP) == "player" ) and ( getElementData( EnterP, "Group" ) == "GroupName" ) then

			triggerClientEvent(EnterP,"Open",EnterP)
      
        end 

	end 

)

-- Client
addEvent ( "Open", true )
addEventHandler ( "Open", root, function ( )
     guiSetVisible(W1,true)
   	 showCursor(true)     
end )

 

ERROR: j/Tc.lua:23: attempt to call global 'aaddEvent' (a nil value)

23 = 20 

Link to comment
-- Server

marker = createMarker (223.19098, 1889.78125, 16.64063, "cylinder", 1.5, 255, 255, 0, 170 )

addEventHandler("onMarkerHit",marker, 

	function ( EnterP )

        if ( getElementType(EnterP) == "player" ) and ( getElementData( EnterP, "Group" ) == "GroupName" ) then

			triggerClientEvent(EnterP,"Open",EnterP)
      
        end 

	end 

)

-- Client
addEvent ( "Open", true )
addEventHandler ( "Open", root, function ( )
     guiSetVisible(W1,true)
   	 showCursor(true)     
end )

موجود هو صح؟

Link to comment
3 minutes ago, #BrosS said:

اسأل نفسك

ولله ما الي على البرمجه كثير فا من بعد اذنك لو تقدر تساعدني محتاج ذا الكود ضروري لو سمحت

Link to comment
local marker = createMarker (223.19098, 1889.78125, 16.64063, "cylinder", 1.5, 255, 255, 0, 170 )


addEventHandler ( "onClientMarkerHit", resourceRoot, function ( hElement )
    if ( source == marker ) then
        if ( hElement == localPlayer and not getPedOccupiedVehicle ( hElement ) ) then
         if ( getElementData ( hElement, "Group" ) == "Your groupname" ) then
              guiSetVisible ( W1,true )
              showCursor ( true )   
         end
      end
   end
end )

 

Edited by #ZA7F //=
Link to comment

جرب

marker = createMarker (223.19098, 1889.78125, 16.64063, "cylinder", 1.5, 255, 255, 0, 170 )



addEventHandler("onClientMarkerHit",marker, 



function(hitplayer)



if  hitplayer == localPlayer and  getElementData(hitplayer, 'Group' ) == 'You Team' then



guiSetVisible(W1,true)



showCursor(true) 


end 



end 



)

 

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