Jump to content

Patrick

Moderators
  • Posts

    1,141
  • Joined

  • Last visited

  • Days Won

    42

Everything posted by Patrick

  1. @Pedro001 Because you set back ped's HP to 100 in every second. setTimer(setElementHealth,1000,0,seg1,100)
  2. Patrick

    Command

    local IP = "127.0.0.1" local PORT = 22003 addCommandHandler("redirectall", function() for index, player in ipairs(getElementsByType("player")) do redirectPlayer(player, IP, PORT) end end)
  3. Patrick

    Command

    Of course, just replace the custom-event to addCommandHandler in your code.
  4. Patrick

    Command

    And what is the question?
  5. There are several ways to do it. One, if you use ped's camera rotation to rotate the minigun. Basic example: -- SERVER createVehicle(getVehicleModelFromName("Bobcat"), 0, 5, 3) addCommandHandler("aim", function(player) local vehicle = getPedOccupiedVehicle(player) if not vehicle then return outputChatBox("Use in vehicle...", player) end removePedFromVehicle(player) local object = createObject(2985, 0, 0, 0) setElementCollisionsEnabled(object, false) attachElements(object, vehicle, 0, -1.5, -0.25) attachElements(player, object, -0.4, 0, 0.8) triggerClientEvent(player, "aim", resourceRoot, vehicle, object) end) -- CLIENT local current addEvent("aim", true) addEventHandler("aim", resourceRoot, function(vehicle, object) current = { vehicle=vehicle, object=object } addEventHandler("onClientRender", root, aim) end) function aim() local camRot = getPedCameraRotation(localPlayer) setElementAttachedOffsets(current.object, 0, -1.5, -0.25, 0, 0, -camRot+90) end
  6. Hi, @DaeRoNz! I just added IPL to MAP, right now.
  7. You have to use setTimer
  8. You can get player's money with getPlayerMoney. And this is just a simple IF statement: function progressodeagle(thePlayer) if isElementWithinMarker(thePlayer, deagle2) then local currentMoney = getPlayerMoney(thePlayer) if currentMoney >= 2500 then takePlayerMoney(thePlayer, 2500) giveWeapon(thePlayer, 24, 2) setPedFrozen(thePlayer, true) setPedAnimation(thePlayer, "ped", "bomber", 16000, true, false, false, false) setTimer(setPedFrozen, 16000, 1, thePlayer, false) setTimer(giveWeapon,16000, 1, thePlayer, 24, 450) else outputChatBox("You don't have enough money! ($2500)", thePlayer) end end end addCommandHandler("fabricar", progressodeagle)
  9. Show me your script, which place prefix before player's name.
  10. Ha tippelnem kéne, akkor client oldalon próbálod futtatni ezt a kódot, de szerver oldalon kell.
  11. Sadly not, it's a scripting forum, where we answer for your questions and help you to find what is wrong in the code, but we don't give you exact solutions/codes. Especially if it's not your own code.
  12. Probably caused by your "chat-system", which place the "[PLAYER] - " before his name. You need to cancel the command usage, when player is muted. You can use isPlayerMuted function to check this.
  13. Probably, exports.global:split isn't exists or resource not started. You need to find, and fix this firstly. By the way, you can use the default split function. Just replace every exports.global:split in the code to split. For example in the 128th line, local animTable = exports.global:split(row.animation, ";") to local animTable = split(row.animation, ";")
  14. That's not enough information. How do you create the bots, which resource do you using? Peds are created on server or client side?
  15. Nem egészen értem, hogy mi a probléma. Melyik fájlt, hogy/hol? A meta.xml-be bele vannak írva? Saját, helyi szerveren működik?
  16. You can't, because not possible to cancel onClientVehicleStartExit. But you can cancel onVehicleStartExit, on server side.
  17. Ezt neked kell tudnod, hogy-hogy kérdezed le a játékos rangját, stb.
  18. Bárhol, thePlayer a játékos elementje, aki használta a parancsot.
  19. Szia! Ez csak a "megjelenítés". Szerver oldalon kell módosítanod, hogy azt a szöveget küldje el megjelenítésre a kliensnek, amiben szerepel a prefix. Meg kell keresned szerver-oldalon azt, ahol meg-triggerelődik a onOOCMessageSend event, és azelőtt hozzáfűzni a megfelelő prefixet. (valószínűleg ott fűzi hozzá a játékos nevét is) EDIT: client oldalon is megoldható, mert az onOOCMessageSend source-elementje a player aki elküldte az üzenetet, szóval az ő rangját letudod kérdezni abból, de szerver-oldalon jobb.
  20. Wrong language, moved to Portuguese section.
  21. What are you doing exactly? Do you try to attach an object to player's hand? Because then, you need to use bone_attach (download).
  22. Hi! You can't, but you can get player's right-hand position, with getPedBonePosition. Bone ID: 25
×
×
  • Create New...