Wysłany: 2017-03-05, 18:10
Gravgor
Wiek: 22 Na forum: 3620 dni Posty: 380
Nick w MP: 1944
Piwa : 702
Witam zabieranei prawka mi nie dziala tutaj podaje kod
ddCommandHandler ( "zpj" , function( plr , cmd , cel , time , rodzaj ,...)
if getAdmin ( plr , 4 ) or getAdmin ( plr , 3 ) or getAdmin ( plr , 2 ) or getAdmin ( plr , 1 ) then
local reason = table . concat ({...}, " " )
if not cel or not tonumber ( time ) or not rodzaj or not reason then
outputChatBox ( "* U?ycie: /zpj <nick/ID> <czas> <jednostka: m/h/d/w> <pow?d>" , plr )
return
end
local target = exports [ "ogrpg-core" ]: findPlayer ( plr , cel )
if not target then
outputChatBox ( "* Nie znaleziono podanego gracza." , plr , 255 , 0 , 0 )
return
end
local query = string . format ( "SELECT * FROM ogrpg_punish WHERE type=%q AND active=1 AND serial=%q AND time>NOW() LIMIT 1" , "prawko" , getPlayerSerial ( target ))
local result = exports [ "ogrpg-db" ]: pobierzWyniki ( query )
if ( result ) then
return outputChatBox ( " Gracz Posiada zawieszone prawo jazdy do " .. result [ "time" ].. ", za: " .. result [ "reason" ], plr , 255 , 0 , 0 )
else
exports [ "ogrpg-db" ]: dbSet ( "DELETE FROM ogrpg_punish WHERE type=? AND active=1 AND serial=?" , "prawko" , getPlayerSerial ( plr ))
end
if isPedInVehicle ( target ) then
removePedFromVehicle ( target )
end
if tonumber ( time ) <= 0 then return end
reason = reason .. " |od " .. getPlayerName ( plr ): gsub ( "#%x%x%x%x%x%x" , "" ).. "|"
if rodzaj == "m" then
exports [ "ogrpg-db" ]: dbSet ( "INSERT INTO ogrpg_punish (serial,reason,time,type) VALUES (?,?,NOW() + INTERVAL ? minute,?)" , getPlayerSerial ( target ), reason , time , "prawko" )
elseif rodzaj == "h" then
exports [ "ogrpg-db" ]: dbSet ( "INSERT INTO ogrpg_punish (serial,reason,time,type) VALUES (?,?,NOW() + INTERVAL ? hour,?)" , getPlayerSerial ( target ), reason , time , "prawko" )
elseif rodzaj == "d" then
exports [ "ogrpg-db" ]: dbSet ( "INSERT INTO ogrpg_punish (serial,reason,time,type) VALUES (?,?,NOW() + INTERVAL ? day,?)" , getPlayerSerial ( target ), reason , time , "prawko" )
elseif rodzaj == "w" then
exports [ "ogrpg-db" ]: dbSet ( "INSERT INTO ogrpg_punish (serial,reason,time,type) VALUES (?,?,NOW() + INTERVAL ? week,?)" , getPlayerSerial ( target ), reason , time , "prawko" )
end
triggerClientEvent ( root , "admin:rendering" , root , "* " .. getPlayerName ( target ): gsub ( "#%x%x%x%x%x%x" , "" ).. "(" .. getElementData ( target , "id" ).. ") otrzyma?(a) zakaz prowadzenia pojazd?w kat(ABC) " .. reason .. "(" .. time .. rodzaj .. ")" )
-- local query = string . format ( "INSERT INTO ogrpg_punish (serial,reason,time,type) VALUES ('%s','%s',%s,'%s')" , getPlayerSerial ( target ), reason , result , "prawko" )
-- exports [ "ogrpg-db" ]: dbSet ( query )
-- outputChatBox ( "* Dodanych rekord" , plr )
end
Wysłany: 2017-03-05, 18:39
_Haze
Peace Yo!
Wiek: 24 Na forum: 4184 dni Posty: 1648
Nick w MP: Haze
Piwa : 2628
podaj b??dy z /debugscript 3
Wysłany: 2017-03-05, 18:47
Pumelowsky
Amator 3D
Wiek: 23 Na forum: 4181 dni Posty: 199
Nick w MP: Pumelowsky
Piwa : 1666
Co dok?adnie nie dzia?a? Wpisuje do bazy danych? B??dy DB3
Podpis
Kontakt:
- Skype: live:pumapl_2
- GG: 56865468
- Discord: Pumelowsky#1126
- PW forum
[/center]
Wysłany: 2017-03-08, 18:27
Gravgor
Wiek: 22 Na forum: 3620 dni Posty: 380
Nick w MP: 1944
Piwa : 702
Wysłany: 2017-03-08, 18:37
_Haze
Peace Yo!
Wiek: 24 Na forum: 4184 dni Posty: 1648
Nick w MP: Haze
Piwa : 2628
PieselDragon , musisz by? pod??czony do swojego mysql i mie? modu? do mysql
Wysłany: 2017-03-08, 18:55
Gravgor
Wiek: 22 Na forum: 3620 dni Posty: 380
Nick w MP: 1944
Piwa : 702
"HazeMaFaze" napisał/a :PieselDragon , musisz by? pod??czony do swojego mysql i mie? modu? do mysql
Gdzie go wgrac? Dokladnie
Wysłany: 2017-03-08, 18:57
_Haze
Peace Yo!
Wiek: 24 Na forum: 4184 dni Posty: 1648
Nick w MP: Haze
Piwa : 2628
Cytat: 32 bit: Copy 32 bit mta_mysql.dll into the MTA San Andreas\server\mods\deathmatch\modules\ directory.
64 bit: Copy 64 bit mta_mysql.dll into the MTA San Andreas\server\x64\modules\ directory.
I do serverconf
Cytat: <module src="mta_mysql.dll" />
albo
Cytat: <module src="mta_mysql.so" />
Wysłany: 2017-03-08, 19:17
Gravgor
Wiek: 22 Na forum: 3620 dni Posty: 380
Nick w MP: 1944
Piwa : 702
"HazeMaFaze" napisał/a : Cytat: 32 bit: Copy 32 bit mta_mysql.dll into the MTA San Andreas\server\mods\deathmatch\modules\ directory.
64 bit: Copy 64 bit mta_mysql.dll into the MTA San Andreas\server\x64\modules\ directory.
I do serverconf
Cytat: <module src="mta_mysql.dll" />
albo
Cytat: <module src="mta_mysql.so" />
dobra wgrane teraz w konsoli loadmodule?
Wysłany: 2017-03-08, 19:56
_Haze
Peace Yo!
Wiek: 24 Na forum: 4184 dni Posty: 1648
Nick w MP: Haze
Piwa : 2628
Tak i podepnij pod swoje mysql skrypt
Wysłany: 2017-03-08, 21:25
Gravgor
Wiek: 22 Na forum: 3620 dni Posty: 380
Nick w MP: 1944
Piwa : 702
"HazeMaFaze" napisał/a :Tak i podepnij pod swoje mysql skrypt
2017 - 03 - 08 21 : 28 : 54 ] loadmodule : Requested by Console
[ 2017 - 03 - 08 21 : 28 : 54 ] MODULE : Unable to load mods / deathmatch / modules / mta_mysql . so (/ clients / s22670 / mods / deathmatch / modules / mta_mysql . so : wrong ELF class: ELFCLASS64 )
[ 2017 - 03 - 08 21 : 28 : 54 ] loadmodule : Module failed to load
[ 2017 - 03 - 08 21 : 28 : 54 ] loadmodule : Couldn 't find module file
To pokazuje
Tagi: zabieranie :: prawka
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: