Jump to content

Fory

Members
  • Posts

    41
  • Joined

  • Last visited

Everything posted by Fory

  1. Fory

    Nil a value

    Hello! I'm trying to figure out what could be wrong, but I can't. Maybe I'm missing a very small detail, but unfortunately it doesn't work. Turbo system. [ERROR]: ms_turbo/sourceS.lua:4: attempt to get length of local 'players' (a nil value) Server: addEvent("setTurboSound", true) addEventHandler("setTurboSound", getRootElement(), function (vehicle, turboLevel, players) if isElement(vehicle) and turboLevel and #players > 0 then triggerClientEvent(players, "setTurboSound", vehicle, turboLevel) end end) Client: local turboLevel = getElementData(pedveh, "vehicle.tuning.Turbo") or 0 if turboLevel >= 4 then playSound("files/turbo.mp3") triggerServerEvent("setTurboSound", localPlayer, pedveh, turboLevel, getElementsWithinRange(x, y, z, 100, "player")) end
  2. Fory

    Image screen...

    Hello everyone, I want to achieve that when I enter an interior, let me do the following standing picture in the picture, then if you enter, you have all hope. DxDrawImage can still be found, and how do I get started? the image should disappear after 10 seconds. another good morning / nice day / nice evening
  3. Fory

    Image screen...

    Hello everyone, I would like to reach it, that if I enter an interiorba let the next chin perform a picture on the picture then if you enter hadj up with all hopes. DxDrawImage is found till now, and with what I shall set about the others? would be needed so that the picture after 10 seconds tünjön away. another good morning / beautiful day / beautiful evening
  4. Fory

    [HELP] stat panel

    Excuse me, that onto him I answer 2 months, but I did not find the time for him. I say thank you your help, faultless one nicely!
  5. Fory

    [HELP] stat panel

    the Client-in too the showingPlayer is in him --CLINET SIDE function statpanelOpen(showP) if showStats then showStats = false showingPlayer = false statpanelOpened = false else showStats = true if showP ~= localPlayer then showingPlayer = showP else showingPlayer = localPlayer end statpanelOpened = true end end addEvent("statpanelOpen", true) addEventHandler("statpanelOpen", root, statpanelOpen) the /debugscript 3 write nothing. the goto-ra I click then teleportál, only that trouble, that to myself,
  6. Fory

    [HELP] stat panel

    the debug writes nothing, in fact the showingPlayer, it targetPlayer function getAdminPanel(thePlayer, commandName, targetPlayer) if targetPlayer then local targetPlayer, targetPlayerName = exports.las_global:findPlayerByPartialNick(thePlayer, targetPlayer) if not (targetPlayer) then outputChatBox("#d75959[LasMTA]:#ffffff Nincs ilyen játékos.", thePlayer, 255, 255, 255, true) return end showingPlayer = targetPlayer else showingPlayer = thePlayer end triggerClientEvent(thePlayer, "statpanelOpen", thePlayer, showingPlayer) end addCommandHandler("stat", getAdminPanel, false, false)
  7. Hello everyone! My problem, how I did it a stat panel "/stat [id] it's working, the player shows your data, on the other hand and I got it ready buttons, -goto (to the player teleport) -gethere (player to yourself telepor) -fixveh (fixes the vehicle) -unflip (let him turn the vehicle upside down) -vhspawn (teleport to the city hall) and from among these the vhspawn button, unflip, fixveh, these work, the goto and the gethere command that trouble, that to myself teleport, and myself teleport self to myself. I would like it, that some müködjön, that for who I take it the stat-let ját do the command on that player Script: Server --GETHERE function getHere(thePlayer, target) if (exports.las_global:isPlayerSeged(thePlayer)) then if showingPlayer then local logged = getElementData(showingPlayer, "loggedin") if (logged==0) then outputChatBox("the player is not login", thePlayer, 255, 0 , 0, true) else local x, y, z = getElementPosition(thePlayer) local interior = getElementInterior(thePlayer) local dimension = getElementDimension(thePlayer) local r = getPedRotation(thePlayer) setCameraInterior(showingPlayer, interior) -- Maths calculations to stop the target being stuck in the player x = x + ( ( math.cos ( math.rad ( r ) ) ) * 2 ) y = y + ( ( math.sin ( math.rad ( r ) ) ) * 2 ) if (isPedInVehicle(showingPlayer)) then local veh = getPedOccupiedVehicle(showingPlayer) setElementAngularVelocity(veh, 0, 0, 0) setElementPosition(veh, x, y, z + 1) setTimer(setElementAngularVelocity, 50, 20, veh, 0, 0, 0) setElementInterior(veh, interior) setElementDimension(veh, dimension) else setElementPosition(showingPlayer, x, y, z) setElementInterior(showingPlayer, interior) setElementDimension(showingPlayer, dimension) end outputChatBox("Sikeresen magadhoz teleportáltad 'succes'", thePlayer,0,255,0,true) end end end end addEvent("getHere", true) addEventHandler("getHere", getRootElement(), getHere) --GOTO function gotoPlayer(thePlayer, target) if getElementData(thePlayer, "adminlevel") > 1 then if showingPlayer then local logged = getElementData(showingPlayer, "loggedin") if (logged==0) then outputChatBox("the player is not login", thePlayer, 255, 0 , 0, true) else local x, y, z = getElementPosition(showingPlayer) local interior = getElementInterior(showingPlayer) local dimension = getElementDimension(showingPlayer) local r = getPedRotation(showingPlayer) -- Maths calculations to stop the player being stuck in the target x = x + ( ( math.cos ( math.rad ( r ) ) ) * 2 ) y = y + ( ( math.sin ( math.rad ( r ) ) ) * 2 ) setCameraInterior(thePlayer, interior) if (isPedInVehicle(thePlayer)) then local veh = getPedOccupiedVehicle(thePlayer) setElementAngularVelocity(veh, 0, 0, 0) setElementInterior(thePlayer, interior) setElementDimension(thePlayer, dimension) setElementInterior(veh, interior) setElementDimension(veh, dimension) setElementPosition(veh, x, y, z + 1) warpPedIntoVehicle ( thePlayer, veh ) setTimer(setElementAngularVelocity, 50, 20, veh, 0, 0, 0) else setElementPosition(thePlayer, x, y, z) setElementInterior(thePlayer, interior) setElementDimension(thePlayer, dimension) end outputChatBox("Elteleportáltál a kiválasztott játékoshoz 'succes'", thePlayer,0,255,0,true) end end end end addEvent("gotoPlayer", true) addEventHandler("gotoPlayer", getRootElement(), gotoPlayer) the showingPlayer that's it at who I look (theoretically) CLIENT --GOTO function buttonClicks2(button, state) if statpanelOpened then if button == "left" and state == "down" then if not countSelector then if isInSlot(sx/2+200, sy/2-260/2, 180,25) then triggerServerEvent("gotoPlayer", localPlayer, showingPlayer) currentTab = 1 scrollData = 0 scrollData2 = 0 end end end end end addEventHandler("onClientClick", getRootElement(), buttonClicks2) -GETHERE function buttonClicks4(button, state) if statpanelOpened then if button == "left" and state == "down" then if not countSelector then if isInSlot(sx/2+200, sy/2-180/2, 180,25) then triggerServerEvent("getHere", localPlayer, showingPlayer) currentTab = 1 scrollData = 0 scrollData2 = 0 end end end end end addEventHandler("onClientClick", getRootElement(), buttonClicks4)
  8. sziasztok! a scriptbe arra kellene a segítség :local Szoveg = {"Újraindítási folyamat...", "Teszt1...", "Teszt2..."}, ezt úgy szeretném, hogy előjön az újraindítási folyamat, aztán eltűnik és jöjjön a Teszt1, majd az is eltünjön, és jöjjön a Teszt2 (((SeeMTA-n mikor bejelentkezel akkor van olyan hogy "SeeMTA v3 betöltése...", "Felhasználó hitelesítése...", "Karakter betöltése..."} előjön ott is az első aztán rá 1mp-re eltünik, és így jön a többi.)) nos én próbálkoztam, de cask az első jön elő az "Újraindítási folyamat..." addEventHandler("onClientRender", root, function () local szovegAlpha = 255 if szovegAlpha > 0 and not kovetkezo then szovegAlpha = szovegAlpha -1.5 elseif szovegAlpha == 0 and not kovetkezo then kovetkezo = true end if kovetkezo and not kovetkezo2 and szovegAlpha < 165 then szam = 2 szovegAlpha = szovegAlpha+1.5 elseif szovegAlpha == 165 then kovetkezo2 = true end if szovegAlpha > 0 and kovetkezo2 and kovetkezo4 ~= 1 then szovegAlpha = szovegAlpha -1.5 kovetkezo3 = 1 end if kovetkezo3 == 1 and szovegAlpha == 0 then szam = 3 kovetkezo4 = 1 end if kovetkezo4 == 1 and szovegAlpha < 165 and not kovetkezo6 then szovegAlpha = szovegAlpha +1.5 kovetkezo5 = true elseif kovetkezo5 and szovegAlpha == 165 then kovetkezo6 = true end if kovetkezo6 and szovegAlpha > 0 then szovegAlpha = szovegAlpha -1.5 end local seefont1 = dxCreateFont("images/bebasneuepro.ttf", 20) local Szoveg = {"Újraindítási folyamat...", "Teszt1...", "Teszt2..."} local szovegAlpha = 255 local szam = 1 local sx, sy = guiGetScreenSize() dxDrawText(Szoveg[szam], sx/2,sy/2+30, sx/2,sy/2+15, tocolor(255,255,255,szovegAlpha), 0.7, seefont1,"center", "center") end )
  9. Fory

    showplayerhealth

    if I type /showhp then which player is close to me, it shows the hp on the player as shown in the picture above, in stripes.
  10. Fory

    help please

    local lastClick = getTickCount() addEventHandler ("onClientRender",getRootElement(), function () local cTick = getTickCount () if cTick-lastClick >= 600000 then if getElementData(getLocalPlayer(),"afk") == false then local hp = getElementHealth (getLocalPlayer()) if hp > 0 then setElementData (getLocalPlayer(),"afk",true) end end end end ) addEventHandler( "onClientRestore", getLocalPlayer(), function () lastClick = getTickCount () setElementData (getLocalPlayer(),"afk",false) end ) addEventHandler( "onClientMinimize", getRootElement(), function () setElementData (getLocalPlayer(),"afk",true) end ) addEventHandler( "onClientCursorMove", getRootElement( ), function ( x, y ) lastClick = getTickCount () if getElementData(getLocalPlayer(),"afk") == true then setElementData (getLocalPlayer(),"afk",false) end end ) addEventHandler("onClientKey", getRootElement(), function () lastClick = getTickCount () if getElementData(getLocalPlayer(),"afk") == true then setElementData (getLocalPlayer(),"afk",false) end end ) setTimer(function() if isElement(getLocalPlayer()) then if getElementData(getLocalPlayer(),"afk") == false then setElementData (getLocalPlayer(),"afk",true) outputChatBox("#d75959[Admin AFK]:#32b3ef " .. getPlayerName(getLocalPlayer()) .. "#ffffff 1 perce AFK dutyban.", thePlayer, 255, 255, true) end end end, 60000, 1) This whole afk system, which is down there we did now add.
  11. Fory

    help please

    Now it doesn't write out a choke, it only writes to AFK when there's no AFK in the player.
  12. Hi I want a /showhp command to see the life force and armor of others, I show in the picture what it should look like, I just don't know how to start her, someone's idea?
  13. Fory

    help please

    and then where is isElement (getLocalPlayer ()) then where do I paste it?
  14. Fory

    help please

    Client because that AFK system is built into a client.
  15. Fory

    help please

    the trouble is I set it up for 5 minutes and even writes if the player is not AFK
  16. Fory

    help please

    [Error]: afkC.lua:2: attempt to call global 'getLocalPlayer' (a nil value) [Error]: afkC.lua:2: attempt to call global 'getLocalPlayer' (a nil value) Line 2. getLocalPlayer()
  17. Fory

    help please

    setTimer(function() if getElementData(getLocalPlayer(),"afk") == false then setElementData (getLocalPlayer(),"afk",true) outputChatBox("#d75959[Admin AFK]:#32b3ef " .. getLocalPlayer() .. "#ffffff 5 perce AFK dutyban.", getRootElement(), 255, 255, 255, true) end end, 10, 1) Line 4:: [ERROR]: afkC.lua:88: attempt to concatenate a userdata value.
  18. Fory

    AFK system

    ERROR: Loading script failed: var_afk\server.lua:7:')' expected (to close '(' at line 1) near 'end' ezt írja ki, de nem tudom hogy miért.
  19. Fory

    AFK system

    Valami hibát ír a 12. Sorban setTimer( function () if getElementData(getLocalPlayer(),"afk") == false then local getLocalPlayer = targetPlayer setElementData (getLocalPlayer(),"afk",true) outputChatBox("#efad5f[AFK]: #42c2d2" .. targetPlayer .. "#ffffff 5 of his minutes AFK.", getRootElement(), 255, 255, 255, true) else setElementData (getLocalPlayer(),"afk",false) outputChatBox("#efad5f[AFK]: #42c2d2" .. targetPlayer .. "#ffffff Back Up.", getRootElement(), 255, 255, 255, true) end end end 2500, 0)
  20. Fory

    AFK system

    Hello everyone 1-2 ideas would be needed, how I shall begin it how new AFK to a system, this would be only so much that the chatboxba announces it that: outputChatBox("#efad5f[AFK]: " Name " 5 of his minutes AFK", getRootElement(), 255, 255, 255, true) else outputChatBox("#efad5f[AFK]: "name" back up", getRootElement(), 255, 255, 255, true) --------------------NEXT---------------------- outputChatBox("#efad5f[AFK]: " Name " 10 of his minutes AFK", getRootElement(), 255, 255, 255, true) else outputChatBox("#efad5f[AFK]: "name" back up", getRootElement(), 255, 255, 255, true) For somebody, some idea?
  21. function blowPlayerVehicle(thePlayer, commandName, target) if (exports.mta_global:isPlayerAdmin(thePlayer)) then if not (target) then outputChatBox(" #d93167[KarlMTA]: #FFFFFF/" .. commandName .. " [NévRészlet]", thePlayer, 255, 194, 14, true) else local targetPlayer, targetPlayerName = exports.sas_global:findPlayerByPartialNick(thePlayer, target) if targetPlayer then local logged = getElementData(targetPlayer, "loggedin") if (logged==0) then outputChatBox(" #d93167[KarlMTA]: #FFFFFFA játékos nincs bejelentkezve.", thePlayer, 255, 0, 0, true) else local veh = getPedOccupiedVehicle(targetPlayer) if (veh) then blowVehicle(veh) dxDrawMaterialLine3D(x+size, y+size, z-0.95, x-size, y-size, z-0.95, "files/bolt.png", size*1000,tocolor(255, 255, 255, 255), targetPlayer) else outputChatBox(" #cd7979[KarlMTA]: #FFFFFFEz a játékos nincs jármûben.", thePlayer, 255, 0, 0, true) end end end end end end addCommandHandler("villam", blowPlayerVehicle, false, false) Sziasztok, valamiért nem akar jó lenni, pedig ott a dxDrawMaterialLine3D valamiért nincs ott, vagy lehet hogy rosszúl adtam meg a pozítciót? targetPlayer helyett x, y, z volt, valaki help, úgy döntöttem hogy így próbálom
  22. Hello everyone, 1 account is system-em, i tried setTimer-t there to lay his front and a drawDxImage-t with what 15 seconds of waiting is needed in order for it not to be possible to register until 15 seconds time, with what there for a picture a doggie it would be laid, that if somebody can help him with a food then calls the number there it is informed, that hovak ell to carry, my dad protector of the animals and works on a hospice, I believed it because of this how I try to call the people_nation attention to the fact that they are not alone but the doggie is alone,. Thank you.
  23. Fory

    Account wait!

    Hello everyone, 1 account is system-em, i tried setTimer-t there to lay his front and a drawDxImage-t with what 15 seconds of waiting is needed in order for it not to be possible to register until 15 seconds time, with what there for a picture a doggie it would be laid, that if somebody can help him with a food then calls the number there it is informed, that hovak ell to carry, my dad protector of the animals and works on a hospice, I believed it because of this how I try to call the people_nation attention to the fact that they are not alone but the doggie is alone,. Thank you.
  24. Sziasztok! valamiért nem játsza le a sound-ot --server function hiall ( text ) outputChatBox ( "Sziasztok!" .. text .. ".", getRootElement(), 255, 255, 255, true) triggerClientEvent ( root, "hiall", root ) end setTimer ( countdown, 594000, 1, "Köszönöm hogy feljöttél a szerverre" ) --client addEvent( "hiall", true ) addEventHandler( "hiall", getRootElement(), hiall ) function hiall ( text ) local sound = playSound("files/notification.mp3") setSoundVolume(sound, 1.0) end mi lehet a probléma?
×
×
  • Create New...