Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2016-01-07, 15:26


krystek77







Wiek: 27
Na forum: 4031 dni
Posty: 135
Nick w MP: Krystek

Piwa: 176

Respekt: 125,3
Respekt: 125,3

Witam prosz? o troszke przerobienie skryptu na system paczek chcia?bym alby mi odliczalo np mam 20 kord?w gdzie sie znajduja paczki i np znajde jedna to pisze znalaz?e?/a? paczk? 2/20 Rozumiecie ?? ;D

Oto kod:



model 1279 -- id modelu jaki ma sie pokazaw danym kordzie nppaczka 
paczki = {} -- nie tykaj
paczki.id = {} -- nie tykaj tego
paczki.pozycje = {]
    {1525.45874,2202.04663,10.8203,1001},
    {1516.34839,2196.85156,10.8203,1002},
    {1529.32922,2186.31372,10.8203,1003},-- {X,Y,Z,Ile kaski}
}
addEventHandler("onResourceStart",resourceRoot,
function()
    for i,v in pairs(paczki.pozycje) do
        local takapaka createPickup(v[1],v[2],v[3],3,model,0,1)
        paczki.id[takapaka] = i
        addEventHandler("onPickupHit",takapaka,
            function(plr)
                local pack_id paczki.id[i]
                local playeraccount getPlayerAccount(plr)
                if getAccountData(playeraccount"gifciki.uzyte.".. tostring(v)) == false then
                    setAccountData playeraccount"gifciki.uzyte.".. tostring(v), true)
                    local hajsy v[4]
                    givePlayerMoney(plr,hajsy)
                    outputChatBox("Znalaz?e? paczke zgarnasz ".. tostring(hajsy) .."Z?!",plr,1,2,255)
                else
                    outputChatBox("Podnios?e? ju? ten paczke.",plr,255,0,0)
                end
            end)
    end
end)

function getPackID(e)
    local pack_id paczki.id[e] or false
    return pack_id
end


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-07, 15:44


#404







Wiek: 26
Na forum: 4771 dni
Posty: 1438

Piwa: 2512

Respekt: 833,5
Respekt: 833,5Respekt: 833,5

Ostrzeżeń: 60%

