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: nic
1. bazadanych nie zapisuje sie nic
Witam mam problem mam na serwerze paczke spaceMTA i jest nie zapisuje hajsu , srp pomoże ktoś w konsoli nie ma błędów żadnych ani w debugscript 3 auta zapisuje pomoże ktoś ?
/duty też działa
2. Po wejściu w marker nic się nie dzieje
Cze??,
Pr?buj? si? dalej uczy? lua, ale oczywi?cie jeszcze nie pojmuje jakie funkcje bra? i gdzie, no chyba ?e kojarze jakie? rzeczy, daltego narazie postanowi?em tworzy? jakie? ma?e skrypty z pomoc? linijek z innych skrypt?w, ale zrobi? tak aby to dzia?a?o i ?adnie wygl?da?o.

Borykam si? z problemem, ?e gdy rozpoczniemy prac?, daje nam randomowy marker, i po wej?ciu w ten marker powinna by? animacja "?cinania czego?" oraz po zako?czeniu animacji dostawania kasy, lecz po wej?ciu w marker nic si? nie dzieje, dlaczego?

[lua]
--[[
Skrypt: Praca zbieracza Marihuany.
Autor Skryptu: Rynberto
Nie masz prawa u?ycia kodu skryptu bez mojej zgody.
Skrypt utworzony 09.11.2019
]]

createBlip(1102.35, -1189.51, 18.32, 46,2,0,0,0,0,0,275) -- Blip Pracy

local markerPraca = createMarker(1102.35, -1189.51, 17.32, "cylinder", 2.0, 133, 133, 133, 50) -- Marker rozpocz?cia pracy

local punktyMarycha = {
{1106.44, -1218.19, 18.24},
{1100.63, -1217.34, 18.24},
{1095.28, -1216.79, 18.24},
}

function MarkerHit ( hitPlayer, matchingDimension )
setElementData(localPlayer, "praca:hodowca", true)
showCursor(true)
setElementFrozen ( localPlayer, true)
vehicle = getPedOccupiedVehicle ( hitPlayer ) -- Je?li gracz b?dzie chcia? wej?? w marker i pracowa? w aucie, to nie b?dzie m?g? tego zrobi?
if hitPlayer ~= localPlayer then return end
if source == markerPraca then
HandleTheRendering() -- poka...
3. nic się nie dzieje po wejściu w marker


        s1 
createMarker(2202.74, -2852.5913.29-1"cylinder"302550100)
        
