Sign in to follow this  
jakson

مساعده

Recommended Posts

هلا شباب كيفكم. 

ممكن حد يقول لي كيف اسوي بليبس علي الهيدرا ...

يعني لما ينزل لاعب هيدرا 

يظهر علامه علي الهيدرا في المني ماب الي موجوده تحت علي الشمال في ام تي اي 

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

وشكرا 

Share this post


Link to post

استخدم الفنكشن

createBlipAttachedTo
  • Thanks 1

Share this post


Link to post
Posted (edited)
17 hours ago, jakson said:

هلا شباب كيفكم. 

ممكن حد يقول لي كيف اسوي بليبس علي الهيدرا ...

يعني لما ينزل لاعب هيدرا 

يظهر علامه علي الهيدرا في المني ماب الي موجوده تحت علي الشمال في ام تي اي 

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

وشكرا 

addEventHandler('onVehicleEnter',root,
  function(thePlayer, seat , jacked)
    if getElementModel(source) == 520 then -- يتحقق من انو الموديل حق الهايدرا
      	outputChatBox(getPlayerName(thePlayer)..'entered a hydra', root) -- يكتبلك بالشات انو اللاعب ذا دخل بهايدرا
      	createBlipAttachedTo(source, 52) --- يصنع البلب
      	destroyElement(source) -- يشيل الهايدرا
      	outputChatBox(getPlayerName(thePlayer).."don't enter a hydra again", thePlayer) -- يكتب للاعب 
    end
  end
)
      	

 

Edited by JustP
  • Thanks 1

Share this post


Link to post
Posted (edited)

اذا الاعب ركب الهيدرا يسوي علامة في الخريطة

addEventHandler('onVehicleEnter',root,
  function(thePlayer, seat , jacked)
    if getElementModel(source) == 520 then -- يتحقق من انو الموديل حق الهايدرا
      	outputChatBox(getPlayerName(thePlayer)..'entered a hydra', root) -- يكتبلك بالشات انو اللاعب ذا دخل بهايدرا
      	createBlipAttachedTo(source, 52) --- يصنع البلب
    end
  end
)
Edited by salh
  • Thanks 2

Share this post


Link to post

انا سويتها كدا...

بس للاسف بدل ما يشيل العلامه لما الاعيب يخرج من الهيدرا ..يشيل الهيدرا و يسيب العلامه

  function addHelmetOnEnter (thePlayer, seat , jacked)
    if getElementModel(source) == 520 then 
      	createBlipAttachedTo(source, 52) 
    end
  end
addEventHandler ( "onVehicleEnter", getRootElement(), addHelmetOnEnter )

function removeHelmetOnExit (thePlayer, seat , jacked)
 if getElementModel(source) == 520 then
 destroyElement(source, 52)
 end
end
addEventHandler ( "onVehicleExit", getRootElement(), removeHelmetOnExit )

 

Share this post


Link to post

جرب هذا