outputChatBox("Znalaz?e? paczke nr "..tostring(V).."/"..#paczki.pozycje,plr,1,2,255)


Takie co? powinno dzia?a?.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-08, 15:16


krystek77







Wiek: 27
Na forum: 4031 dni
Posty: 135
Nick w MP: Krystek

Piwa: 176

Respekt: 125,3
Respekt: 125,3

"DestroY" napisał/a:


outputChatBox("Znalaz?e? paczke nr "..tostring(V).."/"..#paczki.pozycje,plr,1,2,255)


Takie co? powinno dzia?a?.



Takie cos mi wyskoczylo ten kod co dales dalem pod
outputChatBox("Znalaz?e? paczke zgarnasz ".. tostring(hajsy) .."Z?!",plr,1,2,255)


Znalaz?e? paczke zgarnasz 1003Z?!
Znalaz?e? paczke nr nil/3

Czy to ma jakies znaczenie robilem do w map editor pod f5 ;D

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-08, 20:28


Habut







Wiek: 24
Na forum: 3897 dni
Posty: 14
Nick w MP: Habut

Piwa: 151

Respekt: 50

Przosze o przerobienie skryptu z Suszarki konkursowej gtao poniewa? suszarka dzia?a tylko dla rcon?w i nie umiem zmienic zeby dzialala dla calej administracji
addEvent('doAdminToolAction', true);

local adminGroup = ACLGroup.get('SuperModerator');

local adminGroup = ACLGroup.get('Moderator');

local adminGroup = ACLGroup.get('Admin');

addCommandHandler('suszarka', function(player, cmd)
if player.account.name then
if isObjectInACLGroup('user.'..player.account.name, adminGroup) then
local state = not (player:getData('adminTool'));

player:setData('adminTool', state);

if state then
player:outputChat('Suszarka administratora zosta?a w??czona!', 0, 255, 0);
player:outputChat('Wystarczy nacelowa? na pojazd, wybra? opcj? k??kiem myszy i potwierdzi? klikaj?c LPM.', 0, 255, 0);
else
player:outputChat('Suszarka administratora zosta?a wy??czona.', 255, 150, 0);
end

triggerClientEvent(player, 'onClientToggleAdminTool', player, state);
end
end
end);

addEventHandler('doAdminToolAction', root, function(element, actionID, actionName)
--outputChatBox('Akcja '..actionName..' [ID '..actionID..'] na elemencie '..tostring(element))

if actionID == 1 then --naprawa
element:fix();
source:outputChat('Naprawi?e? pojazd suszark? administratora! [Opcja '..actionID..']', 0, 255, 0);
elseif actionID == 2 then --obr?cenie
local rotVec = element:getRotation();
element:setRotation(rotVec.x, 0, rotVec.z);
source:outputChat('Postawi?e? pojazd na ko?a suszark? administratora! [Opcja '..actionID..']', 0, 255, 0);
elseif actionID == 3 then --zniszczenie
element:destroy();
source:outputChat('Zniszczy?e? pojazd suszark? administratora! [Opcja '..actionID..']', 0, 255, 0);
elseif actionID == 4 or actionID == 5 or actionID == 6 then
source:outputChat('Suszarka admnistratora dla GTAO. Przyk?adowa opcja [Opcja '..actionID..']'..actionID, 0, 255, 0);
end

local time = getRealTime();

outputServerLog('SUSZARA (PRACA KONKURSOWA GTAO.pl) > '..source.name..' ('..source.account.name..') > '..actionName..' [ID '..actionID..'] > '..time.hour..':'..time.minute..')')
outputDebugString('SUSZARA (PRACA KONKURSOWA GTAO.pl) > '..source.name..' ('..source.account.name..') > '..actionName..' [ID '..actionID..'] > '..time.hour..':'..time.minute..')')
Timer(toggleControl, 700, 1, source, 'fire', true);
end);

[ Dodano: 2016-01-08, 20:37 ]
DestroY, Prosze o pomoc

Podpis
Postawiłem ci piwo Liczek że dostane też w zamian :)
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-10, 12:41


Pawlodrygas







Wiek: 34
Na forum: 3803 dni
Posty: 12
Nick w MP: Paprec



Respekt: 50

Witam chcia?bym ?eby w panelu logowania monia gra?a muzyka.
Wgra?em do folderu plik o nazwie music.mp3
I r?wnie? doda?em go do mety!
<meta>
<info author="Monio" name="Panel Logowania v1.0" version="1.0"/>
<oop>true</oop>
<script src="Source_C.lua" type="client"/>
<script src="Source_S.lua" type="server"/>
<script src="music.mp3" type="server"/>
</meta>
Prosze o pomoc

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-12, 07:07


wiko191







Wiek: 25
Na forum: 3935 dni
Posty: 7
Nick w MP: Wiko191

Piwa: 1

Respekt: 60

Witam chcia?bym by przerobi? ten skrypt http://gtao.pl/93386.htm .Jest to skrypt na komputer osp ale jest tam jeden b??d.Po w??czeniu syreny s?yszy j? tylko osoba kt?ra j? w??czy?a.Wi?c prosz? o przerobienie tego skryptu :)
PS. Nagradzam :arrow: :piwo:

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-13, 15:17


Bakomaisty







Wiek: 18
Na forum: 3815 dni
Posty: 11



Respekt: 50

Siemka poszukuje osoby co pomo?e mi przerobi? ten oto kawa?ek aby on chodzi? bo ju? pr?bowa?em robi? na wiele sposob?w i nadal nic :(
addEvent("baga?nik", true)
addEventHandler("baga?nik", root, function()
local pojazd = getPedOccupiedVehicle(source)
if pojazd then
local engine = getVehicleEngineState(pojazd)
if engine == false then
setVehicleEngineState(pojazd, true)
else
setVehicleEngineState(pojazd, false)
end
end
end)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-20, 11:16


Patrix100

Amator LUA.






Wiek: 26
Na forum: 3887 dni
Posty: 182
Nick w MP: .:Patrix:.

Piwa: 952

Respekt: 40,5

Przerobi mi ktos ten skrypt ?eby ta komenda dzia?a?a tylko dla RCON, Admin, Moderator

http://pastebin.com/5AtY5kve

Podpis
Pomogłem? Wystarczy że podziękujesz albo dasz respekt :D
Wole respekt niz piwka :P
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-22, 13:51


TheWejbik







Wiek: 36
Na forum: 3792 dni
Posty: 7
Nick w MP: TheWejbik



Respekt: 50

Witajcie przyjaciele!
Wie kto? jak zrobi? aby tych komend mog?a u?ywa? jedynie ranga Admin, Rcon i moderator z acl? Skrypt z internetu. Jestem skrypterem na poziomie -1, nawet sam skrypt?w prostych tworzy? nie umiem bo si? dopiero ucz?.

Kod:


addCommandHandler("ls", function(el,md)
local gracz = el
if isPedInVehicle(el) then gracz = getPedOccupiedVehicle(el) end
setElementPosition(gracz, 2500.5952, -1669.4454, 13.3532)
outputChatBox("Witamy w Los Santos.", el, 255, 255, 0)
end)

addCommandHandler("dw", function(el,md)
local gracz = el
if isPedInVehicle(el) then gracz = getPedOccupiedVehicle(el) end
setElementPosition(gracz, -2162.03,252.79,35.32)
outputChatBox("Witamy przy domie wejbika.", el, 255, 255, 0)
end)

addCommandHandler("adm", function(el,md)
local gracz = el
if isPedInVehicle(el) then gracz = getPedOccupiedVehicle(el) end
setElementPosition(gracz, -2166.42, 254.90, 1001.33)
outputChatBox("Witamy w bazie administracji.", el, 255, 255, 0)
end)

addCommandHandler("lv", function(el,md)
local gracz = el
if isPedInVehicle(el) then gracz = getPedOccupiedVehicle(el) end
setElementPosition(gracz, 2140.8190, 986.2273, 10.8203)
outputChatBox("Witamy w Las Venturas.", el, 255, 255, 0)
end)

addCommandHandler("sf", function(el,md)
local gracz = el
if isPedInVehicle(el) then gracz = getPedOccupiedVehicle(el) end
setElementPosition(gracz, -2044.92,470.53,35.17)
outputChatBox("Witamy w San Fierro.", el, 255, 255, 0)
end)

addCommandHandler("lslot", function(el,md)
local gracz = el
if isPedInVehicle(el) then gracz = getPedOccupiedVehicle(el) end
setElementPosition(gracz, 1945.4160, -2305.6423, 15.0583)
outputChatBox("Witamy na Lotnisku w Los Santos.", el, 255, 255, 0)
end)

addCommandHandler("salonsf", function(el,md)
local gracz = el
if isPedInVehicle(el) then gracz = getPedOccupiedVehicle(el) end
setElementPosition(gracz, -1952.19, 262.57, 35.47)
outputChatBox("Witamy przed salonem w SF.", el, 255, 255, 0)
end)

addCommandHandler("pustynia", function(el,md)
local gracz = el
if isPedInVehicle(el) then gracz = getPedOccupiedVehicle(el) end
setElementPosition(gracz, 428.4866, 2533.7695, 16.5045)
outputChatBox("Witamy na pustyni.", el, 255, 255, 0)
end)

addCommandHandler("kgp", function(el,md)
local gracz = el
if isPedInVehicle(el) then gracz = getPedOccupiedVehicle(el) end
setElementPosition(gracz, -1606.41,722.23,12.13)
outputChatBox("Witamy przy kgp.", el, 255, 255, 0)
end)

addCommandHandler("nigdzie", function(el,md)
local gracz = el
if isPedInVehicle(el) then gracz = getPedOccupiedVehicle(el) end
setElementPosition(gracz, 0, 0, 0)
outputChatBox("witamy nigdzie.", el, 255, 255, 0)
end)

addCommandHandler("tama", function(el,md)
local gracz = el
if isPedInVehicle(el) then gracz = getPedOccupiedVehicle(el) end
setElementPosition(gracz, -924.3400, 2019.7234, 60.9141)
outputChatBox("Witamy na tamie.", el, 255, 255, 0)
end)

addCommandHandler("stadion", function(el,md)
local gracz = el
if isPedInVehicle(el) then gracz = getPedOccupiedVehicle(el) end
setElementPosition(gracz, -1367.2737, 1566.3998, 1052.5313)
outputChatBox("Witamy na stadionie.", el, 255, 255, 0)
end)

addCommandHandler("molo", function(el,md)
local gracz = el
if isPedInVehicle(el) then gracz = getPedOccupiedVehicle(el) end
setElementPosition(gracz, 836.2119, -2057.7136, 12.8671)
outputChatBox("Witamy na molo.", el, 255, 255, 0)
end)

addCommandHandler("mechsf", function(el,md)
local gracz = el
if isPedInVehicle(el) then gracz = getPedOccupiedVehicle(el) end
setElementPosition(gracz, -2014.20,171.76,27.68)
outputChatBox("Witamy przy mechaniku.", el, 255, 255, 0)
end)

addCommandHandler("port", function(el,md)
local gracz = el
if isPedInVehicle(el) then gracz = getPedOccupiedVehicle(el) end
setElementPosition(gracz, 2294.0693, 558.9081, 7.7813)
outputChatBox("Witamy w porcie.", el, 255, 255, 0)
end)

addCommandHandler("mc", function(el,md)
local gracz = el
if isPedInVehicle(el) then gracz = getPedOccupiedVehicle(el) end
setElementPosition(gracz, -2301.9609, -1648.8076, 483.6195)
outputChatBox("Witamy na MountChilliad", el, 255, 255, 0)
end)

addCommandHandler("prawko", function(el,md)
local gracz = el
if isPedInVehicle(el) then gracz = getPedOccupiedVehicle(el) end
setElementPosition(gracz, -232.14,2695.58,62.69)
outputChatBox("Witamy w miejscu zdawania prawa jazdy", el, 255, 255, 0)
end)

addCommandHandler("wyskok", function(el,md)
local gracz = el
if isPedInVehicle(el) then gracz = getPedOccupiedVehicle(el) end
setElementPosition(gracz, 2071.7295, 284.0156, 403.1366)
outputChatBox("Witamy na wyskoku", el, 255, 255, 0)
end)

addCommandHandler("tor", function(el,md)
local gracz = el
if isPedInVehicle(el) then gracz = getPedOccupiedVehicle(el) end
setElementPosition(gracz, 1319.34, -1589.29, 13.55)
outputChatBox("Witamy na torze", el, 255, 255, 0)
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-22, 16:57


#404







Wiek: 26
Na forum: 4771 dni
Posty: 1438

Piwa: 2512

Respekt: 833,5
Respekt: 833,5Respekt: 833,5

Ostrzeżeń: 60%

local gracz el 
konto getPlayerAccount(gracz)
if not konto then return end
      accname getAccountName (konto )
      if isObjectInACLGroup "user." .. accname aclGetGroup "grupa 1" ) ) or isObjectInACLGroup "user." .. accname aclGetGroup "grupa 2" ) ) or isObjectInACLGroup "user." .. accname aclGetGroup "grupa 13" ) ) then


