-
Posts
122 -
Joined
-
Last visited
Everything posted by acp___(PL)
-
2paq MTA:SA Race Serwer PL 24/7
acp___(PL) replied to acp___(PL)'s topic in Poszukiwania i oferty graczy, reklamy serwerów
zdaję sobie sprawę, że na airbrake i latanie to to nie pomoże ale teraz największym problemem nie są Ci cziterzy co się całemu światu pokazują jakimi są idiotami, tylko CI co grzebią w handlingu i mówią, że nie oszukują niestety problemem jest też to, że jak ktoś nie rozumie o co chodzi z tym handlingiem: http://www.swietochlowice.org/~2paq/handling.cfg (prawy zapisz jako) to za cziterów uważa Nas, mimo: - zawsze po wejściu na serwer jakiejś osoby, jak tylko mogę (lub inny stały bywalec) wpisuję komendę: - zaraz po wejściu na serwer pojawia się skrócony regulamin, gdzie wyraźnie pisze, że wchodząc na serwer akceptujesz jego zasady - można też przeczytać o tym na forum INFO O SERWERZE Kolejna rzecz która wyróżnia Nasz serwer do długość niektórych mapek, jeżeli ktoś ma słabszy sprzęt to ma trudności wygrywać na 60 sekundowych mapkach ... na 2paq MTA:SA Race Server są również mapki po 10 minut, kilka po ok. 20 - a i perełki po 30, 40 minut ale to już dla maniaków Koniecznością stało się przy tak rożnej długości mapek, zmienienie skryptu pod względem dopasowania czasu od finiszu pierwszej osoby, do końca mapki - tutaj ten czas waha się od 20s do 180s! Dodatkowo każdy gracz może poprosić lidera komendą: "/czekaj", aby ten jeżeli nie poprawi własnego rekordu poczekał chwilę na końcu mapki. Jeżeli lider wpisze: /czekam to każdego gracza będzie frezowało na kilka metrów przed metą, i dopiero jak lider przekroczy linię mety poklei odfrezowuje ludzi i można skończyć mapkę -
It works! If someone wanted to use this (replace character in string), it better (looks better) to remove the sign: thisDriftMapName = "[TR]Musles" thisDriftMapName = string.gsub( thisDriftMapName, "[\]\[]", "" ) outputDebugString( "string.gsub [\]\[]: " ..thisDriftMapName, 3, 155, 155, 155) ) Solving the problem with copying tables viewtopic.php?p=334970#p334970 local tableDriftRecords = executeSQLSelect( thisDriftMapName, "player_nick, drift_record, best_drift, record_day" ) local newtableDriftRecords = {} for i_key, i_value in pairs(tableDriftRecords) do newtableDriftRecords[i_key] = { ['player_nick'] = i_value['player_nick'], ['drift_record'] = i_value['drift_record'], ['best_drift'] = i_value['best_drift'], ['record_day'] = i_value['record_day'] } end
-
unfortunately, that has nothing changed - log file says the same:
-
I need to replace characters: " ", "[", "]" in the name of the map addEvent('onMapStarting') addEventHandler('onMapStarting', g_rot, function(mapInfo, mapOptions, gameOptions) thisDriftMapName = string.gsub( "drift_records_on_map_" ..mapInfo.name, " ", "_" ) thisDriftMapName = string.gsub( thisDriftMapName, "[", "_" ) thisDriftMapName = string.gsub( thisDriftMapName, "]", "_" ) executeSQLCreateTable ( thisDriftMapName, "player_nick TEXT, drift_record INTEGER, best_drift INTEGER, record_day TEXT" ) setTimer(selectDriftScoreFromDB, 1000, 1, "all") end ) What am I doing wrong?
-
Nie chce dublować tematów, dlatego podam link tutaj viewtopic.php?f=115&t=26195 <-- filmiki z serwera 2paq MTA:SA Race Serwer PL 24/7 ma już ponad 5 lat! Są ludzie którzy od tamtego czasu są z tym serwerem. Ja żartuje, że to serwer emerytów bo średnia wieku jest powyżej 20 lat Serwer oskryptowany, m. in.: 1. Skrypt punktowy - zdobywasz punkty za: - pozycję z jaką kończysz wyścig, - za zebrane CP, - za czas spędzony na serwerze, od punktów zależy tytuł jaki masz na serwerze, wyniki można oglądać również na stronie serwera http://www.trick.rtk.net.pl/mta/index.php 2. Drift Meter 2.0: - punkty za drift jak w NFS, - wyniki są pamiętane (Top Drifters dla każdej mapy), - za drift można dostawać punkty - patrz punkt powyżej 3. No Colision - brak kolizji przez 15 sekund od startu, nie ma kłótni, kto w kogo wjechał podczas startu, a po starcie gramy w MTA, a nie TrackManie 4. Lap Timer - na mapkach z okrążeniami pokazuje czas okrążenia, ile brakuje Nam do rekordu, pokazuje czasy w sektorach, itd (jak w F1). 5. GPS - pokazuje na jakiej wysokości jest CP, jaka odległość oraz kierunek na którym się znajduje. Bardzo ułatwi np. gdy lecimy samolotem, CP jest wysoko i daleko - wtedy łatwo go przegapić, z skryptem wiemy czy jesteśmy powyżej czy poniżej CP. 6. Top Times - skrypt pamiętający 30 najlepszych czasów na danej mapie 7. Ghost - zapamiętuje przejazd najlepszego gracza i odtwarza go każdemu graczowi w postaci duch 8. NOS, Trafic Sensor, HuntBot i wiele innych Odwiedźcie portal: http://www.2paq.ugu.pl Przed wejściem na serwer przeczytajcie to (a przynajmniej §6!!): http://www.2paq.ugu.pl/forum/viewtopic.php?t=11 Zajmie to chwilę, a unikniemy nie porozumień podczas gry. UWAGA! Nie zwracajcie uwagę na niektóre zczitowane czasy, niestety na serwerze nie można być 24/7 i czasem jakieś dziecko neostrady lub UPC wchodzi ... czystkę w bazie danych zrobię dopiero jak wejdzie MTA 1.1 m.in. z narzucaniem przez serwer parametrów samochodu. Edit: Przykład zestawienia wyników z ostatnich Mistrzostw (..)
-
Text shows me when clicked , but it will not disappear after the next , you need a few times clicked function showMeDriftScoreFromDB() if not renderujeTabeleTopDriftersDB then triggerServerEvent ( "giveMeDriftScoreFromDB", g_rot, gMe ) renderujeTabeleTopDriftersDB = true else removeEventHandler('onClientRender', g_rot, pokazTopDriftersFromDB) setTimer( function() renderujeTabeleTopDriftersDB = false end, 1000, 1) end end
-
1. I change something in one table (copy of original), and this change also my second table (original)?!?! 2. Why only one repeat loops "repeat-until"? function writeRecordToTable(driftNick, allDriftPoints, bestDrift, old_record) --wczytanie tabeli dwuwymiarowej outputDebugString("Algorytm wpisu do BD", 3, 0, 0, 255) local tableDriftRecords = executeSQLSelect( thisDriftMapName, "player_nick, drift_record, best_drift, record_day" ) if not tableDriftRecords then outputDebugString("Brak tabeli z rekordami driftowymi!!!", 3, 255, 0, 0) elseif type( tableDriftRecords ) == "table" then local newtableDriftRecords = {} if #tableDriftRecords > 0 then outputDebugString("Ilosc wierszy w bazie danych: " ..#tableDriftRecords, 3, 0, 255, 255) outputDebugString("Wartość allDriftPoints: " ..allDriftPoints, 3, 0, 255, 255) newtableDriftRecords = tableDriftRecords local i = 1 outputDebugString("Wartość [i][drift_record]: " ..tableDriftRecords[i]['drift_record'], 3, 0, 255, 255) local playerIdOldRecord = -1 --początek procedury testowej for i_key, i_value in pairs(tableDriftRecords) do outputDebugString(i_value['player_nick'].. " to " ..i_key.. " nick w tableDriftRecords (IPT)", 3, 0, 255, 255) end for i_key, i_value in pairs(newtableDriftRecords) do outputDebugString(i_value['player_nick'].. " to " ..i_key.. " nick w newtableDriftRecords (IPT)", 3, 0, 255, 255) end --koniec procedury testowej for i_key, i_value in pairs(tableDriftRecords) do if i_value['drift_record'] < allDriftPoints then i = i_key outputDebugString("Znaleziono i=" ..i, 3, 0, 255, 255) break end outputDebugString(i_value['player_nick'].. " ma więcej punktów!", 3, 0, 255, 255) end if old_record == 1 then outputDebugString("Szukam old_record", 3, 0, 255, 255) for j_key, j_value in pairs(tableDriftRecords) do if j_value['player_nick'] == driftNick then playerIdOldRecord = j_key outputDebugString("Znaleziono playerIdOldRecord=" ..playerIdOldRecord, 3, 0, 255, 255) break end end end newtableDriftRecords[i]['player_nick'] = driftNick newtableDriftRecords[i]['drift_record'] = allDriftPoints newtableDriftRecords[i]['best_drift'] = bestDrift newtableDriftRecords[i]['record_day'] = getRealDateTimeNowString() --początek procedury testowej for i_key, i_value in pairs(tableDriftRecords) do outputDebugString(i_value['player_nick'].. " to " ..i_key.. " nick w tableDriftRecords (IIPT)", 3, 0, 255, 255) end for i_key, i_value in pairs(newtableDriftRecords) do outputDebugString(i_value['player_nick'].. " to " ..i_key.. " nick w newtableDriftRecords (IIPT)", 3, 0, 255, 255) end --koniec procedury testowej local k repeat outputDebugString("newtableDriftRecords[i][player_nick]: " ..newtableDriftRecords[i]['player_nick'], 3, 0, 255, 255) k = i i = i + 1 outputDebugString("tableDriftRecords[k][player_nick]: " ..tableDriftRecords[k]['player_nick'], 3, 0, 255, 255) outputDebugString("k=" ..k.. " & i=" ..i.. " (wierszy: " ..#tableDriftRecords.. ")", 3, 0, 255, 255) if playerIdOldRecord == k then break end if not newtableDriftRecords[i] then newtableDriftRecords[i] = { ['player_nick'] = tableDriftRecords[k]['player_nick'], ['drift_record'] = tableDriftRecords[k]['drift_record'], ['best_drift'] = tableDriftRecords[k]['best_drift'], ['record_day'] = tableDriftRecords[k]['record_day'] } else newtableDriftRecords[i]['player_nick'] = tableDriftRecords[k]['player_nick'] newtableDriftRecords[i]['drift_record'] = tableDriftRecords[k]['drift_record'] newtableDriftRecords[i]['best_drift'] = tableDriftRecords[k]['best_drift'] newtableDriftRecords[i]['record_day'] = tableDriftRecords[k]['record_day'] end until k <= #tableDriftRecords --początek procedury testowej for i_key, i_value in pairs(tableDriftRecords) do outputDebugString(i_value['player_nick'].. " to " ..i_key.. " nick w tableDriftRecords (IIIPT)", 3, 0, 255, 255) end for i_key, i_value in pairs(newtableDriftRecords) do outputDebugString(i_value['player_nick'].. " to " ..i_key.. " nick w newtableDriftRecords (IIIPT)", 3, 0, 255, 255) end --koniec procedury testowej executeSQLDropTable( thisDriftMapName ) executeSQLCreateTable ( thisDriftMapName, "player_nick TEXT, drift_record INTEGER, best_drift INTEGER, record_day TEXT" ) local n = 1 while newtableDriftRecords[n] do executeSQLInsert( thisDriftMapName, "'"..newtableDriftRecords[n]['player_nick'].."','"..newtableDriftRecords[n]['drift_record'].."','"..newtableDriftRecords[n]['best_drift'].."','"..newtableDriftRecords[n]['record_day'].."'" ) outputDebugString("Wpis nr: " ..n.. " do tabeli: " ..newtableDriftRecords[n]['player_nick'], 3, 0, 255, 0) n = n + 1 end else outputDebugString("Wpis bezpośredni", 3, 0, 255, 0) executeSQLInsert( thisDriftMapName, "'"..driftNick.."','"..allDriftPoints.."','"..bestDrift.."','"..getRealDateTimeNowString().."'" ) end end end
-
Why do something that works if checking the "outputDebug", in the loop "while" dosen't? outputDebugString("Wartość [1].drift_record: " ..tableDriftRecords[1].drift_record, 3, 0, 255, 255) local i = 1 outputDebugString("Wartość [i][drift_record]: " ..tableDriftRecords[i]['drift_record'], 3, 0, 255, 255) local i = 1 local playerIdOldRecord = -1 while tableDriftRecords[i]['drift_record'] > allDriftPoints do i = i + 1 end
-
ERROR: unzipped\2paq_driftmeter\driftmeter_s.lua:>>>11<<<: attempt to concatenate field 'drift_record' (a nil value) addEvent('onMapStarting') addEventHandler('onMapStarting', g_rot, function(mapInfo, mapOptions, gameOptions) thisDriftMapName = "drift_records_on_map_" ..mapInfo.name executeSQLCreateTable ( thisDriftMapName, "player_nick TEXT, drift_record INTEGER, best_drift INTEGER, record_day TEXT" ) end ) function writeRecordToTable(driftNick, allDriftPoints, bestDrift, old_record) local tableDriftRecords = executeSQLSelect( thisDriftMapName, "player_nick", "drift_record", "best_drift", "record_day" ) if type( tableDriftRecords ) == "table" and #tableDriftRecords > 0 then outputDebugString("Test: " ..tableDriftRecords[1]['drift_record'], 3, 0, 255, 255) end end Edit: local tableDriftRecords = executeSQLSelect( thisDriftMapName, "player_nick, drift_record, best_drift, record_day" )
-
Why does the following function from a table in the database returns "nil"? local tableDriftRecords = executeSQLSelect( thisDriftMapName, "player_nick", "drift_record", "best_drift", "record_day" ) How to read an entire table from the database?
-
I want to save the table this way: executeSQLDropTable( thisDriftMapName ) local n = 1 while newtableDriftRecords[n] do executeSQLInsert( thisDriftMapName, "'"..newtableDriftRecords[n]['player_nick'].."','"..newtableDriftRecords[n]['drift_record'].."','"..newtableDriftRecords[n]['best_drift'].."','"..newtableDriftRecords[n]['record_day'].."'" ) n = n + 1 end I can't check it because appeared an error: second part of code line 5 (earlier post) local playerDriftRecords = executeSQLSelect( thisDriftMapName, "drift_record", "best_drift", "record_day", "player_nick='"..namePlayerDM.."'" ) third part of code line 2 (earlier post) local tableDriftRecords = executeSQLSelect( thisDriftMapName, "player_nick", "drift_record", "best_drift", "record_day" ) I have also question, how the function works: getMapName() I used it here and returns "none" addEventHandler('onResourceStart', g_ResRoot, function() thisDriftMapName = "drift_records-" ..getMapName() executeSQLCreateTable ( thisDriftMapName, "player_nick TEXT, drift_record INTEGER, best_drift INTEGER, record_day TEXT" ) end Resource starts by running from file "meta.xml" map
-
Now I trying to develop my script, I want to add a table of results combined with a map How to save a two-dimensional table ">>>newtableDriftRecords<<<" to the database? See the third part of code line 32 addEvent('onMapStarting') addEventHandler('onMapStarting', g_rot, function(mapInfo) thisDriftMapName = "drift_records-" ..mapInfo.name executeSQLCreateTable ( thisDriftMapName, "player_nick TEXT, drift_record INTEGER, best_drift INTEGER, record_day TEXT" ) end ) addEvent('onThisIsMyDriftPoints', true) addEventHandler('onThisIsMyDriftPoints', g_rot , function (allPlayerDriftPoints, bestPlayerDriftPoints, the_source) local namePlayerDM = getPlayerName ( the_source ) local playerDriftRecords = executeSQLSelect( thisDriftMapName, "drift_record", "best_drift", "record_day", "player_nick='"..namePlayerDM.."'" ) if ( type( playerDriftRecords ) == "table" and #playerDriftRecords == 0 ) or not playerDriftRecords then writeRecordToTable(namePlayerDM, allPlayerDriftPoints, bestPlayerDriftPoints, 0) elseif type( playerDriftRecords ) == "table" then if allPlayerDriftPoints > playerDriftRecords[1]['drift_record']then writeRecordToTable(namePlayerDM, allPlayerDriftPoints, bestPlayerDriftPoints, 1) end end end ) function writeRecordToTable(driftNick, allDriftPoints, bestDrift, old_record) local tableDriftRecords = executeSQLSelect( thisDriftMapName, "player_nick", "drift_record", "best_drift", "record_day" ) local newtableDriftRecords = tableDriftRecords if ( type( tableDriftRecords ) == "table" and #tableDriftRecords == 0 ) or not tableDriftRecords then outputConsole("nie ma tabeli tableDriftRecords" ) elseif type( tableDriftRecords ) == "table" then local i = 1 while tableDriftRecords[i]['drift_record'] > allDriftPoints do i = i + 1 end local playerIdOldRecord = -1 if old_record == 1 then playerIdOldRecord = 1 while tableDriftRecords[i]['player_nick'] ~= driftNick do playerIdOldRecord = playerIdOldRecord + 1 end end newtableDriftRecords[i]['player_nick'] = driftNick newtableDriftRecords[i]['drift_record'] = allDriftPoints newtableDriftRecords[i]['best_drift'] = bestDrift newtableDriftRecords[i]['record_day'] = getRealDateTimeNowString() local k while tableDriftRecords[i] do i = i + 1 k = i - 1 if playerIdOldRecord == k then break end newtableDriftRecords[i]['player_nick'] = newtableDriftRecords[k]['player_nick'] newtableDriftRecords[i]['drift_record'] = newtableDriftRecords[k]['drift_record'] newtableDriftRecords[i]['best_drift'] = newtableDriftRecords[k]['best_drift'] newtableDriftRecords[i]['record_day'] = newtableDriftRecords[k]['record_day'] end This table ">>>[b]newtableDriftRecords[/b]<<<" to database! --NEED HELP end end function getRealDateTimeNowString() return getRealDateTimeString( getRealTime() ) end function getRealDateTimeString( time ) return string.format( '%04d-%02d-%02d %02d:%02d:%02d' ,time.year + 1900 ,time.month + 1 ,time.monthday ,time.hour ,time.minute ,time.second ) end
-
bardzo fajny pomysł
-
I understand that createHandling is difficult to implement but do not be in the same way as the server checks if player has not modified the game files, check whether the player has files compatible with the file (standard) on the server?
-
I use: getElementData(hitPlayer, "state") == "alive"
-
How can I know that someone is in this mode (spectator)? I have a script in which players repeatedly pass through markers. It seems to me (I'm sure at 90%) that sometimes when someone is in spectator mode, watching a person who collects markers, once in a while this person (spectator) also collects markers! This happens in version 1.0.3, not tested on 1.0.4 ... If this problem is known (because I know that the same applies to the cp in fashion in the race earlier than version 1.0.4) and has been resolved then I have no problem, just do the update server. If, however, only a fixed race resource in this aspect, then my script will still work faulty ... I know when a player dies, and when then spawn but I do not know when it goes to spectator mode ...
-
works! very thanks for your help! I hope that the subject is clear and will also help another person
-
The first part work: INFO: Loading meta.xml - lap counter: race-wurstsaustraliangp function readNumberOfLapsFromMeta() local meta = xmlLoadFile(':' ..getResourceName( exports.mapmanager:getRunningGamemodeMap() ) .. '/' .. 'meta.xml') outputDebugString('Loading meta.xml - lap counter: '..getResourceName( exports.mapmanager:getRunningGamemodeMap() ), 3) if not meta then outputDebugString('Error while loading meta.xml - lap counter: no meta.xml', 2) return false end local settingsNode = xmlFindChild(meta, 'settings', 0) if not settingsNode then outputDebugString('Error while loading meta.xml - lap counter: no <settings>', 2) return false end ERROR: ERROR: Infinite/too long execution (2paq_laptimer) local i_xmlSetting = 0 xml_setting = xmlFindChild(settingsNode, 'setting', i_xmlSetting) while xml_setting do if xmlNodeGetAttributes(xml_setting) then local attrs = xmlNodeGetAttributes(xml_setting) if attrs.name == laps then numberOfAllLaps = attrs.value readNumberOfLaps() break end end i_xmlSetting = i_xmlSetting + 1 end end what do I wrong? Edit: xml_setting = xmlFindChild(settingsNode, 'setting', i_xmlSetting) while xml_setting do if xmlNodeGetAttributes(xml_setting) then local attrs = xmlNodeGetAttributes(xml_setting) if attrs.name == "laps" then numberOfAllLaps = attrs.value readNumberOfLaps() break end end i_xmlSetting = i_xmlSetting + 1 xml_setting = xmlFindChild(settingsNode, 'setting', i_xmlSetting) end
-
local meta = xmlLoadFile(':' ..getResourceName( exports.mapmanager:getRunningGamemodeMap() ) .. '/' .. 'meta.xml') ERROR: xmlLoadFile failed; ModifyOtherObjects in ACL denied resource 2paq_laptimer to access race-australiangp I hope that when added 2paq_laptimer to the ACL will work
-
The script that has to read the content meta.xml maps, it is run by meta.xml some (not all) maps. It is meta.xml of map: <?xml version="1.0" encoding="utf-16"?> <meta> <include resource="2paq_laptimer" /> (...) <settings> (...) <setting name="#laps" value="[14]" /> </settings> </meta> script I run something I need to read I tried this script, but I have error: ERROR: ...source-cache/unzipped/2paq_laptimer/lapcounter_s.lua:6: attempt to call global 'getRunningGamemodeMap' (a nil value) local g_rot = getRootElement() local g_ResRoot = getResourceRootElement(getThisResource()) local numberOfAllLaps = -1 function readNumberOfLapsFromMeta() local meta = xmlLoadFile(':' ..getResourceName( getRunningGamemodeMap() ) .. '/' .. 'meta.xml') if not meta then outputDebugString('Error while loading meta.xml - lap counter: no meta.xml', 2) return false end local settingsNode = xmlFindChild(meta, 'settings', 0) if not settingsNode then outputDebugString('Error while loading meta.xml - lap counter: no <settings>', 2) return false end local i_xmlSetting = 0 xml_setting = xmlFindChild(settingsNode, 'setting', i_xmlSetting) while xml_setting do if xmlNodeGetAttributes(xml_setting) then local attrs = xmlNodeGetAttributes(xml_setting) if attrs.name == laps then numberOfAllLaps = attrs.value readNumberOfLaps() break end end i_xmlSetting = i_xmlSetting + 1 end end
-
in this script driving baggage ile which I posted just put in resources folder and run the script, then the map ... I propose to play and see what the problem are not even that bad
-
http://media.moddb.com/images/mods/1/9/ ... -28-37.png the screenshot I mentioned, to my script, it's good as anyone of making mta looked no coincidence that some bugs in the code mode to suspend a server or client
-
Does anyone else have these maps? If anyone has the maps, please send in an e-mail to: pawelacp16[@t]yahoo.com
-
May be I bad described the problem ... I do not want someone to examine the script, but played this map and found that it is not a problem with the MTA
-
50p