-
Posts
7,337 -
Joined
-
Days Won
11
Everything posted by TAPL
-
Tested and working. -- Server Side -- radar = createRadarArea(2418.4255371094, -1735,121.6306152344,100,0,150,0,153) setElementData(radar,"zombieProof",true) staffZone = createColRectangle (2418.4255371094, -1735,121.6306152344,100) addEventHandler("onColShapeHit", staffZone, function(h) if not isElement(h) then return end if getElementData(h,"zombie") then killPed(h) end end) function enterArea(thePlayer) local posX, posY = getElementPosition(thePlayer) local inArea = isInsideRadarArea(radar, posX, posY) if (inArea) then if hasObjectPermissionTo(thePlayer, "command.slap", false) then outputChatBox("Welcome to the StaffZone", thePlayer, 0, 255, 0, true) else triggerClientEvent(thePlayer, "displayTimer", thePlayer) end end end addEventHandler("onColShapeHit", staffZone, enterArea) function warp() local posX, posY = getElementPosition(source) local inArea = isInsideRadarArea(radar, posX, posY) if (inArea) then if hasObjectPermissionTo(source, "command.slap", false) then outputChatBox("Welcome to the StaffZone", source, 0, 255, 0, true) else outputChatBox("You are not allowed in this area, Sorry...", source, 255, 0, 0, true) outputChatBox("You have been warped.", source, 255, 0, 0, true) setElementPosition(source, 2341.2072753906, -1658.8668212891, 13.379216194153) end end end addEvent("warp", true) addEventHandler("warp", root, warp) -- Client Side -- addEvent("displayTimer", true) addEventHandler("displayTimer", root, function() addEventHandler("onClientRender", root, draw) if isTimer(timer) then killTimer(timer) end timer = setTimer(function() removeEventHandler("onClientRender", root, draw) triggerServerEvent("warp", localPlayer) end,10000,1) end) function draw() if isTimer(timer) then local timeLeft = math.ceil(getTimerDetails(timer) / 1000) dxDrawText("To leave this area!",557.0,318.0,872.0,368.0,tocolor(255,0,0,255),2.0,"default","left","top",false,false,false) dxDrawText(tostring(timeLeft),630.0,277.0,690.0,324.0,tocolor(255,0,0,255),3.0,"default","left","top",false,false,false) dxDrawText("You have: ",546.0,224.0,725.0,271.0,tocolor(255,0,0,255),4.0,"default","left","top",false,false,false) end end -- meta.xml --
-
where is the client in meta? and your server side have some errors..
-
show server side. and show meta.xml
-
addEvent("displayTimer", true) addEventHandler("displayTimer", root, function() addEventHandler("onClientRender", root, draw) if isTimer(timer) then killTimer(timer) end timer = setTimer(function() removeEventHandler("onClientRender", root, draw) triggerServerEvent("warp", localPlayer) end,10000,1) end) function draw() if isTimer(timer) then local timeLeft = (getTimerDetails(timer) / 1000) dxDrawText("To leave this area!",557.0,318.0,872.0,368.0,tocolor(255,0,0,255),2.0,"default","left","top",false,false,false) dxDrawText(tostring(timeLeft),630.0,277.0,690.0,324.0,tocolor(255,0,0,255),3.0,"default","left","top",false,false,false) dxDrawText("You have: ",546.0,224.0,725.0,271.0,tocolor(255,0,0,255),4.0,"default","left","top",false,false,false) end end
-
lol? these images i take it from TXDWorkshop and i've try your script and yeah i got crash but i changed it to replace Fire Extinguisher and i didn't get crash anymore if you are angry, feel free to angry from yourself.
-
setElementData getElementData and you will be able to make 9564466534417454556674456546156587445614556 wanted levels.
-
radar = createRadarArea(2418.4255371094, -1735,121.6306152344,100,0,150,0,153) setElementData(radar,"zombieProof",true) staffZone = createColRectangle (2418.4255371094, -1735,121.6306152344,100) addEventHandler("onColShapeHit", staffZone, function(h) if not isElement(h) then return end if getElementData(h,"zombie") then killPed(h) end end) function enterArea(thePlayer) local posX, posY = getElementPosition(thePlayer) local inArea = isInsideRadarArea(radar, posX, posY) if (inArea) then if hasObjectPermissionTo(thePlayer, "command.slap") then outputChatBox("Welcome to the StaffZone", thePlayer, 0, 255, 0, true) else outputChatBox("You are not allowed in this area, Sorry...", thePlayer, 255, 0, 0, true) outputChatBox("You are being warped.", thePlayer, 255, 0, 0, true) setElementPosition(thePlayer, 2341.2072753906, -1658.8668212891, 13.379216194153) end end end addEventHandler("onColShapeHit", staffZone, enterArea)
-
local screenX, screenY = guiGetScreenSize() local width, height = 400, 400 local x = (screenX/2) - (width/2) local y = (screenY/2) - (height/2) theWindow = guiCreateWindow(x,y,width,height,"Info-Box",false) guiWindowSetSizable(theWindow,false) guiSetVisible(theWindow, false) memo1 = guiCreateMemo (0.15,0.15,0.7,0.5,"Welcome on GlobalGaming",true,theWindow) help_window_main_button_decline = guiCreateButton(0.15,0.5,0.2,0.2,"LS",true,theWindow) function onClientGUIClick() if source == help_window_main_button_decline then setElementPosition(localPlayer, 1187, -1323, 15) end end addEventHandler("onClientGUIClick",root,onClientGUIClick) function menuShow () guiSetVisible (theWindow, not guiGetVisible(theWindow)) showCursor(guiGetVisible(theWindow)) end bindKey("F1", "down", menuShow)
-
You call this Cane? dude you are trying to replace Cane with Fire Extinguisher txd and dff file.
-
What is uncoded ? and how to change it to UTF-8 ? with Notepad: File > Save As > Encoding: UTF-8 > Save done.
-
I've never saw a meta file look like this i don't know if your work or not, but try this if not work Please upload your script at mediafire.
-
https://community.multitheftauto.com/ind ... ls&id=3090
-
Your problem not in the code the problem from the encoded change it to UTF-8 and it will work just fine.
-
لول؟ و من متى تقدر تحذف كود من ملف مشفر
-
ياليت تقول لنا وش الي أنفك الحين بالصوره ما فيه أي كود مفكوك وش يشلع R2? R14? dxDrawText? tocolor? !!!!!!!!!!!!!!!!!!!!!!!!فهمني بالله وش الي أنفك
-
أكرر إذا حطيته بآخر سطر بينفك الملف تقريباً نصه أما إذا حطيته بأول سطر ما بينفك من الملف شي
-
أنت لو تلاحظ الكود بتشوف أنه معقد و بالتالي برنامج فك التشفير يتعقد و ما يقدر يفكه
-
استخدم هالكود https://wiki.multitheftauto.com/wiki/DxDrawColorText وحطه في اي سطر في السكربت بس من الافضل تحطه آخر سطر في السكربت no way لازم تحطه بأول سطر
-
getAccounts -- جلب جميع الحسابات في السيرفر getAccountData -- إذا ما تعرف أيش ذا يسوي فأحسن شي تسويه تترك البرمجه لأهلها table.sort -- ترتيب الأرقام في الجداول على حسب الطلب مثلاً من الكبير إلى الصغير أو من الصغير إلى الكبير
-
getAccounts getAccountData table.sort
-
oops, forgot about the client the money and setting the team work 100% local marker = createMarker(1734.7218017578, 1993.3072509766, 10, "Cylinder",2,6,183,248,153) GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} local x,y = guiGetScreenSize() windowjob = guiCreateWindow(x/2-150,y/2-199,301,397,"Car Jacker job",false) guiSetVisible(windowjob, false) GUIEditor_Button[1] = guiCreateButton(22,352,108,35,"Take job",false,windowjob) GUIEditor_Label[1] = guiCreateLabel(193,-103,5,5,"",false,windowjob) GUIEditor_Button[2] = guiCreateButton(179,352,110,36,"Cancel",false,windowjob) GUIEditor_Memo[1] = guiCreateMemo(19,33,273,215,"To take Car Jacker team job, press Take job.\n\nIf you don't want to, press Cancel.",false,windowjob) function Medicjob(hitElement) if getElementType(hitElement) == "player" and hitElement == localPlayer then if not guiGetVisible(windowjob) then guiSetVisible(windowjob, true) showCursor(true) end end end addEventHandler("onClientMarkerHit", marker, Medicjob) function Medicjobleave(leaveElement) if getElementType(leaveElement) == "player" and leaveElement == localPlayer then if guiGetVisible(windowjob) then guiSetVisible(windowjob, false) showCursor(false) end end end addEventHandler("onClientMarkerLeave", marker, Medicjobleave) function joinTeam() triggerServerEvent("setMedic",localPlayer) guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[1] , joinTeam, false) function removeMedicWindow() guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[2] , removeMedicWindow, false)
-
-- Client Side -- local marker = createMarker(1734.7218017578, 1993.3072509766, 10, "Cylinder",2,6,183,248,153) GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} local x,y = guiGetScreenSize() windowjob = guiCreateWindow(x/2-150,y/2-199,301,397,"Car Jacker job",false) guiSetVisible(windowjob, false) GUIEditor_Button[1] = guiCreateButton(22,352,108,35,"Take job",false,windowjob) GUIEditor_Label[1] = guiCreateLabel(193,-103,5,5,"",false,windowjob) GUIEditor_Button[2] = guiCreateButton(179,352,110,36,"Cancel",false,windowjob) GUIEditor_Memo[1] = guiCreateMemo(19,33,273,215,"To take Car Jacker team job, press Take job.\n\nIf you don't want to, press Cancel.",false,windowjob) function Medicjob(hitElement) if getElementType(hitElement) == "player" then if not guiGetVisible(windowjob) then guiSetVisible(windowjob, true) showCursor(true) end end end addEventHandler("onClientMarkerHit", marker, Medicjob) function Medicjobleave(leaveElement) if getElementType(leaveElement) == "player" then if guiGetVisible(windowjob) then guiSetVisible(windowjob, false) showCursor(false) end end end addEventHandler("onClientMarkerLeave", marker, Medicjobleave) function joinTeam() triggerServerEvent("setMedic",localPlayer) guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[1] , joinTeam, false) function removeMedicWindow() guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[2] , removeMedicWindow, false) -- Server Side -- theMarker = createMarker(1728.0740966797, 2010.6652832031, 10, "cylinder", 2, 255, 255, 0, 170) theTeam = createTeam("Car Jackers") local coordinates = { {1725.9757080078, 1946.7092285156, 10, 0, 0, 0}, {1747.3811035156, 1980.2396240234, 10, 0, 0, 0} } local IDS = { { 402 }, { 542 }, { 603 }, { 475 }, { 576 }, { 575 }, { 567 } } function getRandomCoordinates() return unpack(coordinates[math.random(#coordinates)]) end function getRandomCoordinates1() return unpack(IDS[math.random(#IDS)]) end veh = {} function joinMedic() setPlayerTeam(source, theTeam) setElementModel(source,293) setElementData(source, "Occupation", "Car Jacker", true) outputChatBox("You are now Car Jacker.",source,0,255,0) x, y, z, rx, ry, rz = getRandomCoordinates() ID = getRandomCoordinates1() if isElement(veh[source]) then destroyElement(veh[source]) veh[source] = nil end veh[source] = createVehicle(ID, x, y, z, rx, ry, rz ) end addEvent("setMedic", true) addEventHandler("setMedic",root,joinMedic) function spawnveh(player) if (getElementType(player) == "player") then theVehicle = getPedOccupiedVehicle(player) if (theVehicle and theVehicle == veh[player]) then destroyElement (veh[player]) veh[player] = nil givePlayerMoney(player, 10000) outputChatBox("You have sold your stolen car",player,0,255,0) else outputChatBox("You do not have the Vehicle!", player,255,0,0,true) end end end addEventHandler("onMarkerHit", theMarker, spawnveh) function destroyCar() for i, player in ipairs (getElementsByType("player")) do if veh[player] == source then veh[player] = nil end end setTimer(destroyElement,3500,1,source) end addEventHandler("onVehicleExplode", root, destroyCar) addEventHandler("onPlayerQuit",root, function() if isElement(veh[source]) then destroyElement(veh[source]) veh[source] = nil end end)
-
بس تحتاج تعدل على كل المودات الي تبيه يجي فيها GridList تقدر تضيف أي شي في أما تضيفه في اللسته لما أحد يضغط على أسم السيرفر ذي غير ممكن
-
This won't work in this way function deleteCar ( ) if ( isVehicleBlown ( theCar ) ) then destroyElement ( theCar ) end end You should use event onVehicleExplode and This triggerClientEvent ( "sellcar", localPlayer) should be: triggerClientEvent(hitElement, "sellcar", hitElement) and still i don't understand why you give the money client side? and i don't see where function createMedicTeam begin called.