Tak, podmieniasz tam po tym gracz = el, to co masz tutaj w pierwszej linijce no i przed nawiasem ko?cz?cym dodajesz jednego end'a

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-22, 21:05


TheWejbik







Wiek: 36
Na forum: 3792 dni
Posty: 7
Nick w MP: TheWejbik



Respekt: 50

"DestroY" napisał/a:


local gracz el 
konto getPlayerAccount(gracz)
if not konto then return end
      accname getAccountName (konto )
      if isObjectInACLGroup "user." .. accname aclGetGroup "grupa 1" ) ) or isObjectInACLGroup "user." .. accname aclGetGroup "grupa 2" ) ) or isObjectInACLGroup "user." .. accname aclGetGroup "grupa 13" ) ) then


Tak, podmieniasz tam po tym gracz = el, to co masz tutaj w pierwszej linijce no i przed nawiasem ko?cz?cym dodajesz jednego end'a




addCommandHandler("ls", function(el,md)
    local gracz el
    konto getPlayerAccount(gracz)
    if not konto then return end
          name getAccountName (konto )
          if isObjectInACLGroup "user." .. accname aclGetGroup "admin" ) ) or isObjectInACLGroup "user." .. accname aclGetGroup "rcon" ) ) or isObjectInACLGroup "user." .. accname aclGetGroup "moderator" ) ) then
    if isPedInVehicle(elthen gracz getPedOccupiedVehicle(elend)
    setElementPosition(gracz2500.5952, -1669.445413.3532)
    outputChatBox("Witamy w Los Santos."el2552550)
end)


