AL-SAYED Posted November 29, 2012 Share Posted November 29, 2012 addEventHandler ( "onClientGUIClick", root, function ( ) theData = getElementData ( localPlayer, "theSound" ) if source == driftImage then triggerServerEvent ( "setTeam", localPlayer, "drift" ) عندما يضغط على الصورة يصير سباون وعنده سيارة Link to comment
AhmadQTR Posted November 29, 2012 Share Posted November 29, 2012 spawnPlayer createVehicle Link to comment
Sora Posted November 29, 2012 Share Posted November 29, 2012 "onClientGUIClick" createVehicle warpPedIntoVehicle Link to comment
AL-SAYED Posted November 29, 2012 Author Share Posted November 29, 2012 local tank = getLocalPlayer() local x, y, z = getElementPosition ( tank ) createVehicle ( 432, x, y, z ) warpPedIntoVehicle ( tank ) Link to comment
AL-SAYED Posted November 29, 2012 Author Share Posted November 29, 2012 شلون عجل ما اعرف Link to comment
abu5lf Posted November 29, 2012 Share Posted November 29, 2012 'warpPedIntoVehicle' server side only. e.g vehicle = createVehicle ( ... ) warpPedIntoVehicle ( player, vehicle ) Link to comment
AL-SAYED Posted November 29, 2012 Author Share Posted November 29, 2012 Available client side from 1.3.1 (It will only work with client side vehicles and peds) Link to comment
|Mr|-Talal07-| Posted November 29, 2012 Share Posted November 29, 2012 جرب ذا -- Client Side -- addEventHandler("onClientGUIClick",root, function () if ( source == picname ) then triggerServerEvent("onGetVeh",localPlayer) end end ) -- Server Side -- addEvent("onGetVeh",true) addEventHandler("onGetVeh",root, function () local x,y,z = getElementPosition(source) local veh = createVehicle(411,x,y,z) warpPedIntoVehicle(source,veh) end ) Link to comment
TAPL Posted November 29, 2012 Share Posted November 29, 2012 Available client side from 1.3.1 (It will only work with client side vehicles and peds) Note: Vehicles (and other elements) created client-side are only seen by the client that created them, aren't synced and players cannot enter them. They are essentially for display only. https://wiki.multitheftauto.com/wiki/CreateVehicle Link to comment
AL-SAYED Posted November 30, 2012 Author Share Posted November 30, 2012 جرب ذا-- Client Side -- addEventHandler("onClientGUIClick",root, function () if ( source == picname ) then triggerServerEvent("onGetVeh",localPlayer) end end ) -- Server Side -- addEvent("onGetVeh",true) addEventHandler("onGetVeh",root, function () local x,y,z = getElementPosition(source) local veh = createVehicle(411,x,y,z) warpPedIntoVehicle(source,veh) end ) شلون اخليه اذا طلع من السيارة السيارة تنفجر وهو يموت عشان لا يصير لااق في السيرفر Link to comment
iPrestege Posted November 30, 2012 Share Posted November 30, 2012 blowVehicle -- تفجير المبركبة ـ "OnPlayerVehicleExit" -- عند خروج الاعب من المركبة Link to comment
AL-SAYED Posted November 30, 2012 Author Share Posted November 30, 2012 vehicles = getElementsByType ( "vehicle" ) for vehicleKey, vehicleValue in ipairs(vehicles) do blowVehicle ( vehicleValue ) end addEventHandler ( "onPlayerVehicleExit", getRootElement(), vehicle ) Link to comment
AhmadQTR Posted November 30, 2012 Share Posted November 30, 2012 (edited) vehicles = getElementsByType ( "vehicle" ) for vehicleKey, vehicleValue in ipairs(vehicles) do blowVehicle ( vehicleValue ) end addEventHandler ( "onPlayerVehicleExit", getRootElement(), vehicle ) اعتقد كذا local vehicles = getPedOccupiedVehicle ( source ) function doBlow ( source ) blowVehicle (vehicles) end addEventHandler ( "onPlayerVehicleExit", getRootElement(), doBlow) Edited November 30, 2012 by Guest Link to comment
3NAD Posted November 30, 2012 Share Posted November 30, 2012 سو وظيفة و حط لها اسم function BLOW ( ) وش اللي تبيه يصير حطه داخل الوظيفة function BLOW ( ) blowVehicle ( ) كذا الكود ناقص اي سيارة يفجرها ؟؟ function BLOW ( ) blowVehicle ( getPedOccupiedVehicle ( source ) ) و ننهي الوظيفة بـ كلمة end function BLOW ( ) blowVehicle ( getPedOccupiedVehicle ( source ) ) end طيب هالحين نبي شيء يشغلها متى تنفجر السيارة ؟؟ function BLOW ( ) blowVehicle ( getPedOccupiedVehicle ( source ) ) end addEventHandler ( "onPlayerVehicleEnter", root, BLOW ) root حنا استخدمنا يعني اي سيارة راح تخرج منها تنفجر Link to comment
AL-SAYED Posted November 30, 2012 Author Share Posted November 30, 2012 قصدي انا انا الحين سويت ساحه ابه اذا ضغط على الصورة ال توديه الساحه يصير عنده سيارة اذا صاارت عنده سيارة اذا طلع منها تنفجر Link to comment
AL-SAYED Posted December 1, 2012 Author Share Posted December 1, 2012 if source == hajlwlaImage then triggerServerEvent ( "setTeam", localPlayer, "hajlwla" ) if theData then destroyElement ( theData ) end theSound = playSound ( "1.mp3" ) setElementData ( localPlayer, "theSound", theSound ) VisibleOff ( ) + addEventHandler("onClientGUIClick",root, function () if ( source == hajlwlaImage ) then triggerServerEvent("onGetVeh",localPlayer) end end ) انا ابغي ان اذا طلع من السيارة تنفجر وتختفي بعد ما تتفجر Link to comment
Bhrany-danger Posted December 1, 2012 Share Posted December 1, 2012 أعتقد تحتأإج ذذي ألاكواد https://wiki.multitheftauto.com/wiki/OnPlayerVehicleExit https://wiki.multitheftauto.com/wiki/BlowVehicle Link to comment
iPrestege Posted December 1, 2012 Share Posted December 1, 2012 blowVehicle -- تفجير المبركبة ـ "OnPlayerVehicleExit" -- عند خروج الاعب من المركبة Link to comment
AL-SAYED Posted December 1, 2012 Author Share Posted December 1, 2012 addEvent("onGetVeh",true) addEventHandler("onGetVeh",root, function () local x,y,z = getElementPosition(source) local veh = createVehicle(411,x,y,z) warpPedIntoVehicle(source,veh) blowVehicle ( getPedOccupiedVehicle ( source ) ) addEventHandler ( "onPlayerVehicleExit", root, veh ) end ) ذا اول ماضغط على الصورة تنفجر Link to comment
==>ҭᾄlᾄl Posted December 1, 2012 Share Posted December 1, 2012 addEvent("onGetVeh",true) addEventHandler("onGetVeh",root, function () local x,y,z = getElementPosition(source) local veh = createVehicle(411,x,y,z) warpPedIntoVehicle(source,veh) blowVehicle ( getPedOccupiedVehicle ( source ) ) addEventHandler ( "onPlayerVehicleExit", root, veh ) end ) اذا طلع اللعب من اي سياره يسوي عنده سياره ويركبها ويفجرها Link to comment
AL-SAYED Posted December 1, 2012 Author Share Posted December 1, 2012 انا ابغي ان اذا طلع من السيارة تنفجر وتختفي بعد ما تتفجر في الساحه فقط Link to comment
hassan.k.s.a Posted December 1, 2012 Share Posted December 1, 2012 try -- Server Side-- addEventHandler("onVehicleExplode",root,function () setTimer(destroyElement,100,1,source) end) addEventHandler ( "onPlayerVehicleExit",getRootElement(),function(player) local team = getTeamFromName("Test") local teamp = getPlayerTeam(player) if ( teamp == team ) then blowVehicle ( getPedOccupiedVehicle (player) ) end end) function xcreateTeam() NewTeam = createTeam ( "Test", 0, 255, 0 ) end addEventHandler("onResourceStart", resourceRoot, xcreateTeam) addEvent("SetTeamAndGiveCar", true) function v() setPlayerTeam(source, NewTeam) local x,y,z = getElementPosition(source) local veh = createVehicle(411,x,y,z) warpPedIntoVehicle(source,veh) end addEventHandler("SetTeamAndGiveCar", rootElement, v) --Client Side-- button = guiCreateButton(...) addEventHandler("onClientGUIClick",guiRoot,function() if source == button then triggerServerEvent("SetTeamAndGiveCar", localPlayer) end end) 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