
Wojak
Members-
Posts
321 -
Joined
-
Last visited
-
Days Won
2
Everything posted by Wojak
-
Tu bym się nie zgodził... setElementData domyślnie synchronizuje dane między serwerem i klientami, więc jeśli komuś zależy na optymalizacji, to nie powinien używać tej funkcji na daremno... (jeśli nie musisz synchronizować danych lepiej użyj tablicy) poza tym drobne uwagi do kodu: myślę że pętle w linijkach 9 i 31 są zbędne, tak samo jak korzystanie z funkcji table.insert i table.remove. Lepiej jest wykorzystać właściwości tabel w lua: Data = { } for i = 0, GetMaxSlots( ) do Data[ i ] = { } end function SetPlayerData( playerid, dKey, dValue ) if playerid and dKey then if IsPlayerConnected( playerid ) and type( dKey ) == "string" then Data[playerid][dKey] = dValue return true end return false end return false end function GetPlayerData( playerid, dKey ) if playerid and dKey then if IsPlayerConnected( playerid ) and type( dKey ) == "string" then return Data[playerid][dKey] end return false end return false end Odpowiadając więc na pytanie Zanim użyjesz pętli zastanów się czy musisz, jednak nie od razu rzym zbudowano, więc jak powiedział Kolega wyżej
-
all clients controlling all vehicles may solve the sync problem (but I'm not 100% convinced) but it certainly may be a source of efficiency problems... Like i said in my script only the client that has the power to send the data about the position of a ped is controlling that ped, so 1 player on the server (or no players, when all need to be handled by the server) is actually the worse case scenario - its like multitasking - more players online - more equally the tasks are divided
-
Very nice, as far the AI goes, it seems to be better than my attempt. How did you created the paths? (trying to create a tool that is able to create paths easily was the thing that put my project in the coma...) As for the bandwidth - I've don a lot of tests in that mater and I'm shore that by default MTA syncs velocity, position and rotation with the minimal interval of about 0,5 sec and max (if there ate no network problems) 2 sec. as long you don't transfer any other data there is no difference between static and moving vehicle... However to keep the vehicles from "drifting" on remote clients it is necessary to sync the information about left and right control states manually. The large intervals on witch the data is updated work great if the vehicle is not moving, or moves very slowly, the faster they move, the less accurate is the position, and they start to lag even if the fps is high and the ping is low (speed = 30-40 km/h seems to be good) In my script I've made it so the bot is only controlled by one client at a time, and the "task data" is only exchanged with the server when some player gets in or out the range (i even found a cheap way to keep the vehicles persistent, synced and moving when no player is in range) Anyway good lock to You, hope you finch it
-
TeleportEditor – Polski opis -Twórz teleporty w edytorze MTA
Wojak replied to Wojak's topic in Gotowe mapy i skrypty
Niestety, ale bez edycji skryptu nie da rady... Nigdy nawet nie planowałem takiej opcji. -
ACL wygląda ok... w opisie funkcji ALC w prawym górnym rogu jest taki pomarańczowy napis: "Server-only function" czy zasób zgłasza jakieś błędy, jesteś w stanie podać logi debugera? https://wiki.multitheftauto.com/wiki/Debugging
-
sądzisz że podałeś wystarczająco dużo informacji? Na oko: skrypt ma stworzyć team o nazwie "Wydział Pościgowy SAPD", potem gdy ktoś się zaloguje sprawdzić czy ta osoba jest w grupie ACL o nazwie "SAPD", jeśli jest to dodać tą osobę do teamu więc co nie działa ? (pytania pomocnicze: czy jesteś pewien że w pliku ACL jest wszystko w porządku?; czy sądzisz że ludzie z tego forum mają dar jasnowidzenia, dlatego nie podałeś kodu z pliku ACL)
-
Nope... this is for detecting the input focus, and He want to set it... for memos: https://wiki.multitheftauto.com/wiki/Gui ... CaretIndex for edits: https://wiki.multitheftauto.com/wiki/Gui ... CaretIndex
-
not as fast like I would like, but forward recently I've designed the GUI layout of the interface, and started to script the buttons (i want to sync the GUI in all clients, so it looks like the patch creator may be more complicated than the interpreter part) Once the patch creator is done, i can get back to the interpreter, and it should be down hill from there
-
video tutorial part 3 - testing and part 4 - using the map on your server isn't it clear? first of all: beside teleports created with this resource are one way, and you need to create second marker in the interior and the corresponding "receiver" in the overworld Where is the facepalm emote when you need it the most All questions that You may possible ask are already answered somewhere in the Internet, You just need to search... Lazy people make topics like this one and are to blind to see the answers server on the plate...
-
tell me what is wrong, and what the hell this means: Anyway all important informations are here: viewtopic.php?f=108&t=32529 (MARKED READ) and of course here: You have no problems with reading, right?
-
This specific resource adds exactly 1 (one) helicopter that will fallow an exactly 1 (one) player – race lieder. Furthermore this resource will only work with RACE gamemode and only if the map has at lest 1 race checkpoint. So if You want the stuff You listed, You need to find a different resource, or script it yourself. (all this stuff should be possible to create)
-
Szukam programisty
Wojak replied to Delejt's topic in Poszukiwania i oferty graczy, reklamy serwerów
Reference manual przetłumaczony w ok 70%: http://www.lua.org.pl/5.1/manual.html#1 jeśli chodzi o podstawy języka powinno wystarczyć -
Its not hard to do, all You need is a mathematical function that describes exact correlation between FPS and game speed (witch unfortunately I don’t have)… But we use this on 2paq Race Server anyway (but only on special occasions like championships, where equal chances are important)
-
You may also use teleporteditor... viewtopic.php?f=108&t=32529 Just place the destination above the marker, rotate it in the direction the vehicle should be lunched and fill the fixed_speed property (it will be the starting speed in km/h), the physics will do the rest Check the exemplar map for cannon.
-
Cylinder markers have indeed infinitive height (collcircle for collshape ) but this is not an error in my code but GTA problem/feature (for all I know it may be intended) so you will have this behavior in any resource that uses cylinder markers. Anyway I did not knew this until You noted it here, so I may fix that on the next occasion, for now I recommend to use arrow, corona or ring marker types as they have inclosed spheres for collshapes.
-
I'm considering creating an independent tool for making the paths, I think it will be esier to restrict some element propertys that way, but the maps will be in the standard map editor format though.
-
viewtopic.php?p=376761#p376761
-
congratulations you pwned SAMP once again
-
assuming that if a bullet hit a dynamic object will instantly destroy it You may use onClientPlayerWeaponFire event https://wiki.multitheftauto.com/wiki/OnC ... WeaponFire just check if hitElement is one of the dynamic element, and if it is treat it like it was destroyed
-
it seems that 2 players can play MTA using the same computer (but the players can not be more than 100 m away if on foot and 140 m when in vehicles)
-
I've hoped that someone will put my idea in good use, great job
-
line 12: you are setting vehicle z velocity as vehicle z turnVelocity...
-
return not only exit the loop, but the whole function - it should make a massive difference...
-
just remone line 16 and 17 (else return)