-
Posts
1,248 -
Joined
-
Last visited
Everything posted by WhoAmI
-
I'm currently using Debian and i don't have any problems with it. It's best OS for servers in my opinion.
-
Try to add 'sudo' before.
-
math.floor Example local number = 500.05 print ( math.floor ( number ) ) Output: 500.
-
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.
-
Create vehicle and set data to him with player's name account and when someone is starting to enter, just check.
-
[SZUKAM] Programisty Lua.
WhoAmI replied to adidas2142's topic in Poszukiwania i oferty graczy, reklamy serwerów
W ciemno nigdy nie biorę. -
Sound functions are clientside. You don't have to trigger.
-
local label = ( .. ) addEventHandler ( "onClientGUIClick", resourceRoot, function () if ( source == label ) then guiSetText ( label, "text" ) end end )
-
Gridlisty i onClientGUIClick
WhoAmI replied to mommytellme's topic in Pomoc ze skryptami i programowaniem w Lua
guiGridListGetItemText -
Gridlisty i onClientGUIClick
WhoAmI replied to mommytellme's topic in Pomoc ze skryptami i programowaniem w Lua
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 -
Gridlisty i onClientGUIClick
WhoAmI replied to mommytellme's topic in Pomoc ze skryptami i programowaniem w Lua
Pobierz wybrany item funkcją guiGridListGetSelectedItem, potem pobierz nazwę i sprawdź czy nazwa jest równa Np. "Policja". -
Why you want to do that?
-
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.
-
So use my 2nd code.
-
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 )
-
Zasiłek na setElementDatach
WhoAmI replied to mommytellme's topic in Pomoc ze skryptami i programowaniem w Lua
Tak. -
If your gridlist is full of player's names just use getPlayerFromName And then getElementHealth etc.
-
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.
-
Zasiłek na setElementDatach
WhoAmI replied to mommytellme's topic in Pomoc ze skryptami i programowaniem w Lua
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) -
local time = getRealTime ( ) local timestamp = time.timestamp This is current time, but written in another way.
-
Zasiłek na setElementDatach
WhoAmI replied to mommytellme's topic in Pomoc ze skryptami i programowaniem w Lua
Po prostu stawiasz warunek. if ( getPlayerTeam ( source ) == getTeamFromName ( "jakiś team" ) ) then -
Zasiłek na setElementDatach
WhoAmI replied to mommytellme's topic in Pomoc ze skryptami i programowaniem w Lua
isObjectInACLGroup Chyba, że na team to getPlayerTeam -
Zasiłek na setElementDatach
WhoAmI replied to mommytellme's topic in Pomoc ze skryptami i programowaniem w Lua
Zwykłe dziękuje mi wystarczy. Nie ma za co. -
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.
