Jump to content

مساعده


Recommended Posts

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

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

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

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

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

وشكرا 

Link to comment
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
Link to comment

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

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
Link to comment

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

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

  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 )

 

Link to comment

جرب هذا

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
Link to comment
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
Link to comment

جرب هذا

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
Link to comment
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 ) ; 

 

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

Link to comment
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 ) ; 

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

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

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

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

هذا بيشتغل

Link to comment
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'

Link to comment
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 Guest
Link to comment
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'

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

 

Link to comment
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 ')'

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

 

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