Jump to content

pol

Members
  • Posts

    3
  • Joined

  • Last visited

pol's Achievements

I ordered some spaghetti with marinara sauce and I got egg noodles and ketchup. I'm an average nobody.

I ordered some spaghetti with marinara sauce and I got egg noodles and ketchup. I'm an average nobody. (2/54)

0

Reputation

  1. Zgadza się. Brakuje w nim tylko poprawnie działającej części odpowiedzialnej za ukaranie gracza poprzez zabicie.
  2. Cześć, Może zacznę od tego, że jestem lama jeśli chodzi o lua i jeszcze raczkuję, dlatego mam problem z pewnym skryptem, który powiem w prost ściągnąłem z internetu. Mam nadzieje ze autor się nie pogniewa. Na serwerze którym się zajmuję mam niemały problem z graczami uciekającymi podczas walki, dlatego dość intensywnie poszukuje sposobu aby temu zaradzić. Poniżej zamieszczam skrypt, który poprawnie wykrywa zadawane obrażenia, uruchamia timer i wyświetla ostrzeżenia, jednak chciałbym aby skrypt ustawiał ujemną wartość "blood" dla gracza, który wyjdzie z serwera przed upływem 20 sekund od zadania obrażeń. Proszę o pomoc w poprawnym dopisaniu tej funkcji. function damageAntiQuit ( data,oldvalue) if (data=="blood") then if oldvalue then local ranny = getElementData (source, "CanLeave") local obrazenia150 = oldvalue - getElementData(source,"blood") if (obrazenia150>250) then if (ranny ~= "no" ) then triggerClientEvent(source,"wlaczInfo",source) setTimer (triggerClientEvent,30000,1,source,"wylaczInfo",source) getElementData( source,"CanLeave", "no" ) outputChatBox ( "* Otrzymałeś obrażenia. Z gry możesz wyjść dopiero za 20 sekund!", source, 255, 0, 0 ) setTimer ( getElementData, 20000, 1, source,"CanLeave", false) setTimer ( outputChatBox, 20000, 1, "* Mozesz teraz bezpiecznie wyjsc z gry", source, 255, 0, 0 ) elseif (ranny == "no" ) then end end end end end addEventHandler("onElementDataChange",getRootElement(),damageAntiQuit) function antyQuit( ) local ranny = getElementData (source, "CanLeave") if ( ranny == "no" ) then sourceAccount = getPlayerAccount (source) setAccountData(sourceAccount,"blood",-1) outputDebugString("* " .. getPlayerName(source) .. "wyszedl z gry podczas walki!") end end addEventHandler("onPlayerQuit",getRootElement(),antyQuit)
  3. Hey guys! In first version of my map I removed some bridges and few object, then I made another version based on previous one but i forgot to stop first resource with my first map, before I started last one on the server. Now my map is combined with default one, even if I stop both resources and start correct one again. I wont reset whole database on my server so I would like to ask you guys if there is any solution to fix that problem?
×
×
  • Create New...