Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: fix
1. bazy danych fix
Kod:

[19-01-22 13:20] ADMIN: Resource 'DB' started by ALLJ
[19-01-22 13:20] startResource: Resource 'DB' started
[19-01-22 13:20] ERROR: [Ważne Skrypty]/DB/sql.lua:20: attempt to call global 'mysql_connect' (a nil value)
[19-01-22 13:20] Starting DB
[19-01-22 13:20] ADMIN: Resource 'ogrpg-db' started by ALLJ
[19-01-22 13:20] startResource: Resource 'ogrpg-db' started
[19-01-22 13:20] ERROR: [Ważne Skrypty]/ogrpg-db/s_db.lua:54: attempt to call global 'mysql_connect' (a nil value)
[19-01-22 13:20] INFO: [DEV] Connection with Database not found.
[19-01-22 13:20] WARNING: [Ważne Skrypty]/ogrpg-db/s_db.lua:33: Bad usage @ 'dbConnect' [Can't connect to MySQL server on 'xKGWpXkxvAKz' (111)]
[19-01-22 13:20] Starting ogrpg-db
[19-01-22 13:20] Use the 'upgrade' command to perform a basic upgrade of resources.
[19-01-22 13:20] WARNING: ogrpg-db requires upgrade as <min_mta_version> section in the meta.xml is incorrect or missing (expected at least server 1.5.2 because of 'dbPrepareString')
[19-01-22 13:20] WARNING: ogrpg-db <min_mta_version> section in the meta.xml is incorrect or missing (expected at least server 1.5.2 because of 'dbPrepareString')
[19-01-22 13:20] ADMIN: Resource 'DB2' started by ALLJ
[19-01-22 13:20] startResource: Resource 'DB2' started
[19-01-22 13:20] Starting DB2
ktos cos zaradzi?[/list]
2. Trailer fix
Witam wszystkich! :D

Czy istnieje jaki? darmowy skrypt synchronizacji naczep? Je?li tak to gdzie bo nie mog? ?adnego znale??. Je?li nie, jak napisa? go samemu? W sensie potrzebuj? logicznego krok po kroku (nie chc? gotowca). Z g?ry dzi?kuj? za pomoc.
3. FIX, PREMIUMPLUS
Witam mam problem posiadam paczke z ya, przerobion?, mam komendy dajpremium dajpremiumplus, mog? tylko sobie nada? premium, lecz np. mojemu koledze nie mog?, Nawet jak daje sobie premium to potem jak wyjde z serwera to si? to nie zapisuje. Z g?ry dzi?ki.

[ Dodano : 2018-09-14, 18:30 ]
JEDNAK CO SIE OKAZA?O DA SIE DAC PREMIUM I PREMIUM PLUS ZA POMOCA KOMENDY LOSPREMIUM CZYLI LOSUJ PREMIUM TAK WYGLADA LINJIKA NA DajPremium : addCommandHandler("dajpremiumplus",function(plr,cmd,cel,dni)
if getAdmin(plr,5) then
if not cel then outputChatBox("/dajpremiumplus [gracz] [dni]",plr) return end
if not dni then outputChatBox("/dajpremiumplus [gracz] [dni]",plr) return end
if not tonumber(dni) then outputChatBox("/dajpremium [gracz] [dni]",plr) return end
local target=exports["tiyl-core"]:findPlayer(plr,cel)
if not target then
outputChatBox("* Nie znaleziono podanego gracza.", plr, 255, 0, 0)
return
end
setPremiumDay(target,dni)
outputChatBox("Nadano konto PREMIUM+ na "..dni.." dni!", plr, 255, 128, 64)
outputChatBox("Otrzymales konto PREMIUM+ na "..dni.." dni!", target, 255, 128, 64)
setElementData(plr,"player:svip",true)
triggerEvent("save:player",root,target)
triggerEvent("load:player",root,target)
end
end)

function getPremiumDate(plr)
local queryA=exports['tiyl-db']:dbGet("SELECT * FROM tiyl_gracze...
4. [SKRYPT] Mechanik/punkt naprawy p
Gdy gracz wjedzie w marker freezuje go na 5 sek i naprawia pojazd. Koszt naprawy to 50$.

Ukryta wiadomość / Hidden message(aby ją zobaczyć musisz postawić użytkownikowi)
Wiadomość została ukryta, aby ją przeczytać należy się zalogować.


Zapraszam do oceny :) .
5. FIX VEHICLE
Co ?le zrobi?em?
createMarker(-1906.392578125,273.6123046875,41.039070129395 ,"cylinder",1,255,0,255)

function 
fix(source)
veh getOcuppierVehicle
setElementHealth 
(1000veh)
end
addEventHandler
("onMarkerHit"sourcem)
6. Destroy i fix
Kod:

addEventHandler 
"onElementClicked"root,
    function ( 
mouseButton )
        
local elementType getElementType source )
        if ( 
elementType == "vehicle" then
            
if ( mouseButton == "left" then -- niszczenie
                destroyElement 
source )
            elseif ( 
mouseButton == "right" then -- naprawa
                fixVehicle 
source )
            
end
        
elseif ( elementType == "player" then
            local car 
getPedOccupiedVehicle source )
            if ( 
mouseButton == "left" then -- niszczenie
                destroyElement 
car )
            elseif ( 
mouseButton == "right" then -- naprawa
                fixVehicle 
car )
            
end
        end
    end
)


