-
Posts
346 -
Joined
-
Last visited
-
Days Won
1
Posts posted by roaddog
-
-
Idk if this what you want but
store it in a table and then use
https://wiki.multitheftauto.com/wiki/ToJSON
-
-
hahahahhahaha yeah right
-
brooo, how to download
- 1
-
-
nice work!
- 1
-
how to mine claudecoins xd
-
you need to create a function to update it.
like update the thing when you open the panel for example
yeah you dont need to use guiGridListClear if the row always 2
just update the value of that
- 1
-
okayy show me how you add the kill to the table
it should be check topKillers[key][1] == name and then topKillers[key][2] = topKillers[key][2] + 1
-
how your table looks like?
tkill = {{"aa", 10}, {"bb", 2}, {"cc", 5}} -- Sort the table from high to low table.sort(tkill, function (a, b) return a[2] > b[2] end) for i, v in pairs(tkill) do print(v[1], v[2]) end -- This will result: -- aa, 10 -- cc, 5 -- bb, 2 function getKeyFromVal(name) if (not name) then return false end for i, v in pairs(tkill) do if (v[1] == name) then return i end end return false end function addkill(name, num) if (not name or not num) then return false end local key = getKeyFromVal(name) tkill[key][2] = tkill[key][2] + num end -- we add 6 kill to the "bb" addkill("bb", 6) -- sort again table.sort(tkill, function (a, b) return a[2] > b[2] end) for i, v in pairs(tkill) do print(v[1], v[2]) end --This will result -- aa, 10 -- bb, 8 -- cc, 5
-
then you have to call table.sort everytime you add new data
-
addEventHandler("onMarkerHit", meslekbitis_marker2, meslekbitis)
move ^ line to
function ikincimeslek(oyuncu) if oyuncu then if isElement(kargo_arac[oyuncu]) then destroyElement(meslekbitis_marker) destroyElement(kargobitis_blips) outputChatBox("#9ACD32[Kargo Mesleği]: #FFFFFFKargoların indirililiyor, ücretiniz almak için kargo dağıtım merkezine geri dön.",oyuncu,255,255,255,true) meslekbitis_marker2 = createMarker(-62.74648, -1111.28027, 1.07812, "checkpoint", 2.5 , 255, 185, 15) addEventHandler("onMarkerHit", meslekbitis_marker2, meslekbitis) end end end
-
On 05/09/2022 at 13:07, Anthony46 said:
But in which folder can you find that file
again we cant really assume your file that causing this problem. what resource is that?
im not a wizard
-
bro I’m not wizard but I can sense that you done something (destroyElement probably) upon onVehicleExit or onPlayerVehicleExit trigger.
Post the code
- 1
-
3 hours ago, Grand_merreda said:
is possible to create a script that we can put any car freezed inside Andromeda and do transport in the game to do Transport?
if yes please help me im breaking my head finding any script for that and many tries making one.
yes
https://wiki.multitheftauto.com/wiki/AttachElements
you just got to play with x, y, z offsets.
-
Create your own panel with guiStaticImage or via guieditor
--Client
panel = guiCreateStaticImage( 20, 200, 100, 100, "imagename.png", false) button1 = guiCreateStaticImage( 10, 20, 20, 20, "imagename.png", false, panel) addEventHandler("onClientGUIClick", button1, transportToOne, false) function showTransportPanels() if (not guiGetVisible(panel)) then guiSetVisible(panel, true) showCursor(true) end end addEvent("showTransportPanel", true) addEventHandler("showTransportPanel", root, showTransportPanels) function transportToOne(btn, st) if (btn ~= "left" or st ~= "up") then if (guiGetVisible(panel)) then guiSetVisible(panel, false) showCursor(false) end triggerServerEvent("transportPlayerTo", resourceRoot, 1) end end
--Server
local playerMarker = createMarker(0, 0, 2, "cylinder", 5, 10, 244, 23, 200, root) function handlePlayerMarker(hitElement, matchingDim) local elementType = getElementType(hitElement) if (elementType ~= "player" or not matchingDim or isPedInVehicle(hitElement)) then return false end triggerClientEvent(hitElement, "showTransportPanel", hitElement) end addEventHandler("onMarkerHit", playerMarker, handlePlayerMarker) function transportPlayerTo(place) if (place == 1) then fadeCamera(client, false, 1) setElementPosition(client, x, y, z) setTimer(fadeCamera, 1000, 1, client, true) end end addEvent("transportPlayerTo", true) addEventHandler("transportPlayerTo", resourceRoot, transportPlayerTo)
untested but you can figure it out by yourself
- 1
-
https://wiki.multitheftauto.com/wiki/OnVehicleStartEnter
use this and do
if (seat == 0) then cancelEvent() outputChatBox("Unable to enter driver seat", player, 255, 25, 25) end
-
yeah for sureee
-
On 17/08/2022 at 19:19, Itzmeitachi said:
HI CAN YOU HELP ME OUT WITH INCREASE A CAR SPEED AND HANDLING
here you got variety of example
there’s max velocity too
https://wiki.multitheftauto.com/wiki/SetVehicleHandling
have a good read
-
6 hours ago, Sendy said:
But how i Can detect if my ped is hit by water Can?
local cPed = createPed(0, x, y, z) function outputPlayerHitByWater(thePed) local attacker = getVehicleOccupant(source) if (thePed == cPed and getElementType(thePed) == "ped") then killPed ( thePed, attacker, 56, 9, false) end end addEventHandler("onClientPedHitByWaterCannon", getRootElement(), outputPlayerHitByWater)
-
-
18 hours ago, zezim said:
i wanna get all money in the hands
do this
local value = getPlayerMoney(receiver) takePlayerMoney(receiver, value)
-
7 hours ago, Firespider said:
addEvent("car", true) addEventHandler("car", root, function() if isElement(vehicle[source]) then destroyElement(vehicle[source]) end local x, y, z = getElementPosition(source) vehicle[source] = createVehicle(599, x, y, z) --599 is the vehicle's hands. Put any vehicle you want warpPedIntoVehicle(source, vehicle[source]) playerMarker = createMarker(341.64114379883, -1351.6920166016, 14.5078125, "cylinder", 1, 10, 244, 23, 200) addEventHandler("onMarkerHit", playerMarker, handlePlayerMarker) end) function handlePlayerMarker(hitElement) local elementType = getElementType(hitElement) outputChatBox(" Itt tudod fel venni a szolgálatott /dutyonR") outputChatBox("Itt tudod le tenni a szolgálatott /dutyoffR") end
-
7 hours ago, Firespider said:
No, you know, the pads are included in the game and if you click on them, the panel will appear
addEventHandler("onClientClick", root, function(button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedWorld)
if (button == "right") and (state == "up") then
IsCardShop = true---
end
end)That's what I mean
Is this also possible with the new code?
So I don't mean that if a button is pressed, the panel opens, but if a player clicks on a Ped, the panel opens.
Anyway, thanks for the code you sent, I'll try it later. and if everything is true, I have already solved the ped thing
local thePed = createPed(0, x, y, z) addEventHandler("onClientClick", root, function(button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedWorld) if (button == "right") and (state == "up") then if isElement(clickedWorld) and clickedWorld == thePed then IsCardShop = not IsCardShop removeEventHandler("onClientRender", root, Panel) if IsCardShop then addEventHandler("onClientRender", root, Panel) end end end end)
here
[FREE] Winter script
in Resources
Posted
what the… nice