local blips = { }
function addHelmetOnEnter (thePlayer, seat , jacked)
    if getElementModel(source) == 520 then 
	if ( isElement ( blips[source] ) ) then destroyElement ( blips [ source ] end
      	blips[source] = createBlipAttachedTo(source, 52) 
    end
	end
  end
addEventHandler ( "onVehicleEnter", getRootElement(), addHelmetOnEnter )

function removeHelmetOnExit (thePlayer, seat , jacked)
 if getElementModel(source) == 520 and isElement ( blips[source] ) then
 destroyElement(blips[source])
 blips[source] = nil
 end
end
addEventHandler ( "onVehicleExit", getRootElement(), removeHelmetOnExit )

 

  • Thanks 1

Share this post


Link to post
Posted (edited)
11 minutes ago, Hakan said:

جرب هذا


local blips = { }
function addHelmetOnEnter (thePlayer, seat , jacked)
    if getElementModel(source) == 520 then 
	if ( isElement ( blips[source] ) ) then destroyElement ( blips [ source ] end
      	blips[source] = createBlipAttachedTo(source, 52) 
    end
	end
  end
addEventHandler ( "onVehicleEnter", getRootElement(), addHelmetOnEnter )

function removeHelmetOnExit (thePlayer, seat , jacked)
 if getElementModel(source) == 520 and isElement ( blips[source] ) then
 destroyElement(blips[source])
 blips[source] = nil
 end
end
addEventHandler ( "onVehicleExit", getRootElement(), removeHelmetOnExit )

 

يعطيني الخطء

ERROR: Loading script failed: Name\s.lua: ')' expected near 'end'

ولما شلت ال end

وحطيت ) 

if ( isElement ( blips[source] ) ) then destroyElement ( blips [ source ]  )

ما يظهر اخطاء ولاكن مو يشتغل

ولما سويته كدا 

    if ( isElement ( blips[source] ) ) then destroyElement ( blips [ source ] ) end 
end

ما يظهر اخطاء ولاكن مو راضي يشتغل بردو

Edited by jakson

Share this post


Link to post

جرب هذا

local hydra = { } 

addEventHandler ( "onVehicleStartEnter" , root , function ( ) 
if ( getElementModel ( source ) == 520 ) then 
if ( isElement ( hydra [ source ] ) ) then destroyElement ( hydra [ source ] ) end 
hydra [ source ] = createBlipAttachedTo ( source , 0 )
end
end ) ; 

addEventHandler ( "onVehicleStartExit" , root , function ( ) 
if ( getElementModel ( source ) == 520 and isElement ( hydra [ source ] ) ) then 
destroyElement ( hydra [ source ] ) 
hydra [ source ] = nil
end
end ) ; 

 

  • Thanks 1

Share this post


Link to post
3 minutes ago, Hakan said:

جرب هذا


local hydra = { } 

addEventHandler ( "onVehicleStartEnter" , root , function ( ) 
if ( getElementModel ( source ) == 520 ) then 
if ( isElement ( hydra [ source ] ) ) then destroyElement ( hydra [ source ] ) end 
hydra [ source ] = createBlipAttachedTo ( source , 0 )
end
end ) ; 

addEventHandler ( "onVehicleStartExit" , root , function ( ) 
if ( getElementModel ( source ) == 520 and isElement ( hydra [ source ] ) ) then 
destroyElement ( hydra [ source ] ) 
hydra [ source ] = nil
end
end ) ; 

 

مشكور اشتغل تمام

Share this post


Link to post

العفو حياك الله .

  • Thanks 1

Share this post


Link to post
26 minutes ago, Hakan said:

العفو حياك الله .

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

local hydra = { } 

addEventHandler ( "onVehicleStartEnter" , root , function ( )
if getTeamName( getPlayerTeam ( source ) == "SWAT" and
if getElementModel ( source ) == 520 ) then 
if isElement ( hydra [ source ] ) ) then destroyElement ( hydra [ source ] ) end 
hydra [ source ] = createBlipAttachedTo ( source , 9 )
end
end ) ; 

addEventHandler ( "onVehicleStartExit" , root , function ( ) 
if ( getElementModel ( source ) == 520 and isElement ( hydra [ source ] ) ) then 
destroyElement ( hydra [ source ] ) 
hydra [ source ] = nil
end
end ) ; 

ابي اسويها لا يظهر البليب الا تيم السوات

Share this post


Link to post
13 minutes ago, Abdul KariM said:

حط التيم createBlipAttachedTo اخر ارقمنت

ممكن توضحك اكثر

-- Find the player called someguy
local someguy = getPlayerFromName ( "someguy" )

يجيب الاعب وليس التيم علي ما اعتقد

17 minutes ago, Hakan said:

Share this post


Link to post
local hydra = { } 

addEventHandler ( "onVehicleStartEnter" , root , function ( )
if getTeamName( getPlayerTeam ( source ) == "SWAT" and
if getElementModel ( source ) == 520 ) then 
if isElement ( hydra [ source ] ) ) then destroyElement ( hydra [ source ] ) end 
hydra [ source ] = createBlipAttachedTo ( source , 9 , 0,2,255,0,0,255,0,16383.0,getTeamFromName("SWAT"))
end
end ) ; 

addEventHandler ( "onVehicleStartExit" , root , function ( ) 
if ( getElementModel ( source ) == 520 and isElement ( hydra [ source ] ) ) then 
destroyElement ( hydra [ source ] ) 
hydra [ source ] = nil
end
end ) 

