-
Posts
698 -
Joined
-
Last visited
Everything posted by Sora
-
function (_, gameOptions) if gameOptions.respawn then This should work. thank you , but what is the usage way ? i mean like if gameOptions.respawn == ture then ... or something else?
-
this one was created by my friend addEventHandler("onGamemodeMapStart",root,function(map) local something = getElementsByType("setting") if something then local respawn = getElementData(something,"respawn") if respawn ~= false then outputChatBox("respawn enabled") else outputChatBox("respawn disabled") end end end ) but also not works note : thank you so much for your respond and your help
-
lol! look below addEventHandler("onMapStarting",getRootElement(), function (map) if isRespawn(map) == true then -- this is fake function just to make you know ! outoutChatBox("Respawn is enabled") else outoutChatBox("Respawn is disabled") end end)
-
so what i should use to know if respawn is enabled or disabled ?
-
one day from posting this topic , and there no helpful respond and i was think that there who will help me but this was my big mistake !
-
yep see setting in meta.xml file ? name="#respawn" value='[ "none" ]' /> in every map the respawn is none(not enabled(disabled)) but in some maps it's timelimit(enabled) name="#respawn" value='[ "timelimit" ]'>> my question is , how can i know if the respawn is enabled in the map that been started or not enabled(disabled) with using the event onMapStarting
-
i want when map start the script check if respawn is enabled in the map or not enabled that what i mean
-
lol delete the lines 1 and 2 in the serverside
-
hi , i want to know if there respawn in the map that started using this event onMapStarting https://wiki.multitheftauto.com/wiki/Resource:Race i wanna something like addEventHandler("onMapStarting",getRootElement(), function (mapOptions) if mapOptions.respawn == true then -- something here else -- something here end end) i mean how can i know if there respawn or no with this event? i've already solved this .. if you're facing the same issue then here's what i figured go to \race\modes\base.lua line 309
-
lol , checkout my resource : https://community.multitheftauto.com/ind ... ls&id=4436
-
of course not works because you did not added the sound path , and its return as nil or false server side addEvent("c_playSound",true) addEventHandler("c_playSound",root, function(sound) triggerClientEvent("c_playSound",root,sound) -- trigger it for everyone end ) client side aTab7 = {} aTab7.Tab = guiCreateTab ( "Radio", aTabPanel ) aTab1.Radio = guiCreateButton ( 0.40, 0.0, 0.20, 0.10, "Warning Sound", true, aTab7.Tab, "playSound" ) if ( source == aTab1.Radio ) then sound = "google.mp3" triggerServerEvent("c_playSound",localPlayer,sound) addEvent("c_playSound",true) addEventHandler("c_playSound",root, function(sound) playSound(sound) -- now its played for everyone. end )
-
وعليكم السلام روح مجلد الريس وخش مجلد modes المسار : \mods\deathmatch\resources\[gamemodes]\[race]\race\modes افتح ملف اسمه destructionderby.lua ببرنامج تحرير lua ابحث عن هذا السطر showMessage(getPlayerName(activePlayers[1]) .. ' is the final survivor!', 0, 255, 0) واكتب تحته local randomMoney = math.random(300,500) -- تقدر تغير عدد الفلوس givePlayerMoney(activePlayers[1],randomMoney)
-
this post may help you viewtopic.php?f=91&t=44657&p=447575#p447575
-
lol the function playSound is Client-only function
-
stolen map , flo changed to Eminem (( the map was created by flo not eminem )) https://community.multitheftauto.com/ind ... ls&id=5371 DONE
-
thank you guys , problem solved ^^
-
hello guys , i created an resource and i created marker and blip in a funiction with global variables and tried to destroy them with another funiction but says bad argument destroyElement(..) .. got nil addEvent("cb",true) addEventHandler("cb",getRootElement(),ct) function ct(player,x,y,z) finishblip = createBlip ( x, y, z, 42, 0, 0, 0, 255, 255,1, 99999,player) finishM = createMarker (x,y,z, "checkpoint", 3, 255, 255, 0, 170,player) addEventHandler("onMarkerHit", finishM,destroy) end function destroy(hitElement) -- some not needed codes was here destroyElement(finishblip) destroyElement(finishM) end my question is , why the script (or the funiction) can't get variables and they are global variables
-
كلنت function onClick(button, state, absoluteX, absoluteY) if source == Neoon1 then triggerServerEvent("CreateNeon",getLocalPlayer()) end end addEventHandler("onClientGUIClick", root,onClick) سيرفر addEvent("CreateNeon",true) addEventHandler("CreateNeon",getRootElement(), function () if isPedInVehicle ( source ) then local x,y,z = getElementPosition (source) if Marker then destroyElement(Marker) end Marker = createMarker ( x, y, z, "corona", 5, 255, 0, 0, 170 ) Vehicle = getPedOccupiedVehicle(source) attachElements ( Marker, Vehicle, 0, 0, -5 ) outputChatBox("* تم تركيب النيون بنجاح",source,255,255,255,true) else outputChatBox("* يجب ان تكون لديك سيآرة لتركيب النيون",source,255,255,255,true) end end) function destroy() destroyElement(Marker) end addEventHandler("onPlayerQuit",getRootElement(),destroy) addEventHandler("onVehicleStartExit",getRootElement(),destroy) ملاحظه الكود يعمل, تآبل آسف ع الخطأ ماشفت صفحة الويكي
-
اخوي الاغلاط الي ب كودك كثيره انا بعطيك كود مع شرح مفصل للعمليات الي فيه local root = getRootElement() function onClick(button, state, absoluteX, absoluteY) if source == Neoon1 then -- اذا ضغط اللاعب على الزر Neoon1 أفعل مايلي local x,y,z = getElementPosition (getLocalPlayer()) -- اخذ مكان (موقع) اللاعب local Marker = createMarker ( x, y, z, "corona", 5, 255, 0, 0, 170 ) -- إنشاء ماركر -- x,y,z مكان الماركر -- 5 حجم الماركر -- 255 اللون الاحمر -- 0 اللون الاخضر -- 0 اللون الازرق -- 170 الوضوح Vehicle = getPedOccupiedVehicle(getLocalPlayer()) -- اخذ سيارة اللاعب attachElements ( Marker, Vehicle, 0, 0, 0 ) -- ربط الماركر بالسيارة setElementVisibleTo ( Marker,root, true ) -- تمكين اللاعبين من رؤيه الماركر end end addEventHandler("onClientGUIClick", root,onClick) ملاحظة انا مبرمج مبتدىء هاذي مساعدة بسيطه لين يجي مبرمج محترف ويساعدك إذا لزم الامر
-
Wrong section, you was must put it in the following section : viewforum.php?f=104
-
والله الي جذبني انك كآتب صورة أسمي سورآ مو صورة !! وبالنسبة للفكرة مآدري
-
هنا برنامج جميل انا استخدمه http://notepad-plus-plus.org/ وايضا http://luaedit.sourceforge.net/download.html وايضا https://wiki.multitheftauto.com/wiki/MTASE وايضاً http://luaforwindows.googlecode.com/fil ... 1.4-45.exe
-
العفو You're welcome ^^