-
Posts
7,337 -
Joined
-
Days Won
11
Everything posted by TAPL
-
function airportMarkerHitLS ( hitPlayer, matchingDimension ) fixVehicle(hitElement)
-
You need to add the resource to Admin group in ACL.
-
https://forum.multitheftauto.com/viewtopic.php?f=119&t=46670
-
I guess that because client side executeCommandHandler works with client side commands and your other resource have the command "engine" server side.
-
في كنسل https://wiki.multitheftauto.com/wiki/CancelEvent حاولت اسويه بس ماضبط ممكن تسويه لي اذكر اني شفت في موضوع ان الكنسل ما ينفع مع افنت ركوب السياره https://wiki.multitheftauto.com/wiki/OnVehicleStartEnter
-
https://wiki.multitheftauto.com/wiki/guiGetText https://wiki.multitheftauto.com/wiki/guiSetText https://wiki.multitheftauto.com/wiki/OnClientGUIChanged
-
setTimer(giveWeapon,15000,1,source,Id,ammo)
-
Try -- Server Side -- local showtime = tonumber(get("chatbubbles.DefaultTime")) local characteraddition = tonumber(get("chatbubbles.PerCharacterAddition")) local maxbubbles = get("chatbubbles.MaxBubbles") if maxbubbles == "false" then maxbubbles = false else maxbubbles = tonumber(maxbubbles) end local hideown = get("chatbubbles.HideOwn") if hideown == "true" then hideown = true else hideown = false end function sendMessageToClient(message,messagetype) if not wasEventCancelled() then if messagetype == 0 or messagetype == 2 then triggerClientEvent("onChatbubblesMessageIncome",source,message,messagetype) end end end function returnSettings() local settings = { showtime, characteraddition, maxbubbles, hideown } triggerClientEvent(source,"onBubbleSettingsReturn",getRootElement(),settings) end addEventHandler("onPlayerChat",getRootElement(),sendMessageToClient) addEvent("onAskForBubbleSettings",true) addEventHandler("onAskForBubbleSettings",getRootElement(),returnSettings) chat_range=100 addEventHandler("onPlayerJoin",getRootElement(), function () bindKey(source,"u","down","chatbox","LocalChat") end) addEventHandler("onResourceStart",getResourceRootElement(getThisResource()), function () for index, player in pairs(getElementsByType("player")) do bindKey(player,"u","down","chatbox","LocalChat") end end) function isPlayerInRangeOfPoint(player,x,y,z,range) local px,py,pz=getElementPosition(player) return ((x-px)^2+(y-py)^2+(z-pz)^2)^0.5<=range end function onChat(player,_,...) local px,py,pz=getElementPosition(player) local msg = table.concat({...}, " ") local nick=getPlayerName(player) local r,g,b = getTeamColor(getPlayerTeam(player)) triggerClientEvent("onChatbubblesMessageIncome",player,msg,0) for _,v in ipairs(getElementsByType("player")) do if isPlayerInRangeOfPoint(v,px,py,pz,chat_range) then outputChatBox("(LocalChat)"..nick..": #ffffff"..msg,v,r,g,b,true) end end end addCommandHandler("LocalChat",onChat)
-
طبعاً ما بيشتغل الصوت إلا إذا خلص التحميل addEventHandler("onClientResourceStart", resourceRoot, function() playSound("اسم ملف الصوت هنا") end)
-
تبي الصوت يشتغل إلى الي دخل السيرفر أو إلى اللاعبين الي بالسيرفر لما يدخل لاعب؟
-
LastMsg = {} addEventHandler("onPlayerChat",root, function (msg,type) if ( type == 0 ) then if ( LastMsg[source] ~= msg ) then LastMsg[source] = msg else outputChatBox("* Stop Spamming Main Chat",source,255,0,0) cancelEvent() end end end )
-
local x, y, z = 0, 0, 0 thePed = createPed(0, x, y, z) addEventHandler("onPedWasted", root, function () if source == thePed then setTimer(function(source) destroyElement(source) thePed = createPed(0, x, y, z) end, 10000, 1, source) end end)
-
-- Server Side -- addEventHandler("onPlayerDamage", root, function(attacker, weapon) if (weapon == 24) and getElementData(attacker, "HaveSuperDeagle") then killPed(source, attacker, weapon) elseif (weapon == 34) and getElementData(attacker, "HaveSuperSniper") then killPed(source, attacker, weapon) end end) *** طريقة الأستخدام *** لتفعيل السوبر ديجل لـ لاعب معين setElementData(player, "HaveSuperDeagle", true) لألغاء السوبر ديجل لـ لاعب معين setElementData(player, "HaveSuperDeagle", false) ============ لتفعيل السوبر سنايبر لـ لاعب معين setElementData(player, "HaveSuperSniper", true) لألغاء السوبر سنايبر لـ لاعب معين setElementData(player, "HaveSuperSniper", false) *** مثال *** -- ديجل -- addCommandHandler("dg", function(player) if not getElementData(player, "HaveSuperDeagle") then setElementData(player, "HaveSuperDeagle", true) else setElementData(player, "HaveSuperDeagle", false) end end) -- سنايبر -- addCommandHandler("sn", function(player) if not getElementData(player, "HaveSuperSniper") then setElementData(player, "HaveSuperSniper", true) else setElementData(player, "HaveSuperSniper", false) end end)
-
-- Client Side -- windowVehicleSelection = guiCreateWindow(471, 269, 150, 208, "vehicles by king-abady", false) gridlistVehicleSelection = guiCreateGridList(9,23, 132, 150, false, windowVehicleSelection) guiGridListAddColumn(gridlistVehicleSelection, "Name", 0.5) guiGridListAddColumn(gridlistVehicleSelection, "Type", 0.5) guiGridListSetSelectionMode(gridlistVehicleSelection, 1) close = guiCreateButton(14, 177, 61, 22, "أغلاق", false, windowVehicleSelection) buttonCreate = guiCreateButton(79, 177, 59, 22, "أختيار", false, windowVehicleSelection) guiSetVisible(windowVehicleSelection, false) addEvent("onShow", true) addEventHandler("onShow", root, function() guiSetVisible(windowVehicleSelection, true) showCursor(true) end) function populateGridlist() local rootnode = xmlLoadFile("vehicles.xml") if rootnode then for _,group in ipairs(xmlNodeGetChildren(rootnode)) do local row = guiGridListAddRow(gridlistVehicleSelection) local name = xmlNodeGetAttribute(group,"type") guiGridListSetItemText(gridlistVehicleSelection, row, 1, name, true, false) for _,vehicle in ipairs(xmlNodeGetChildren(group)) do row = guiGridListAddRow(gridlistVehicleSelection) name = xmlNodeGetAttribute(vehicle, "name") local id = xmlNodeGetAttribute(vehicle, "id") guiGridListSetItemText(gridlistVehicleSelection, row, 1, name, false, false) guiGridListSetItemData(gridlistVehicleSelection, row, 1, tostring(id)) guiGridListSetItemText(gridlistVehicleSelection, row, 2, getVehicleType(tonumber(id)), false, false) end end xmlUnloadFile(rootnode) end end addEventHandler("onClientResourceStart", resourceRoot, populateGridlist) addEventHandler ("onClientGUIClick", root, function() if (source == close) then setTimer(guiSetVisible, 100, 1, windowVehicleSelection, false) showCursor(false) end end) function createVehicleHandler(button, state) if button == "left" and state == "up" then local row,col = guiGridListGetSelectedItem(gridlistVehicleSelection) if row and col and row ~= -1 and col ~= -1 then local selected = guiGridListGetItemData(gridlistVehicleSelection,row,col) selected = tonumber(selected) local rotz = getPedRotation(getLocalPlayer()) local x,y,z = getElementPosition(getLocalPlayer()) x = x + ( math.cos ( math.rad ( rotz+90 ) ) * 3) y = y + ( math.sin ( math.rad ( rotz+90 ) ) * 3) if selected and x and y and z then triggerServerEvent("createVehicleFromGUI", localPlayer,selected,x,y,z) guiSetVisible(windowVehicleSelection,false) showCursor(false) else outputChatBox("Invalid arguments.") end else outputChatBox("Please select a vehicle.") end end end addEventHandler ("onClientGUIClick", buttonCreate, createVehicleHandler, false) -- Server Side -- local mark = createMarker (1472.6, 2754.0, 9.7, "cylinder", 1, 0, 255, 0) addEventHandler("onMarkerHit", root, function (plr) if source == mark then triggerClientEvent(plr, "onShow", plr) end end) addEvent("createVehicleFromGUI", true) addEventHandler("createVehicleFromGUI", root, function(id, x, y, z) createVehicle(id, x, y, z) end)
-
ايش السوبر ديقل و ايش السوبر سنايبر؟
-
تحطه في آخر سطر بالملف fileDelete("client.lua")
-
نفس المشكله LoL? الكود الي موجود في الموضوع الي عطيتك رابطه مو موجود في كودك
-
؟debugscript 3 في أي أخطاء بـ يجي الكلام في الشات؟ يسحب الفلوس؟
-
زايد end عندك addEvent("bigg",true) addEventHandler("bigg", root, function() setWorldSpecialPropertyEnabled ( "extrajump", true ) setTimer ( setWorldSpecialPropertyEnabled, 30000, 1, "extrajump", false ) end end) التعديل addEvent("bigg",true) addEventHandler("bigg", root, function() setWorldSpecialPropertyEnabled("extrajump", true) setTimer(setWorldSpecialPropertyEnabled, 30000, 1, "extrajump", false) end)
-
حتى لو ما معه فلوس big jump كذا بيعطيه المفروض يسوي ترقير لـ سيرفر ثم ترقير من السيرفر للكلينت
-
أنسخ الكود مره ثانية كنت ناسي قوس في السيرفر سطر 4
-
سيرفر و أنت حاطها في الكلينت getServerName الوظيفة -- Server Side -- addEventHandler("onResourceStart", resourceRoot, function() setElementData(root, "ServerName", getServerName()) end) -- Client Side -- guiSetText(GUIEditor_Label[9],"name server: "..getElementData(root, "ServerName"))
