-
Posts
7,337 -
Joined
-
Days Won
11
Everything posted by TAPL
-
Try createBlip(2035.1999511719, -1406.5, 16.200000762939, 22) MedicTeam = createTeam ("Medic", 6, 183, 248) ambulancee = createMarker(2001, -1407.1999511719, 15.89999961853, "cylinder", 1.5, 0, 255,255, 255) -- Creates a marker in the center of the map setElementVisibleTo(ambulancee, root, false) function joinMedic() setPlayerTeam(source,MedicTeam) setElementVisibleTo(ambulancee, source, true) setElementModel(source,276) giveWeapon(source, 41, 999) setElementData(source, "Occupation", "Medic") outputChatBox("You are now Medic.", source, 0,255,0) end addEvent("setMedic", true) addEventHandler("setMedic",root,joinMedic) addEvent("medic:healing", true) addEventHandler("medic:healing", root, function (medic) if (getElementHealth(source) < 100) then local Heal = getElementHealth(source) + 10 setElementHealth(source, Heal) if (Heal > 100) then setElementHealth(source, 100) end givePlayerMoney(medic, 100) takePlayerMoney(source, 100) end end) local jobVehicles = {} addEventHandler("onMarkerHit", ambulancee, function(hitElement) if (getElementType(hitElement) ~= "player") then return end local x, y, z = getElementPosition(hitElement) local team = getPlayerTeam(hitElement) if(isPedInVehicle(hitElement)) then return end if (isElement(jobVehicles[hitElement])) then destroyElement(jobVehicles[hitElement]) end if (team and getTeamName(team) == "Medic") then jobVehicles[hitElement] = createVehicle(416, x, y, z, 0, 0, -90) setTimer(warpPedIntoVehicle, 250, 1, hitElement, jobVehicles[hitElement]) end end)
-
https://wiki.multitheftauto.com/wiki/Resource:Customblips https://community.multitheftauto.com/index.php?p=resources&s=details&id=960
-
it's client side, so the server has nothing to do with it. I am using MTA 1.3.1 r4654 idk if the old version have this problem Try the latest patch of MTA:SA https://nightly.multitheftauto.com/?mtasa-1.3.1-rc-latest
-
Work with me, my screen become black.
-
There no bug, it worked fine with me. You must have did something wrong, check yourself.
-
Work with me.
-
Maybe post the code that doesn't work with you?
-
really? What does debugscript 3 say?
-
Where is or 0 ? so this is line 16 local getMapsPlayed2 = tonumber(getMapsPlayed) + 1 i guess getMapsPlayed is return false/nil Change this local getMapsPlayed = getAccountData ( getPlayerAcc, "MapsPlayed" ) to local getMapsPlayed = getAccountData ( getPlayerAcc, "MapsPlayed" ) or 0
-
Post all code in file Stats.lua
-
https://forum.multitheftauto.com/viewtopic.php?f=91&t=47535&p=471798 https://community.multitheftauto.com/index.php?p=resources&s=details&id=5613
-
https://wiki.multitheftauto.com/wiki/GetDistanceBetweenPoints3D
-
Your problem is getAccountData return nil/false i suggest to try this put (or 0) for every getAccountData Example: This local getMapsPlayed = getAccountData ( getPlayerAcc, "MapsPlayed" ) Will be local getMapsPlayed = getAccountData ( getPlayerAcc, "MapsPlayed" ) or 0
-
local screenWidth, screenHeight = guiGetScreenSize() local time = 8000 local killedName = "" function copter () dxDrawText(killedName, 44, screenHeight - 43, screenWidth, screenHeight, tocolor (255, 255, 255, 255), 1, "pricedown") end addEventHandler("onClientRender", root, copter) addEventHandler("onClientPlayerHeliKilled", root, function () killedName = getPlayerName(source) setTimer(function() killedName = "" end, time, 1) end)
-
You didn't understanding what Solid said. There no need for server side. The function that Solid has post it, made to use in client side.
-
Please explain what you want to do exactly.
-
attempt to concatenate local 'target' (a userdata value)
TAPL replied to ertlflorian1's topic in Scripting
You're welcome. -
attempt to concatenate local 'target' (a userdata value)
TAPL replied to ertlflorian1's topic in Scripting
function tie(thePlayer,cmd,target) if getPedOccupiedVehicleSeat(thePlayer) == 0 then local fac = getElementData (thePlayer, "Fraktion") if (fac == 1) or (fac == 5) or (fac == 4) then local target = getPlayerFromName (target) if target then if getPedOccupiedVehicle(target) == getPedOccupiedVehicle(thePlayer) then if getElementData(target,"tied") == false then setElementFrozen(target,true) toggleAllControls(target,false,true,false) setElementData(target,"tied",true) outputChatBox("Du hast "..getPlayerName(target).." gefesselt", thePlayer, 0, 0, 255) outputChatBox("Du wurdest von "..getPlayerName(thePlayer).." gefesselt", target, 0, 0, 255) elseif getElementData(target,"tied") == true then setElementFrozen(target,false) toggleAllControls(target,true,true,false) setElementData(target,"tied",false) outputChatBox("Du hast "..getPlayerName(target).." entfesselt", thePlayer, 0, 0, 255) outputChatBox("Du wurdest von "..getPlayerName(thePlayer).." entfesselt", target, 0, 0, 255) else end end end end end end addCommandHandler("tie",tie) -
-_-"""""" Wnds1 = guiCreateStaticImage(72,59,480,426,"Wnds.png",false,windows) --------------------Tap1 m1 = guiCreateStaticImage(0,62,71,77,"Button.png",false,windows) infolable1 = guiCreateLabel(20,25,71,77,"Info",false,m1) addEventHandler("onClientMouseEnter",getRootElement(), function () if ( source == m1 ) then guiSetVisible(Wnds1,true) guiSetVisible(Wnds2,false) guiSetVisible(Wnds3,false) guiSetVisible(Wnds4,false) playSound("button.wav") end end ) Wnds2 = guiCreateStaticImage(72,59,480,426,"Wnds.png",false,windows) guiSetVisible(Wnds2,false) -----Tap2 m2 = guiCreateStaticImage(1,150,71,77,"Button1.png",false,windows) infolable1 = guiCreateLabel(20,25,71,77,"weapon",false,m2) guiLabelSetColor(infolable1,255,255,0) addEventHandler("onClientMouseEnter",getRootElement(), function () if ( source == m2 ) then guiSetVisible(Wnds1,false) guiSetVisible(Wnds2,true) guiSetVisible(Wnds3,false) guiSetVisible(Wnds4,false) playSound("button.wav") end end )
-
نفترض أنك بالتاب الأول و تبي تروح التاب الثاني addEventHandler("onClientMouseEnter",getRootElement(), function () if ( source == m2 ) then guiSetVisible(Wnds1,false) -- بالأول تخفي التاب الأول guiSetVisible(Wnds2,true) -- ثم تظهر التاب الثاني playSound("button.wav") end end )
-
بالعكس تضحك على نفسك يا الفاشل ماخذ الكود و ماسح منه مسافات و تقول جرب هذا؟ أستريح بس
-
LoL المشكلة يا عزيزي أنك ما أخفيت التاب الأول فمثلاً إذا كنت بالتاب الثالث و تبي تروح إلى التاب الأول لازم تخفي التاب الثالث و بعدها تظهر التاب الأول