Konsola wywala:
Kod:


WARNING:13: Bad argument @ 'destroyElement' [Expected element at argument 1, got boolean]
WARNING:15: Bad argument @ 'fixVehicle' [Expected element at argument 1, got boolean]


Fix/destroy :p dzia?a tylko w panelu (p) po szybkim klikni?ciu myszk? podczas jego otwierania ..
Chodzi o destroy lub fix za pomoc? broni ;p (lewy,prawy przycisk)

ps:ten kawa?ek kodu jest dopisywany do skryptu getspeedtool od nBanan, [PRT]MasterGamer

edit: skrypt jest po stronie servera

Nast?pnym razem u?ywaj znacznik?w od Lua i Code.//DestroY
7. [PLUGIN] Server Full Attack Fix
Plugin zabezpiecza przed atakami typu "Server Full" za pomoc? nieprawdziwych adres?w IP.

Link:
https://github.com/grasmanek94/AntiServerFullAttackFix

Kompilacja:
Kod:

wget https://github.com/grasmanek94/AntiServerFullAttackFix/archive/master.zip
unzip master.zip
cd ./AntiServerFullAttackFix-master
make AntiServerFullFix


Kompatybilno??:
- SA-MP 0.3z-R4 Windows
- SA-MP 0.3z-R4 Linux
- SA-MP 0.3z-R4 Linux-1000p
8. Panel fix itp.
Witajcie, dzisiaj zrobi?em panel aby da? fix, flip i nitro. Ale wla?nie, tutaj problem.

B??d?w w debugu zero.

Client:
[lua]function dajnitro ()
if (source == nitrotn) then
triggerServerEvent("buyNitro", getRootElement())
end
end
addEventHandler("onClientGUIClick", nitrobtn, dajfix)

function dajfix ()
if (source == fixbtn) then
triggerServerEvent("buyRepair", getRootElement())
end
end
addEventHandler("onClientGUIClick", fixbtn, dajfix)

function dajflipa ()
if (source == flipbtn) then
triggerServerEvent("buyFlip", getRootElement())
end
end
addEventHandler("onClientGUIClick", fliptn, dajflipa [/lua]

Server:
[lua]addEvent("buyNitro", true)
addEventHandler("buyNitro", rootElement,
function()
if isPedInVehicle(source) then
if ( getPlayerMoney (source) >= 7000 ) then
takePlayerMoney(source, 7000)
addVehicleUpgrade(getPedOccupiedVehicle(source),1010)
outputChatBox("Nitro dodano", source, 255, 255, 0, true)
else
outputChatBox("Nie masz tyle kasy.", source, 255, 0, 0, true)
end
else
outputChatBox("Nie jestes w aucie", source, 255, 0, 0, true)
end
end
)

addEvent("buyRepair", true)
addEventHandler("buyRepair", rootElement,
function()
if isPedInVehicle(source) then
if ( getPlayerMoney (source) >= 40 ) th...