جرب هذا ولاتنسى تغير اسم التيم

Share this post


Link to post
Posted (edited)
7 minutes ago, Hakan said:

local hydra = { } 

addEventHandler ( "onVehicleStartEnter" , root , function ( )
if getTeamName( getPlayerTeam ( source ) == "SWAT" and
if getElementModel ( source ) == 520 ) then 
if isElement ( hydra [ source ] ) ) then destroyElement ( hydra [ source ] ) end 
hydra [ source ] = createBlipAttachedTo ( source , 9 , 0,2,255,0,0,255,0,16383.0,getTeamFromName("SWAT"))
end
end ) ; 

addEventHandler ( "onVehicleStartExit" , root , function ( ) 
if ( getElementModel ( source ) == 520 and isElement ( hydra [ source ] ) ) then 
destroyElement ( hydra [ source ] ) 
hydra [ source ] = nil
end
end ) 

جرب هذا ولاتنسى تغير اسم التيم

ظهر الخطء

ERROR: Loading script failed: name\s.lua:5:unexpected symbol near 'if'

Edited by jakson

Share this post


Link to post
1 hour ago, jakson said:

ظهر الخطء

ERROR: Loading script failed: name\s.lua:5:unexpected symbol near 'if'

local hydra = { } 

addEventHandler ( "onVehicleStartEnter" , root , function ( )
if getTeamName( getPlayerTeam ( source ) == "SWAT" then
	if getElementModel ( source ) == 520 ) then 
	if isElement ( hydra [ source ] ) ) then destroyElement ( hydra [ source ] ) end 
		hydra [ source ] = createBlipAttachedTo ( source , 9 , 0,2,255,0,0,255,0,16383.0,getTeamFromName("SWAT"))
	end
end ) ; 

addEventHandler ( "onVehicleStartExit" , root , function ( ) 
	if ( getElementModel ( source ) == 520 and isElement ( hydra [ source ] ) ) then 
		destroyElement ( hydra [ source ] ) 
		hydra [ source ] = nil
	end
end ) 

هذا بيشتغل

Share this post


Link to post
23 minutes ago, JustP said:

local hydra = { } 

addEventHandler ( "onVehicleStartEnter" , root , function ( )
if getTeamName( getPlayerTeam ( source ) == "SWAT" then
	if getElementModel ( source ) == 520 ) then 
	if isElement ( hydra [ source ] ) ) then destroyElement ( hydra [ source ] ) end 
		hydra [ source ] = createBlipAttachedTo ( source , 9 , 0,2,255,0,0,255,0,16383.0,getTeamFromName("SWAT"))
	end
end ) ; 

addEventHandler ( "onVehicleStartExit" , root , function ( ) 
	if ( getElementModel ( source ) == 520 and isElement ( hydra [ source ] ) ) then 
		destroyElement ( hydra [ source ] ) 
		hydra [ source ] = nil
	end
end ) 

هذا بيشتغل

ERROR: Loading script failed: name\s.lua:4: ')'expected near 'then'

Share this post


Link to post
Posted (edited)
5 minutes ago, jakson said:

ERROR: Loading script failed: name\s.lua:4: ')'expected near 'then'

local hydra = { } 

addEventHandler ( "onVehicleStartEnter" , root , function ( )
if getTeamName( getPlayerTeam ( source ) == "SWAT" ) then
	if getElementModel ( source ) == 520 ) then 
	if isElement ( hydra [ source ] ) ) then destroyElement ( hydra [ source ] ) end 
		hydra [ source ] = createBlipAttachedTo ( source , 9 , 0,2,255,0,0,255,0,16383.0,getTeamFromName("SWAT"))
    end
  end
end ) ;

addEventHandler ( "onVehicleStartExit" , root , function ( ) 
	if ( getElementModel ( source ) == 520 and isElement ( hydra [ source ] ) ) then 
		destroyElement ( hydra [ source ] ) 
		hydra [ source ] = nil
	end
end ) 

 

Edited by DABL

Share this post


Link to post
19 minutes ago, DABL said:

local hydra = { } 

