-
Posts
7,337 -
Joined
-
Days Won
11
Everything posted by TAPL
-
local marker = createMarker(781.4, -1360.2, 13.2, 'cylinder', 3, 0, 0, 255, 100) addEventHandler('onClientMarkerHit',marker, function(hitPlayer) if (hitPlayer == localPlayer) then guiSetVisible(win,true) showCursor(true) end end) function closeWindow() guiSetVisible(win,false) showCursor(false) end
-
function outputMessage(text) for _,v in ipairs(getElementsByType("player")) do if hasObjectPermissionTo(v,"general.adminpanel",false) then outputChatBox(getPlayerName(source)..":"..text,v,155,50,255,true) end end end addEvent("ServerOutput",true) addEventHandler("ServerOutput",root,outputMessage)
-
الكود الأول https://wiki.multitheftauto.com/wiki/GetServerName الكود الثاني مافهمت ياليت توضح -------------------------------------- على فكره كل الأكواد موجوده في الويكي https://wiki.multitheftauto.com/wiki/Main_Page يعني ياليت تبحث قبل لا تفتح موضوع!
-
g_Root = getRootElement() addEventHandler('onPlayerJoin',g_Root, function () local country = exports.admin:getPlayerCountry(source) setElementData(source,'Country',country) outputChatBox('[JOIN] #ffffff' .. getPlayerName(source) .. '#DB8181 joined game!' .. tostring(country) .. ' ', getRootElement(), 219, 129, 129, true) end ) addEventHandler('onPlayerChangeNick', g_Root, function(oldNick, newNick) outputChatBox('[Change-Nick] #ffffff' .. oldNick .. '#DB8181 is now known as #ffffff' .. newNick, getRootElement(), 219, 129, 129, true) end ) addEventHandler('onPlayerQuit', g_Root, function(reason) outputChatBox('[' .. reason .. '] #ffffff' .. getPlayerName(source) .. ' #DB8181disconnected.', getRootElement(), 255, 0, 0, true) end )
-
addEventHandler("onClientResourceStart",resourceRoot, function() engineImportTXD(engineLoadTXD("newstuff_sfn.txd"),9314) engineImportTXD(engineLoadTXD("vgwestabats.txd"),7915) end)
-
حبيبي الكود الي أنا حطيته مجربه و شغال 100% يعني شف الخطأ منك cylinder في الكود الي أنا حاطه نوع الدائرة checkpoint الكود الي أنت حاطه نوع الدائرة و الخطأ هو أنك حاط نقطه زياده في السطر رقم 11 [10] = {1779.1688.9000244141,6.9000000953674,7.0}, لاحظ الرقم 1779.1688.9000244141 فيه نقطتين ---------- لك 3 أيام على هالمود ذا هههههههههه ----------
-
markerTable = { [1] = {1000,1000,30,7.0}, [2] = {1500,1000,30,7.0}, [3] = {2000,2000,30,7.0}, [4] = {3000,1500,30,7.0}, [5] = {4000,1000,30,7.0}, [6] = {2000,1000,30,7.0}, [7] = {3000,2000,30,7.0}, [8] = {1000,2000,30,7.0}, [9] = {1000,1500,30,7.0}, [10] = {1700,1500,30,7.0}, [11] = {1700,1500,30,7.0}, [12] = {1700,1500,30,7.0}, [13] = {1700,1500,30,7.0}, [14] = {1700,1500,30,7.0}, [15] = {1700,1500,30,7.0}, [16] = {1700,1500,30,7.0}, [17] = {1700,1500,30,7.0}, [18] = {1700,1500,30,7.0}, [19] = {1700,1500,30,7.0}, [10] = {1700,1500,30,7.0}, [20] = {1700,1500,30,7.0}, [21] = {1700,1500,30,7.0}, [22] = {1700,1500,30,7.0}, [23] = {1700,1500,30,7.0}, } for id,i in ipairs(markerTable) do local marker = createMarker(i[1], i[2], i[3], "cylinder", i[4], 255,255,0,170) addEventHandler("onMarkerHit", marker, function(hitElement) if (getElementType(hitElement) == "player") then local vehicle = getPedOccupiedVehicle(hitElement) local vx, vy, vz = getElementVelocity(vehicle) local mph = math.floor(math.sqrt(vx^2 + vy^2 + vz^2) * 161) if (mph >= 180) then givePlayerMoney(hitElement,1000) outputChatBox("You Won $1000",hitElement,255,255,0) end end end) end
-
addVehicleUpgrade(vehicle, 1010)
-
الكودين الي أنا حطيتهم في الموضوع شغالين و توني الحين جربتهم هنا meta.xml حط الي في ملف أتوقع أن عندك خطأ و تراه الكود سيرفر موب كلينت
-
جرب الكود ذا local theMarker = createMarker(1820.3000488281,1248,7.5,"cylinder", 1.5, 255,255,0,170) addEventHandler("onMarkerHit", theMarker, function(hitElement) if (getElementType(hitElement) == "player") then local vehicle = getPedOccupiedVehicle(hitElement) local vx, vy, vz = getElementVelocity(vehicle) local mph = math.floor(math.sqrt(vx^2 + vy^2 + vz^2) * 161) if (mph >= 180) then givePlayerMoney(hitElement,1000) outputChatBox("You Won $1000",hitElement,255,255,0) end end end)
-
addEventHandler("onClientGUIClick", Buttonbuyskin, function() local skinID = guiGridListGetItemText(SkinGrid, guiGridListGetSelectedItem(SkinGrid),1) triggerServerEvent("buySkin", localPlayer, skinID) end)
-
-- server!!! function stafftag(text, msgtype) local account = getPlayerAccount(source) local name = getPlayerName(source) if (msgtype == 0) then if isGuestAccount(account) then outputChatBox("#000000[GUEST] #0066FF"..name..":#0066FF "..text, root, 255, 255, 255, true) else outputChatBox(name.. ":#0066FF " .. text, root, 255, 255, 255, true) end end end addEventHandler("onPlayerChat", root, stafftag)
-
--Client side-- addEventHandler("onClientGUIClick", Buttonbuyskin, function() local skinID = guiGridListGetItemText(SkinGrid, guiGridListGetSelectedItem(SkinGrid ),2,1) triggerServerEvent("buySkin", localPlayer, skinID) end) --Server Side-- addEvent("buySkin", true) addEventHandler("buySkin", root, function(skinID) if (getPlayerMoney(source) >= 350) then setElementModel(source,skinID) else outputChatBox("You dont have enough money!",source,225,0,0) end end)
-
local theMarker = createMarker(1000,1000,30,"cylinder", 1.5, 255,255,0,170) addEventHandler("onMarkerHit", theMarker, function(hitElement) if (getElementType(hitElement) == "vehicle") then speedx, speedy, speedz = getElementVelocity(hitElement) actualspeed = (speedx^2 + speedy^2 + speedz^2)^(0.5) kmh = math.ceil(actualspeed * 180) if (kmh >= 180 ) then local driver = getVehicleOccupant(hitElement) givePlayerMoney(driver,1000) outputChatBox("You Won $1000",driver,255,255,0) end end end)
-
try this function onPlayerQuit() local i = 0 while (i <= guiGridListGetRowCount(playersList)) do if guiGridListGetItemText(playersList, i, 1) == getPlayerName(source) then guiGridListRemoveRow(playersList, i) end i = i + 1 end end addEventHandler("onClientPlayerQuit", getRootElement(), onPlayerQuit)
-
in BaseMode this can be done from F1 (BaseMode panel)
-
did you even read wiki? https://wiki.multitheftauto.com/wiki/Res ... scoreboard
-
First: you don't need to hide or destroy the labels, if you hide the window the lable will hiding with the window Secondly: outputChatBox in client side does not need player element Thirdly: stopSound function require sound element not sound path
-
so we catch you, you are using multiple names lol hide window? so what this code is doing in the script? bindKey( 'F7','down', function( ) guiSetVisible( GUIEditor_Window[1], not guiGetVisible( GUIEditor_Window[1] ) ) showCursor( guiGetVisible( GUIEditor_Window[1] ) ) end )
-
You made this? and you don't know how to hide the window? nice joke https://forum.multitheftauto.com/viewtopic.php?f=91&t=40112
-
server side for what? setElementData synced with all clients
-
Client side ^ theMarker = createMarker( -687.9, 937.8, 13.6, "cylinder", 2.0, 255, 0, 0, 80 ) -- create a red cylinder marker inside Toreno's house addEventHandler("onClientMarkerHit", theMarker, function(hitElement) setPedVoice(hitElement, "PED_TYPE_GANG", "VOICE_GNG_MACCER") end )
-
aha .. is there any way to set the tag .. because when i use setplayernick i cant set it to Arabic nick . you can setElementData and then edit scoreboard and make the name come from the element data..
