jakson Posted June 1, 2019 Share Posted June 1, 2019 هلا شباب كيفكم. ممكن حد يقول لي كيف اسوي بليبس علي الهيدرا ... يعني لما ينزل لاعب هيدرا يظهر علامه علي الهيدرا في المني ماب الي موجوده تحت علي الشمال في ام تي اي عشان تكشف للاعبين الاخره ان في شخص يسوق هيدرا وشكرا Link to comment
TAPL Posted June 1, 2019 Share Posted June 1, 2019 استخدم الفنكشن createBlipAttachedTo 1 Link to comment
JustP Posted June 2, 2019 Share Posted June 2, 2019 (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 June 2, 2019 by JustP 1 Link to comment
salh Posted June 2, 2019 Share Posted June 2, 2019 (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 June 2, 2019 by salh 2 Link to comment
jakson Posted June 2, 2019 Author Share Posted June 2, 2019 انا سويتها كدا... بس للاسف بدل ما يشيل العلامه لما الاعيب يخرج من الهيدرا ..يشيل الهيدرا و يسيب العلامه 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
Hakan Posted June 2, 2019 Share Posted June 2, 2019 جرب هذا 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 ) 1 Link to comment
jakson Posted June 2, 2019 Author Share Posted June 2, 2019 (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 June 2, 2019 by jakson Link to comment
Hakan Posted June 2, 2019 Share Posted June 2, 2019 جرب هذا 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 ) ; 1 Link to comment
jakson Posted June 2, 2019 Author Share Posted June 2, 2019 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
jakson Posted June 2, 2019 Author Share Posted June 2, 2019 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
Abdul KariM Posted June 2, 2019 Share Posted June 2, 2019 حط التيم createBlipAttachedTo اخر ارقمنت 1 Link to comment
jakson Posted June 2, 2019 Author Share Posted June 2, 2019 13 minutes ago, Abdul KariM said: حط التيم createBlipAttachedTo اخر ارقمنت ممكن توضحك اكثر -- Find the player called someguy local someguy = getPlayerFromName ( "someguy" ) يجيب الاعب وليس التيم علي ما اعتقد 17 minutes ago, Hakan said: setElementVisibleTo Link to comment
Hakan Posted June 2, 2019 Share Posted June 2, 2019 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
jakson Posted June 2, 2019 Author Share Posted June 2, 2019 (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 June 2, 2019 by jakson Link to comment
JustP Posted June 2, 2019 Share Posted June 2, 2019 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
jakson Posted June 2, 2019 Author Share Posted June 2, 2019 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
Guest Posted June 2, 2019 Share Posted June 2, 2019 (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 June 2, 2019 by Guest Link to comment
jakson Posted June 2, 2019 Author Share Posted June 2, 2019 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
nxFairlywell Posted June 2, 2019 Share Posted June 2, 2019 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 ); 1 Link to comment
JustP Posted June 2, 2019 Share Posted June 2, 2019 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
jakson Posted June 2, 2019 Author Share Posted June 2, 2019 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
Abdul KariM Posted June 2, 2019 Share Posted June 2, 2019 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
salh Posted June 2, 2019 Share Posted June 2, 2019 جاكسون انت تبيه اول ما يركب الهايدرا تختفي ولا بس يسوي علامة؟ 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