addEventHandler("onClientMarkerHit"s1, function(elmd)
            if (
el == getLocalPlayer() and mdthen
           
if (exports.global:hasItem(el34"1")) then
                exports
.hud:sendBottomNotification(el"Korner""Pomy?lnie sprzeda?e? kokaine."
                
exports.global:giveMoney(el100)
end
else
                
exports.hud:sendBottomNotification(el"Korner""Nie masz kokainy."
end
end
)

w db3 nic nie ma i pr?bowa?em z przedmiotem i bez przedmiotu i nic

jest to s-side
dlatego troch? pozmienia?em i oto rezultat

       s2 
createMarker(2404.68, -1343.5925.23-1"cylinder"302550100)
        
addEventHandler("onPlayerMarkerHit"s2, function()
                
exports.global:giveMoney(source100)
end)
4. Nic się nie dzieje po wejściu w marker.
Cze??, dopiero zaczynam z LUA i chcia?em stworzy? marker w kt?rym po wej?ciu tworzy
si? pojazd. Lecz gdy wchodz? w marker to nic si? nie dzieje.

local marker createMarker(2402, -171912.5"cylinder"2.5,25.5,150,2)

function 
MarkerHit hitPlayermatchingDimension )
createVehicle(2782417, -171714)
end
addEventHandler 
"onClientMarkerHit"getRootElement(), MarkerHit )
5. Nic się nie dzieje po wejściu w marker
Kod:

bramaSMSA = createObject ( 969, -2091.1001, 1341.6, 6.2, 0, 0, 338 )
marker = createMarker ( -2086.6999511719, 1340.3000488281, 6.1999998092651, "cylinder", 9)

function OtworzSMSA ()
if isPlayerinFaction then
moveObject ( bramaSMSA, 2500, -2091.1001, 1341.6, 2.8 )
setTimer ( function ()
outputChatBox ( "Brama automatycznie zamknie si? za 10 sekund!", player)
end, 10000, 1)
end
moveObject (bramaSMSA, 2500, -2091.1001, 1341.6, 6.2 )
end
addEventHandler ("onMarkerHit", marker, OtworzSMSA)


function isPlayerInFaction(plr)
local sid=getElementData(plr,'player:sid')
if not sid then return end

local result=exports['pystories-db']:dbGet('SELECT 1 FROM pystories_factions WHERE code=? AND sid=? LIMIT 1;', "SMSA", sid)
if result[1] then
return true
else
return false
end
end

Gdy wchodze w marker nic sie nie dzieje, jestem w frakcji, nie ma ?adnych b??d?w w db3
6. Nic się nie dzieje po wejściu w marker
Witam mam problem ot?? polega on na tym ?e tworze marker oddawania paczki lecz gdy w niego wejd? nic si? nie dzieje. Brak b??d?w w DB3. Zaznaczam funkcje gdzie tworze marker tym --<<<<.

Client:
bindKey("H""down", function()
    if 
isElementWithinMarker(localPlayermarkerZABIERANIAthen else return end
            
if getElementData(localPlayer"praca:magazyn") == true then
             losuj 
math.random 1#markery )
             
markery createMarker(markery[losuj][1],markery[losuj][2],markery[losuj][3])--<<<<.
             
blip createBlipAttachedTo(markery41)
             
setElementData(localPlayer,"mamskrzynke",true)
             
box createObject(1271000)
             
attachElementsboxlocalPlayer00.80.5)
             
triggerServerEvent("klawisze"localPlayer)
           else
             
outputChatBox("Nie pracujesz jako Magazynier.")
           
end
end
)

function 
zabierzidaj()
    if 
localPlayer == markery then
      setElementData
(localPlayer,"wezpaczke"false)  
      
setElementData(localPlayer,"mamskrzynke"false)
      
destroyElement(markery)
      
destroyElement(blip)
      
destroyElement(box)
      
triggerServerEvent("klawZabierz"localPlayer)
      
triggerServerEvent("hajs:paczka"localPlayer)
    
end
end
7. Nic się nie dzieje po zarejestrowaniu/zalogowaniu *gm dayz*
Witam, wgra?em paczk? Dayza i nic si? nie dzieje po zalogowaniu.

https://i.imgur.com/IEK6vmR.jpg
8. Nic się nie dzieje
Witam. Mam taka komend?. Po wpisaniu /kup [id] nic si? nie dzieje. Oto kod:

Kod:


CMD:kup(playerid, params[])
{

new id;
if(sscanf(params,"d",id))
return SendClientMessage(playerid,Zielony,"/kup[id]");

LoadedInfo[Houses]++;
new idh = LoadedInfo[Houses];

if(HouseInfo[idh][sell] == 1)
{

if(GetMoneyEx(playerid) <= HouseInfo[idh][Cena])
return SendClientMessage(playerid,Zielony,"nie masz tyle $");


SendClientMessage(playerid, Szary, "kupiles domelk!");
}
return 1;
}

Prosze o szybka pomoc.
9. Nic się nie dzieje
Witam. Mam taki problem. Zrobi?em komend? na wyrzucanie gracza. Po wpisaniu /kick pojawia si? okno gdzie mamy wpisac id gracza. Po wpisaniu id i naci?ni?ciu enter nic si? nie dzieje.
Kod:
Kod:


CMD:kick(playerid, params[])
{
ShowPlayerDialog(playerid,Paneld, DIALOG_STYLE_INPUT, "Wyrzuc gracza", "Wpisz id gracza", "Wyrzuc", "Anuluj");
return 1;
}


Wyrzucanie gracza:
Kod:


if(dialogid == Paneld)
{
if(response == 0)
{
SendClientMessage(playerid,Szary,"# Anulowales wyrzucenie gracza");
}
if(response == 1)
{
if(listitem == 0)
{

new id = strval(inputtext);


new string[32];
format(string, sizeof(string), "Gracz id %d wyrzucil gracza %s", playerid, inputtext);
SendClientMessage(playerid, Szary, string);
Kick( id );

}
}
return 1;
}


Prosze o szybk? pomoc.
10. Nic nie robi po kliknięciu
Mam problem poniewa? po kliknienciu rozpocznij prace nic sie nie dziej

Client

[lua]addEventHandler("onClientGUIClick", root, function(btn,state)
if source == PracaBusLs.submit then
showCursor(false)
guiSetVisible(PracaBusLs.window, false)
guiSetVisible(PracaBusLs.submit, false)
guiSetVisible(PracaBusLs.close, false)
guiSetVisible(PracaBusLs.text, false)
removeEventHandler("onClientRender",root,pracabusls)
triggerServerEvent("PracaStartBusLs", root,localPlayer)
end
if source == PracaBusLs.close then
if guiGetVisible(PracaBusLs.window) == true then
showCursor(false)
guiSetVisible(PracaBusLs.window, false)
guiSetVisible(PracaBusLs.submit, false)
guiSetVisible(PracaBusLs.close, false)
guiSetVisible(PracaBusLs.text, false)
removeEventHandler("onClientRender",root,pracabusls)
end
end
end)[/lua]

Server

[lua]addEvent("PracaStartBusLs", true)
addEventHandler("PracaStartBusLs", resourceRoot, function(el, md)
if #getElementsWithinColShape(zone,"vehicle") >= 1 then outputChatBox("Parking zajety",el) return end
if getElementData(el,"player:license:pjC") ~= 1 then
outputChatBox("Nie posiadasz Prawojazdy kategori C", source)
return
end

if not md or getElementType(el) ~= "player" or getPedOccupiedVehicle(el) then return end

local x,y,z = getEleme...
11. Gracz dołącza i nic się nie dzieje
Gracz normalnie do??cza do gry

addEventHandler('onPlayerJoin'root, function(playerNickplayerIPplayerUsernameplayerSerial)
    
local result=exports['pystories-db']:dbGet('SELECT * FROM pystories_ban WHERE active=1 AND serial=? AND time>NOW() LIMIT 1;'playerSerial)
    if 
#result > 0 then
        
outputConsole("***********************",source)
        
outputConsole(string.format("Zostales zbanowany na serwerze! "),source)
        
outputConsole(string.format("Je?li uwa?asz ,?e ban jeste nies?uszny napisz na naszym forum:(w pracy)! "),source)
        
outputConsole(string.format("Posiadasz Bana do "..result["time"]),source)
        
outputConsole(string.format("Posiadasz Bana za: "..result["reason"]),source)
        
outputConsole("***********************",source)
    
kickPlayer(source,string.format("Kliknij f8 aby zobaczyc wiecej informacji!"))
    else
        
exports["pystories-db"]:dbSet("DELETE FROM pystories_ban WHERE type=? AND active=1 AND serial=?""ban"playerSerial)
    
end
end
)


Pomocy oczywi?cie piwo
12. Scroluje i nic się nie dzieje
Witam mam drzwi pod scrolla scroluje i nic si? nie dzieje
[lua]bm5 = createMarker(2329.49731, 2486.36792, 1028.81982, "cylinder", 1.0, 0, 0, 0, 0) -- gdzie ma byc marker w ktorym bedzie sie scrollowac
d5 = createObject (2930, 2330, 2488.400390625, 1030.5, 0, 0, 0) -- podajesz koordy obiektu

local kategoria_animacji = "CRIB"
local animacja = "CRIB_Use_Switch"

function isPlayerInPoliceFaction(plr)
local uid=getElementData(plr,'player:uid')
if not uid then return end

local result=exports['pystories-db']:dbGet('SELECT 1 FROM ogrpg_factions WHERE code=? AND uid=? LIMIT 1;', "SAPD", uid)
if result[1] then
return true
else
return false
end
end

function od6 ( thePlayer)
if isElementWithinMarker(thePlayer, bm5) then
if isPlayerInPoliceFaction(thePlayer) then --Tutaj zmieniasz tylko "Policja"
moveObject ( d5, 2500, 2330, 2490.12, 1030.5) -- Koordy otwartych drzwi
setTimer(setPedAnimation, 1066.66, 1, thePlayer)
setPedAnimation(thePlayer,kategoria_animacji,animacja,true,false,false)
end
end
end

function zd6 ( thePlayer)
if isElementWithinMarker(thePlayer, bm5) then
if isPlayerInPoliceFaction(thePlayer) then --Tutaj zmieniasz tylko "Policja"
moveObject ( d5, 2500, 2330, 2488.400390625, 1030.5) -- koordy zamknietch drzwi
setTimer(setPedAnimation, 1066.66, 1, thePlayer)
...
13. Nie dziala tuner nic sie nie pokazuje
Witajcie nie dziala mi tuner po wejsciu w marker nic sie nie pokazuje brak db3

[code]--[[
Resource: OURGame v2
Developers: Split <[email protected]>
You have no right to use this code without my permission.
(c) 2015 <[email protected]>. All rights reserved.
]]

local jobs={
["tuner-sf"]={
code="tuner-sf",
desc="Praca Tunera",
desc2="",
positionMarker={-2270.89,-149.22,35},
text="* Nie jeste? zatrudniony(a) jako tuner w tym warsztacie.",
cuboid={-2297.40,-158.27,34.5, 44, 55.75, 6.5},
maxEmployees=2,
},
}

for i,v in pairs(jobs) do
local marker=createMarker(v.positionMarker[1], v.positionMarker[2], v.positionMarker[3]-0.90, "cylinder", 1.2, 78, 255, 0, 155)
setElementDimension(marker, v.positionMarker[5] or 0)
setElementInterior(marker, v.positionMarker[4] or 0)
setElementData(marker,"m:duty",v.code or 0)
local cs= createColCuboid(v.cuboid[1],v.cuboid[2],v.cuboid[3],v.cuboid[4],v.cuboid[5],v.cuboid[6])
setElementData(cs,"m:duty",v.code)
addEventHandler ( "onColShapeLeave", cs, function(el,md)
if getElementData(el,"player:duty") == getElementData(source,"m:duty") then
setElementData(el,"player:duty",false)
outputChatBox("Wyszed?e? poza teren Tunera.", el)
local skin=getElementData(el,"player:skin")
setElement...
14. Przerobienie nic trudnego ?
Siemaneczko, mo?e kto? wie ? i pomo?e przerobi? t? przechowalnie:

PrzechoZforumGtao


pod SystemPojazdowPanaPrezesa :)


Zmieni?em go tak
[lua]local polaczenie = dbConnect ( "sqlite", "db.db" )
dbExec ( polaczenie, "CREATE TABLE IF NOT EXISTS Zapis ( ID INTEGER, Paliwo INTEGER, Przebieg INTEGER, Tuning VARCHAR, Model INTEGER, Owner VARCHAR )" )


local marker=createMarker(-273.65625, 1177.74316, 18.59375,"cylinder",5,255,0,255,100)--- Marker chowania pojazdu
local odb=createMarker(-265.20197, 1185.64063, 18.74219,"cylinder",3,255,0,0,100)--- Marker odbioru pojazdu





addEventHandler("onMarkerHit",root,function(e)
if source==marker then
if getElementType(e)=="vehicle" then
local id=getElementData(e,"car_id")
if id then
local paliwo=getElementData(e,"pojazd_paliwo") or 0
tabela = {}
for _,v in ipairs ( getVehicleUpgrades ( e ) ) do
table.insert ( tabela, v )
end
local tuning = table.concat ( tabela, "," )
local owner=getElementData(e,"pojazd_przebieg") or 0
local model=getElementModel(e)
dbExec(polaczenie,"INSERT INTO `Zapis` (ID, Paliwo, Przebieg,Tuning,Owner,Model) VALUES (?,?,?,?,?,?)",id,paliwo,przebieg,tuning,owner,model)
destroyElement(e)
end
end
elseif source==odb then
if getElementType(e)=="player" then
local q=dbQuery(polacz...
15. Klikanie w obiekty nic nie robi.
Witam, jak mog? naprawi? ten problem, ?e na niekt?re obiekty nie dzia?a ten skrypt, s? dla niego tak jakby nie widzialne (Oczywi?cie obiekty s? stworzone createObject). A na nie kt?re dzia?a.

function onPlayerItemClick(mb,bs,el)
    if 
not el then outputChatBox("sdf") return end
    
if mb == "left" then
            
if bs == "down" then
                
if getElementType(el) == "object" then
                destroyElement
(el)
                
outputChatBox("test")
                
end
            end
    end
end
addEventHandler
("onPlayerClick",root,onPlayerItemClick)
16. [INNE] Logowanie gdy gracz nie wpisze nic
Witam Mam taki kod:
[code]
switch(dialogid)
{
case DIALOG_LOG:
{
switch(response)
{
case 0:
{
new string[128];
Kick(playerid);
format(string, 128, "Gracz %s(%d) zosta? wyrzucony z serwera, pow?d: pr?ba zespawnowania si? bez zalogowania", PlayerName(playerid), playerid);
SendClientMessageToAll(CZ, string);
}
case 1:
{
new konto[128];



format(konto, 128, "Konta/%s.ini", PlayerName(playerid));
if(!strcmp(dini_Get(konto, "Haslo"),inputtext,false))
{

new kasa = GraczInfo[playerid][gKasa] = dini_Int(konto, "Kasa");
GivePlayerMoney(playerid, kasa);
GraczInfo[playerid][gScore] = dini_Int(konto, "Score");
SetPlayerScore(playerid, GraczInfo[playerid][gScore]);
GraczInfo[playerid][gZalogowany] = 1;
TogglePlayerControllable(playerid, 1);
SendClientMessage(playerid, JN, "Zalogowa?e?(a?) si?!");
}
else
{
ShowPlayerDialog(playerid, DIALOG_LOG, DIALOG_STYLE_INPUT, "Panel logowania", "Poda?e? niepoprawne has?o!nspr?buj jeszcze raz!", "Zaloguj", "Anuluj");

}
}
}
}[/code]
Jest to ta rejestracja;
http://gtao.pl/inne-dinis...ejestracja+dini

i chc? zr...