Jump to content

TAPL

Retired Staff
  • Posts

    7,337
  • Joined

  • Days Won

    11

Everything posted by TAPL

  1. TAPL

    GUI Help

    You need to increase the width.
  2. https://forum.multitheftauto.com/viewtopic.php?f=119&t=49609
  3. TAPL

    Simple question

    Yes, since getPlayersInTeam and getElementHealth available client/server side, it should work.
  4. TAPL

    Simple question

    function getTeamHealth(team) if team then HP = 0 for i, player in ipairs(getPlayersInTeam(team)) do HP = HP + getElementHealth(player) end return HP end end Use it with event onPlayerJoin and onPlayerQuit and onPlayerDamage or a timer or whatever.
  5. Only these what you need to edit You already have them commented. -- Settings for when a player joins -- XYZ coördinates local joinX = -2462.3999023438 local joinY = 132.69999694824 local joinZ = 35.200000762939 -- Weapon and ammo local joinWeapon = 0 local joinAmmo = 0 -- Message when player joins local joinMessage = "Welcome to Belgium-Reallife." -- Skin that player gets local joinSkin = 0 -- Settings for when a player dies -- XYZ coördinates local spawnX = -2462.3999023438 local spawnY = 132.69999694824 local spawnZ = 35.200000762939 -- Weapon and ammo local spawnWeapon = 0 local spawnAmmo = 0 -- Skin that player gets local spawnSkin = 0 -- Settings for the amounts of money -- Money the killer gets local killerMoney = 0 -- Money removed from player when they die local deadPlayerMoney = 0 -- Money you get when you join local joinMoney = 0
  6. TAPL

    spawnPlayer

    How will thesurvivor be selected, i mean how you will make the script select thesurvivor? What about if thesurvivor dead before everyone? -- Server Side -- -- thesurvivor should be defined somewhere. addEventHandler("onPlayerWasted", root, function() local alivePlayers = getAlivePlayers() if source == thesurvivor then -- thesurvivor dead, do something.. elseif #alivePlayers == 1 and alivePlayers[1] == thesurvivor then -- everyone dead, except thesurvivor. for i, player in ipairs(getElementsByType("player")) do -- get all players. spawnPlayer(player, x, y, z) -- spawn all players. setCameraTarget(player) -- make the camera follow him. end end end)
  7. عندك قوس زايد في سطر 9 الكلينت
  8. What do you mean by class?
  9. TAPL

    Loading

    I remember i saw this while i was using Map Editor.
  10. TAPL

    Simple question

    Not sure, but i think you need this: dxDrawImageSection
  11. TAPL

    Gui problem

    You're welcome.
  12. TAPL

    Gui problem

    -- Client Side -- Window = guiCreateWindow(583, 409, 197, 327, "Fake Cars", false) guiWindowSetSizable(Window, false) guiSetVisible(Window, false) obutton = guiCreateButton(9, 96, 117, 33, ":O", false, Window) Perennial = guiCreateButton(9, 131, 117, 35, "Perennial", false, Window) Walton = guiCreateButton(9, 169, 118, 34, "Walton", false, Window) Tampa = guiCreateButton(9, 206, 118, 34, "Tampa", false, Window) AutoWahlenLabel = guiCreateLabel(30, 57, 139, 15, "Bitte wähle ein Auto aus", false, Window) Abbrechen = guiCreateButton(10, 288, 177, 29, "Abbrechen", false, Window) OderMochtestDu = guiCreateLabel(39, 269, 117, 15, "Oder möchtest du...", false, Window) lable1 = guiCreateLabel(131, 104, 52, 15, "500$", false, Window) guiLabelSetColor(lable1, 23, 132, 5) PerennialPreis = guiCreateLabel(131, 141, 53, 15, "2000$", false, Window) guiLabelSetColor(PerennialPreis, 23, 132, 5) WaltonPreis = guiCreateLabel(132, 181, 55, 15, "1500$", false, Window) guiLabelSetColor(WaltonPreis, 23, 132, 5) TampaPreis = guiCreateLabel(131, 218, 56, 15, "750$", false, Window) guiLabelSetColor(TampaPreis, 23, 132, 5) function Fake_Cars_show() local IsWindowVisible = guiGetVisible(Window) if (IsWindowVisible == true) then guiSetVisible(Window, false) guiSetInputEnabled(false) elseif (IsWindowVisible == false) then guiSetVisible(Window, true) guiSetInputEnabled(true) end end local myMarker = createMarker(-2615, 2262, 7.3, "cylinder", 1.0, 255, 0, 0, 150) addEventHandler("onClientMarkerHit", myMarker, function(player) if getElementType(player) == "player" and player == localPlayer then Fake_Cars_show() end end) function Buttons(state) if state == "left" then if source == Abbrechen then Fake_Cars_show() end end end addEventHandler("onClientGUIClick", root, Buttons) There no need for server side.
  13. TAPL

    Sirens

    For that you need setVehicleSirens too.
  14. Ok, send it at Private Message.
  15. Have you tried change the event name "openGUI" to something else?
  16. TAPL

    Sirens

    It depends on how you want it to work, the example is simply will add the sirens to any vehicle you enter and it will be removed from the vehicle when you exit from it, that all. You just need to create new resource, and copy - paste the example, and be sure it must be server side.
  17. TAPL

    Gui problem

    Post your code.
  18. TAPL

    Sirens

    I think the example in the wiki is enough, post your code so we can help you find out what is was wrong.
  19. TAPL

    Help

    You're welcome.
  20. TAPL

    Saving help

    You're welcome.
  21. TAPL

    Help

    Vehicle = createVehicle(id, x, y, z) -- id is not defined.
  22. TAPL

    Help

    local mapName = getMapName(source) -- read wiki, this function not need argument. x, y, z = getElementPosition(source), source, 50000 -- what is this? lol setTimer(function() destroyElement(source, Vehicle) end, 300000, 1, true) should be: setTimer(function(source) destroyElement(source, Vehicle) end, 300000, 1, source) And as manve1 said about the outputChatBox.
  23. TAPL

    Saving help

    Did you put it server side in meta? Are you sure that your data name is "wins"?
  24. TAPL

    Saving help

    addEventHandler("onPlayerQuit", root, function() local account = getPlayerAccount(source) if (account) and not isGuestAccount(account) then local wins = getElementData(source, "wins" ) or 0 setAccountData(account, "flatout.wins", wins) end end) addEventHandler("onPlayerLogin", root, function(_, account) local wins = getAccountData(account, "flatout.wins") or 0 if (wins) then setElementData(source, "wins", wins) end end)
  25. Your problem is that the GUI is showing for everyone, not only for who has hit the col? Well, the trigger is only for who hit the col, so the problem is no problem. Maybe you want post the rest of the code? Where is the function eschrankefunc () ? Maybe you have other script trigger the event openGUI for everyone? try to change it to something else.
×
×
  • Create New...