Jump to content

WhoAmI

Members
  • Posts

    1,248
  • Joined

  • Last visited

Everything posted by WhoAmI

  1. I'm currently using Debian and i don't have any problems with it. It's best OS for servers in my opinion.
  2. math.floor Example local number = 500.05 print ( math.floor ( number ) ) Output: 500.
  3. You can do it by few ways. Using database SQL, MySQL, even XML. Just plan your job and do it. We won't make whole script for you.
  4. Create vehicle and set data to him with player's name account and when someone is starting to enter, just check.
  5. Sound functions are clientside. You don't have to trigger.
  6. local label = ( .. ) addEventHandler ( "onClientGUIClick", resourceRoot, function () if ( source == label ) then guiSetText ( label, "text" ) end end )
  7. Napisze Ci po kolei, ale bez funkcji, żebyś się czegoś nauczył. funkcja pobierasz item pobierasz nazwę itemu jeżeli nazwa itemu jest równa nazwie drużyny wyświetla wiadomość 'test' kończysz jeżeli kończysz funkcje dodajesz event onClientGUIClick do gridlisty
  8. Pobierz wybrany item funkcją guiGridListGetSelectedItem, potem pobierz nazwę i sprawdź czy nazwa jest równa Np. "Policja".
  9. Your code is a mess. local itemtext = guiGridListGetItemText ( gridlist, guiGridListGetSelectedItem ( gridlist ), column ) local player = getPlayerFromName ( itemtext ) local health = getElementHealth ( player ) guiSetText ( some_label, health ) It should looks like it. And it should be executed when player clicks on gridlist.
  10. Lol, no. For example gridlist = guiCreateGridList ( .. ) column = guiGridListAddColumn ( .. ) for _, player in ipairs ( getElementsByType ( "player" ) ) do local row = guiGridListAddRow ( gridlist ) guiGridListSetItemText ( gridlist, row, column, getPlayerName ( player ), false, false ) end And then get it by using local itemtext = guiGridListGetItemText ( gridlist, guiGridListGetSelectedItem ( gridlist ), column ) local player = getPlayerFromName ( itemtext )
  11. If your gridlist is full of player's names just use getPlayerFromName And then getElementHealth etc.
  12. WhoAmI

    Own ban system.

    Maybe if you are banning someone for example 24 hours, you shall add to real time those hours and convert it into timestamp. Here is the section about it http://www.lua.org/pil/22.1.html Maybe my thinking is completly bad, I don't know.
  13. Trochę krócej z tabelą: zasilek = createMarker ( 359, 169, 1008, "cylinder", 2 ) setElementInterior ( zasilek, 3 ) teamy = { ["Mechanicy"] = false, ["Policja"] = false, ["Taxi"] = false, ["Pomoc Drogowa"] = false, ["Urząd"] = false, ["Straz pozarna"] = false } function dajkase ( hitElement ) if ( isElement ( hitElement ) and getElementType ( hitElement ) == "player" ) then if ( not teamy [ getTeamName ( getPlayerTeam ( hitElement ) ) ] ) then outputChatBox ( "Urzędnik mówi: aktualnie pracujesz, nie możesz skorzystać z zasiłku dla bezrobotnych!", hitElement, 255, 255, 25, true ) return end local data = getElementData ( hitElement, "zasilek" ) or false if ( data ) then outputChatBox ( "Urzędnik mówi: Skorzystałeś/aś już z zasiłku!", hitElement, 255, 255, 25, true ) else setElementData ( hitElement, "zasilek", true ) givePlayerMoney ( hitElement, 200 ) end end end addEventHandler("onMarkerHit", zasilek, dajkase)
  14. WhoAmI

    Own ban system.

    local time = getRealTime ( ) local timestamp = time.timestamp This is current time, but written in another way.
  15. Po prostu stawiasz warunek. if ( getPlayerTeam ( source ) == getTeamFromName ( "jakiś team" ) ) then
  16. isObjectInACLGroup Chyba, że na team to getPlayerTeam
  17. WhoAmI

    Own ban system.

    When player connects, you are getting his serial and current time. You are converting time to timestamp and checking if it is higher than timestamp in ban, if so, you are letting him connect. That's how I see it.
×
×
  • Create New...