Co? w tym stylu? Do ka?dego?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-23, 01:41


#404







Wiek: 26
Na forum: 4771 dni
Posty: 1438

Piwa: 2512

Respekt: 833,5
Respekt: 833,5Respekt: 833,5

Ostrzeżeń: 60%
TheWejbik, tak, najwyzej podaj b??dy z db3 jak beda jakie?, no i je?eli co? bedzie w pierwszej kolejno?ci sprawdz dokladnie nazwy rang, liczy sie wielkosc liter, bo na pierwszy rzut oka wszystko dobrze.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-23, 01:58


SWRS







Wiek: 30
Na forum: 3809 dni
Posty: 39

Piwa: 1

Respekt: 50

Ostrzeżeń: 60%
DestroY, Wielko?? liter chyba ma znaczenie :)

Powinno by? tak:

addCommandHandler("ls", function(el,md)
    local gracz el
    konto getPlayerAccount(gracz)
    if not konto then return end
          name getAccountName (konto )
          if isObjectInACLGroup "user." .. accname aclGetGroup "Admin" ) ) or isObjectInACLGroup "user." .. accname aclGetGroup "RCON" ) ) or isObjectInACLGroup "user." .. accname aclGetGroup "Moderator" ) ) then
    if isPedInVehicle(elthen gracz getPedOccupiedVehicle(elend)
    setElementPosition(gracz2500.5952, -1669.445413.3532)
    outputChatBox("Witamy w Los Santos."el2552550)
end)


