Wysłany: 2020-10-14, 15:46
P4tRk123
Wiek: 25 Na forum: 2065 dni Posty: 4
Nick w MP: P4tRk
Siema mam problem z reportami, mianowicie chodzi o to, ze gracze nie moga pisac reportow ktos powie jak naprawic? pys 3.0
addCommandHandler ( "report" , function( plr , cmd , cel ,...)
if not ( getElementData ( plr , "player:logged" )) then
return false
end
if not cel then
outputChatBox ( "#007aff(ⓘ) #ffffffPoprawne u?ycie: #007aff/raport <nick/ID> <pow?d>" , plr , 255 , 255 , 255 , true )
return
end
local target = exports [ "pystories-core" ]: findPlayer ( plr , cel )
if not target then
outputChatBox ( "#bf0101() #ffffffNiestety, ale nie znaleziono podanego gracza." , plr , 255 , 0 , 0 , true )
return
end
local text = table . concat ({...}, " " )
setElementData ( target , "player:raported" , true )
desc = "[" .. getElementData ( plr , "id" ).. "]" .. getPlayerName ( plr ): gsub ( "#%x%x%x%x%x%x" , "" ).. " >> [" .. getElementData ( target , "id" ).. "]" .. getPlayerName ( target ): gsub ( "#%x%x%x%x%x%x" , "" ).. ": " .. text : gsub ( "#%x%x%x%x%x%x" , "" )
triggerEvent ( "admin:addReport" , resourceRoot , desc , getElementData ( target , "id" ))
outputChatBox ( "#339933() #ffffffPomy?lnie wys?ano zg?oszenie na gracza:#ffffff (#339933" .. getElementData ( target , "id" ).. "#ffffff) #339933" .. getPlayerName ( target ): gsub ( "#%x%x%x%x%x%x" , "" ).. "" , plr , 255 , 75 , 0 , true )
end )
Ostatnio zmieniony przez Wilq 2020-10-14, 22:05, w całości zmieniany 2 razy
Wysłany: 2020-10-14, 17:35
MeeShuffle
Programista/Grafik
Wiek: 32 Na forum: 4395 dni Posty: 2758
Nick w MP: Shuffle
Piwa : 8575
Nikt nie zna kodu, podaj ewentualne bledy db3, kod.
Wysłany: 2020-10-14, 19:08
P4tRk123
Wiek: 25 Na forum: 2065 dni Posty: 4
Nick w MP: P4tRk
"Shuffle" napisał/a :Nikt nie zna kodu, podaj ewentualne bledy db3, kod.
sprawdz teraz
Wysłany: 2020-10-14, 20:14
AmLotte.
Wiek: 21 Na forum: 2184 dni Posty: 134
Nick w MP: AmLotte
Piwa : 443
Kod: if not (getElementData(plr, "player:logged")) then
return false
end
Mo?e nie masz ustawionej element daty player:logged ?
Wysłany: 2020-10-14, 20:53
MeeShuffle
Programista/Grafik
Wiek: 32 Na forum: 4395 dni Posty: 2758
Nick w MP: Shuffle
Piwa : 8575
1. Umiesc kod w [lua]
2.Podaj bledy w db3.
Wysłany: 2020-10-26, 22:25
RudyTMM [Usunięty ]
a masz wszystkie potrzebne do tego skrypty wgrane?
Wysłany: 2020-10-28, 19:57
VVirmex
Sgrypter luja
Wiek: 21 Na forum: 3365 dni Posty: 281
Nick w MP: AxyZ
Piwa : 234
"RudyTMM" napisał/a :a masz wszystkie potrzebne do tego skrypty wgrane?
Jedyne skrypty kt?re s? potrzebne do dzia?ania adminsa to pystories-core oraz pystories-admin, ?aden inny nie jest tu wcale potrzebny.
Powi?tpiewam w to, ?e robi co? (czyli np. przerabia) przy kodzie na czystym serwerze lub na localu bez ??czenia z baz?, czy co? w tym stylu.
[ Dodano : 2020-10-28, 19:58 ]
No i rzecz jasna pystories-db, by uzyska? ??czenie z baz? (g??wnie tabela pystories_admins)
Podpis
Kontakt:
Discord: fluffy.rbx
Wiadomość PW Forum [Odpiszę wtedy, kiedy będę mógł]
Support Team: 26.08.2020 do 04.05.2021 [*]
Wysłany: 2020-10-29, 17:25
_jvneczek
Wiek: 22 Na forum: 4326 dni Posty: 1513
Nick w MP: _jvneczek
Piwa : 3949
Zapewne nie posiadasz player:logged, poprawione -
addCommandHandler ( "report" , function( plr , cmd , cel ,...)
if not getElementData ( plr , 'player:sid' ) then return end
if not cel then
outputChatBox ( "#007aff(ⓘ) #ffffffPoprawne u?ycie: #007aff/raport <nick/ID> <pow?d>" , plr , 255 , 255 , 255 , true )
return
end
local target = exports [ "pystories-core" ]: findPlayer ( plr , cel )
if not target then
outputChatBox ( "#bf0101() #ffffffNiestety, ale nie znaleziono podanego gracza." , plr , 255 , 0 , 0 , true )
return
end
local text = table . concat ({...}, " " )
setElementData ( target , "player:raported" , true )
desc = "[" .. getElementData ( plr , "id" ).. "]" .. getPlayerName ( plr ): gsub ( "#%x%x%x%x%x%x" , "" ).. " >> [" .. getElementData ( target , "id" ).. "]" .. getPlayerName ( target ): gsub ( "#%x%x%x%x%x%x" , "" ).. ": " .. text : gsub ( "#%x%x%x%x%x%x" , "" )
triggerEvent ( "admin:addReport" , resourceRoot , desc , getElementData ( target , "id" ))
outputChatBox ( "#339933() #ffffffPomy?lnie wys?ano zg?oszenie na gracza:#ffffff (#339933" .. getElementData ( target , "id" ).. "#ffffff) #339933" .. getPlayerName ( target ): gsub ( "#%x%x%x%x%x%x" , "" ).. "" , plr , 255 , 75 , 0 , true )
end )
Tagi: reporty
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: