Jump to content

Fory

Members
  • Posts

    33
  • Joined

  • Last visited

Everything posted by Fory

  1. 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.
  2. 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.
  3. Fory

    showplayerhealth

    PL:: PL PL PL
  4. Fory

    help please

    Now it doesn't write out a choke, it only writes to AFK when there's no AFK in the player.
  5. 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?
  6. Fory

    help please

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

    help please

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

    help please

    the trouble is I set it up for 5 minutes and even writes if the player is not AFK
  9. 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()
  10. 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.
  11. 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.
  12. 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)
  13. 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?
  14. 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
  15. 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.
  16. 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.
  17. 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?
  18. Very Good! Thank you
  19. Hello everyone! I would ask help, how id would be able to make it with what how drawdxtext announces it-in that: Start of competition 8:55 minutes left , unfortunately the drawdxtext i never could together to make friends but i would love now. thank you...
  20. Nem! megpróbálkoztam csinállni 1-et, nem lett valami jó, de nekem az tökéletes amit csinálltam!!
  21. Sziasztok, egy olyan scriptet szeretnék csinálni hogy pl beírom hogy /lightning [id] akkor egy villám csapjon a player-be és a player meghalljon, nem tudom hogy, hogy kezdjek hozzá, eddig csak 1 képem van a villámról, már mint egy texture, már csak az kellene hogy lehessen látni hogy belecsapjon. kellene egy kiinduló pont. segítségeket előre is köszönöm
  22. igen ez: if getElementData(thePlayer,"adminduty") then csak nem tudom hogy mit kell odaírni hogy elseif, vagy else, vagy valami mást-e?
  23. Jó lett! Köszönöm Szépen! és még azt hogy tudnám beírni hogy adminduty: 0/, 0 akkor fehérrel írja és ne írja a rangot, és ha 1 akkor írja a rangot.
  24. oda írtam a sourcePlaye-t de utána ezt dobta ki::: sas_global/admin_globals.lua:49 Bad argument @ 'getElementData' [Expected element at argument 1, got nil]
  25. Akkor a sas_global-t és a telljes ic chat-et bemásolom ide, -- Main chat: Local IC, Me Actions & Faction IC Radio function localIC(source, message, language) if exports['sas_freecamtv']:isPlayerFreecamEnabled(source) then return end local x, y, z = getElementPosition(source) local playerName = getPlayerName(source) message = string.gsub(message, "#%x%x%x%x%x%x", "") local dimension = getElementDimension(source) local interior = getElementInterior(source) local shownto = 1 -- Chat Commands tooltip local kieg = "" for key, nearbyPlayer in ipairs(getElementsByType( "player" )) do local dist = getElementDistance( source, nearbyPlayer ) if dist < 20 then local nearbyPlayerDimension = getElementDimension(nearbyPlayer) local nearbyPlayerInterior = getElementInterior(nearbyPlayer) if (nearbyPlayerDimension==dimension) and (nearbyPlayerInterior==interior) then if not (isPedDead(nearbyPlayer)) and getElementData(nearbyPlayer, "loggedin") and (nearbyPlayer~=source) then local message2 = message local pveh = getPedOccupiedVehicle(source) local jatekos = nearbyPlayer --[[ if pveh then if (exports['sas_vehicle']:isVehicleWindowUp(pveh)) then kieg = "((Kocsiban)) " for i = 0, getVehicleMaxPassengers(pveh) do local lp = getVehicleOccupant(pveh, i) if (lp) and (lp~=source) then jatekos = lp end end end end]]-- --outputChatBox( getChatSzin(dist).." " .. playerName .. " "..kieg.."mondja: " .. message2, jatekos, 255, 255, 255, true) shownto = shownto + 1 end end end end local admintitle = exports.sas_global:getPlayerAdminTitle(thePlayer) outputChatBox("#32b3ef[ADMIN] " .. admintitle .. " " .. playerName .. " "..kieg.." mondja: " .. message, source, 255, 255, 255, true ) exports['sas_freecamtv']:add(shownto, playerName .. " mondja: " .. message, source) end IC CHAT function getAdmins() local players = getElementsByType("player") local admins = { } local count = 1 for key, value in ipairs(players) do if isPlayerSeged(value) and getPlayerAdminLevel(value) <= 6 then admins[count] = value count = count + 1 end end return admins end function isPlayerSeged(thePlayer) return getPlayerAdminLevel(thePlayer) >= 1 end function isPlayerAdmin(thePlayer) return getPlayerAdminLevel(thePlayer) >= 2 end function isPlayerFullAdmin(thePlayer) return getPlayerAdminLevel(thePlayer) >= 3 end function isPlayerSuperAdmin(thePlayer) return getPlayerAdminLevel(thePlayer) >= 4 end function isPlayerLeadAdmin(thePlayer) return getPlayerAdminLevel(thePlayer) >= 5 end function isPlayerHeadAdmin(thePlayer) return getPlayerAdminLevel(thePlayer) >= 6 end function getPlayerAdminLevel(thePlayer) return isElement( thePlayer ) and tonumber(getElementData(thePlayer, "adminlevel")) or 0 end local titles = {"AdminSegéd", "Admin[1]", "Admin[2]", "Admin[3]", "Admin[4]", "Admin[5]", "Főadmin", "SuperAdmin", "Tulajdonos", "Rendszergazda", "Fejlesztő"} function getPlayerAdminTitle(thePlayer) local text = titles[getPlayerAdminLevel(thePlayer)] or "Player" local hiddenAdmin = getElementData(thePlayer, "hiddenadmin") or 0 if (hiddenAdmin==1) then text = text .. " (Rejtett)" end return text end function getAccurateAdminTitle(thePlayer) return titles[getPlayerAdminLevel(thePlayer)] or " " end ADMIN GLOBAL
×
×
  • Create New...