addEventHandler ( "onVehicleStartEnter" , root , function ( )
if getTeamName( getPlayerTeam ( source ) == "SWAT" ) then
	if getElementModel ( source ) == 520 ) then 
	if isElement ( hydra [ source ] ) ) then destroyElement ( hydra [ source ] ) end 
		hydra [ source ] = createBlipAttachedTo ( source , 9 , 0,2,255,0,0,255,0,16383.0,getTeamFromName("SWAT"))
    end
  end
end ) ;

addEventHandler ( "onVehicleStartExit" , root , function ( ) 
	if ( getElementModel ( source ) == 520 and isElement ( hydra [ source ] ) ) then 
		destroyElement ( hydra [ source ] ) 
		hydra [ source ] = nil
	end
end ) 

 

ERROR: Loading script failed: name\s.lua:5: ')'expected near 'then'

Share this post


Link to post
blip={};

addEventHandler("onVehicleEnter",root,
	function(thePlayer)
		if (getElementModel(source)==520) then
			if not (blip[source]) then
				blip[source]=createBlipAttachedTo (source);
			end
		end
	end
);


addEventHandler("onVehicleExit",root,
	function(thePlayer)
		if (getElementModel(source)==520) then
			if (blip[source]) then
				local destroy=destroyElement(blip[source]);
				if not (destroy) then
					blip[source]=nil;
				end
			end
		end
	end
);

 

  • Thanks 1

Share this post


Link to post
12 minutes ago, jakson said:

ERROR: Loading script failed: name\s.lua:5: ')'expected near 'then'


local hydra = { } 

addEventHandler ( "onVehicleStartEnter" , root , function ( )
if getTeamName( getPlayerTeam ( source ) == "SWAT" ) then
	if getElementModel ( source ) == 520  then 
	if isElement ( hydra [ source ] ) ) then destroyElement ( hydra [ source ] ) end 
		hydra [ source ] = createBlipAttachedTo ( source , 9 , 0,2,255,0,0,255,0,16383.0,getTeamFromName("SWAT"))
    end
  end
end ) ;

addEventHandler ( "onVehicleStartExit" , root , function ( ) 
	if ( getElementModel ( source ) == 520 and isElement ( hydra [ source ] ) ) then 
		destroyElement ( hydra [ source ] ) 
		hydra [ source ] = nil
	end
end ) 

 

Share this post


Link to post
12 minutes ago, JustP said:

local hydra = { } 

addEventHandler ( "onVehicleStartEnter" , root , function ( )
if getTeamName( getPlayerTeam ( source ) == "SWAT" ) then
	if getElementModel ( source ) == 520  then 
	if isElement ( hydra [ source ] ) ) then destroyElement ( hydra [ source ] ) end 
		hydra [ source ] = createBlipAttachedTo ( source , 9 , 0,2,255,0,0,255,0,16383.0,getTeamFromName("SWAT"))
    end
  end
end ) ;

addEventHandler ( "onVehicleStartExit" , root , function ( ) 
	if ( getElementModel ( source ) == 520 and isElement ( hydra [ source ] ) ) then 
		destroyElement ( hydra [ source ] ) 
		hydra [ source ] = nil
	end
end ) 

 

ERROR: Loading script failed: name\s.lua:6: 'then' expected near ')'

Share this post


Link to post
local hydra = { } 

addEventHandler ( "onVehicleStartEnter" , root , function ( )
if getTeamName( getPlayerTeam ( source ) == "SWAT" then
	if getElementModel ( source ) == 520  then 
	if isElement ( hydra [ source ] ) ) then destroyElement ( hydra [ source ] ) end 
		hydra [ source ] = createBlipAttachedTo ( source , 9 , 0,2,255,0,0,255,0,16383.0,getTeamFromName("SWAT"))
    end
  end
end 
) ;

addEventHandler ( "onVehicleStartExit" , root , function ( ) 
	if ( getElementModel ( source ) == 520 and isElement ( hydra [ source ] ) ) then 
		destroyElement ( hydra [ source ] ) 
		hydra [ source ] = nil
	end
end )

 

Share this post


Link to post

جاكسون انت تبيه اول ما يركب الهايدرا تختفي ولا بس يسوي علامة؟

Share this post


Link to post

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.