Po prostu, przy nazwach z ACL nie da? poprawnych liter, dlatego nie dzia?a?o (Moim zdaniem)

[ Komentarz dodany przez: DestroY: 2016-01-23, 02:29 ]
No napisa?em to ;P Kwestia te? tego, jak on ma to wpisanez bo mo?e mie? inaczej bo sobie edytowa?.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-02-02, 07:52


kzum91







Wiek: 31
Na forum: 3955 dni
Posty: 7



Respekt: 50

http://www100.zippyshare.com/v/qCLsc0wW/file.html

Jest to system zapisu aut. W folderze jest plik z kodem. Jest tam komenda /stworzpojazd czy ktos moze to zrobic aby ta komenda byla tylko dla RCON ?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-02-02, 10:27


venzikk

LUA, MODELER






Wiek: 24
Na forum: 3823 dni
Posty: 235
Nick w MP: VenZ

Piwa: 3158

Respekt: 240
Respekt: 240Respekt: 240

Tam gdzie masz funkcj? stw?rz veh musisz doda? cos takiego


  if isObjectInACLGroup "user." .. accname aclGetGroup "RCON" ) ) then


Podpis



Hej
,Tak ty! Pomogłem ci? zostaw
:piwo:


Pomagam w miarę możliwości :)

Kontakt:
Discord: VenZio#8080
GG:63293490
skype:szymex1021
Postaw piwo autorowi tego posta
 

 
Tagi: prośby :: przerobienie :: skryptu
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Zasoby do MTA » PROŚBY O PRZEROBIENIE SKRYPTU Odpowiedz do tematu

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku