Witam, mam problem z pewnym skryptem.
Chcia?bym ?eby gracz po wej?ciu na serwer mia? wczytan? ilo?? zabitych wcze?niej os?b.
( je?eli gracz wcze?niej zabi? np. 5 os?b, to po wyj?ciu ?eby znowu by?o 5(Na Scoreboardzie jest ma?y podgl?d))
mam problem z wariantami. Zrobi?em do nich GUI i nie dzia?aj? gdy przyciskam buton "Zmie? Wariant"
to nic si? nie dzieje. Bardzo prosz? o naprawienie skryptu! dam piwko!
Witam, mam tu skrypt o nazwie Effect Life bardziej jest to paczka potzrzebuje pomocy bo chccia?bym aby ktos mi zrobil gotowca razem ze wszystkimi gotowymi foledarmi dam link do pobrania i prosze mi to odes?ac z jak m?wi?em gotowymi folderzami czyli od folderu server po folder deatchmatch z podlaczona baza MYSQL , ACL i mtaserver.conf bardzo prosze oto daje respekt i piwo tylko pamietac odrazu z folderami bo nie umiem podlaczyc bazy myqal baza msui byc pod server loklany nie na zaden hosting. prosze ;-;..
Witam mam pytanie czy kto? by m?g? mi przerobi? interakcje pojazd?w ogrpg gdy? chcia? bym j? zmieni? ?eby przypomina?a interakcje typu effect life lub co? w tym stylu tu daj? link do pobranie takowej interakcji http://speedy.sh/qTrKJ/ogrpg-interaction.7z z g?ry dzi?kuj? za pomoc
[ Komentarz dodany przez: Emm: 2016-05-25, 12:56 ]
Mo?e daj jakiego? ss'a jak wygl?da?a ta interakcja z Effect-Life, bo nie ka?dy tam gra?..
@edit przepraszam zapomnia?em o ss'e m?j b??d
http://imgur.com/vIBEezl
Witam Mam Powazny Problem. Jest To Przechowywalnia Znaleziona na Community Przerobi?em na swoje element daty itdd.. Wszystko ?adnie dzia?a Tylko Odkry?em Dziwnego Buga Ze Swoje Auto Mozna Odbierac Kilka Razy tzn. Odbiore Auto Pojade odstawie i moge odebra? Jescze Raz czyli takie Kopiowanie aut...
Chcia?bym aby kto? naprowadzi? mnie na dobra droge do Rozwik?ania tego Problemu..
S.lua
local polaczenie = dbConnect ( "sqlite", "db.db" )
if polaczenie then
outputDebugString("Wczytano pojazdy z przechowywalni")
else
outputDebugString("Nie wczytano pojazd?w z przechowywalni")
end
dbExec ( polaczenie, "CREATE TABLE IF NOT EXISTS Zapis ( Calyy INTEGER, Drzwii INTEGER, PP1 INTEGER, PL1 INTEGER, TP1 INTEGER, TL1 INTEGER, hpauta INTEGER, RS INTEGER, GS INTEGER, BS INTEGER, Tuning INTEGER, Przebieg INTEGER, ID INTEGER, Model INTEGER, Paintjob INTEGER, Paliwo INTEGER, Owner VARCHAR, color1 INTEGER, color2 INTEGER, color3 INTEGER, color4 INTEGER)" )
marker=createMarker(-2047.712890625,462.98947143555,34.171875,"cylinder",6,68,212,4,100)
odb=createMarker(-2055.8823242188,472.83813476563,35.171875,"cylinder",1,255,0,0,100)
function oddajAutodoprzecho(e)
if source==marker then
if getElementType(e)=="vehicle" then
local idd=getElementData(e, "car_id")
local paliwo=getElementData(e, "pojazd_paliwo")
if idd then
local owner=getElementData(e, "owner")
local model=getElementModel(e)
local paint=getVehiclePaintjob(e)
local przeb = getElementData ( e, "pojazd_przebieg" )
local upgrade = getVehicleTuning (e)
local c1,c2,c3,c4 = getVehicleColor ( e )
local rs,gs,bs = getVehicleHeadLightColor(e)
local autohp = getElementHealth(e)
local pp1,pl1,tp1,tl1 = getVehicleWheelStates(e)
local caly = {}
for i = 0,6 do table.insert(caly, getVehiclePanelState(e, i)) end
local caly = table.concat(caly, ",")
local drzwi = {}
for i = 0,5 do table.insert(drzwi, getVehicleDoorState(e, i)) end
local drzwi = table.concat(drzwi, ",")
dbExec( polaczenie,"INSERT INTO `Zapis` ( Calyy, Drzwii, PP1, PL1, TP1, TL1, hpauta, RS, GS, BS, Przebieg, Tuning, color1, color2 ,color3, color4, ID, Model,Paintjob,Paliwo,Owner) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)",caly,drzwi,pp1,pl1,tp1,tl1, autohp, rs, gs, bs,przeb,upgrade,c1,c2,c3,c4,idd,model,paint,paliwo,owner)
destroyElement(e)
outputChatBox("Schowa?e? sw?j pojazd do przechowywalni aut.")
end
end
elseif source==odb then
if getElementType(e)=="vehicle" then
local q = dbQuery( polaczenie,"SELECT * FROM `Zapis` WHERE `Owner`=?", getPlayerName(e))
local w = dbPoll(q,-1)
dbFree(q)
for _,v in ipairs(w)do
end
end
end
end
addEventHandler("onMarkerHit", root, oddajAutodoprzecho)
addCommandHandler("odbierz",function(plr,cmd,idd)
if idd then
if isElementWithinMarker(plr,odb) then
local q = dbQuery( polaczenie,"SELECT * FROM `Zapis` WHERE `ID`=?",idd)
local w = dbPoll(q,-1)
dbFree(q)
local auto=createVehicle(w[1].Model,-2034.341796875,472.57955932617,35.172294616699,0.2,0.0,180.0)
warpPedIntoVehicle(plr, auto)
setElementData(auto, "pojazd_paliwo", w[1].Paliwo)
setElementData(auto, "car_id", w[1].ID)
setVehiclePaintjob(auto,w[1].Paintjob)
setElementData(auto,"owner", w[1].Owner)
setElementData ( auto, "pojazd_przebieg", w[1].Przebieg)
setVehicleColor ( auto, w[1].color1, w[1].color2, w[1].color3, w[1].color4 )
setVehicleTuning ( auto, w[1].Tuning)
setVehicleHeadLightColor(auto, w[1].RS, w[1].GS, w[1].BS)
setElementHealth(auto, tonumber(w[1].hpauta))
setVehicleWheelStates(auto, w[1].PP1, w[1].PL1, w[1].TP1, w[1].TL1)
for i,v in ipairs(w[1].Calyy) do
setVehiclePanelState(auto, i-1, tonumber(v))
end
for i,v in ipairs(w[1].Drzwii) do
setVehicleDoorState(auto, i-1, tonumber(v))
end
dbExec( polaczenie,"DELETE FROM `Zapis` WHERE `ID`=?",idd)
if idd==getElementData(auto, "car_id") then
end
end
end
end)
function info(plr)
outputChatBox("Aby odebra? swoje auto wpisz /odbierz <ID Auta>", plr)
end
addEventHandler("onMarkerHit", odb, info)
function getVehicleTuning ( veh )
local i
local vehPanel = ''
for i=0, 15 do
local vb = ''
if i>0 then
vb = vehPanel..';'
end
vehPanel = vb.. getVehicleUpgradeOnSlot (veh, i)
end
return vehPanel
end
function setVehicleTuning ( veh, arr )
if arr then
local arrx = split(arr, string.byte(";"))
local i
for i=0, 15 do
addVehicleUpgrade ( veh, arrx[i] )
end
end
return true
end
Bardzo Ucieszy? Bym sie gdyby Ktos Poda? Pow?d Problemu moze co? z baza Danych?? Niemam Pojecia Napewno Za Robote Dam Zimne
Cze??, mogliby?cie przerobi? ten skrypt, aby barierke RESPI?A si? przed graczem i ?eby nie da?o jej si? zniszczy?, i poruszy??
function barierka (thePlayer, cmd)
if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)),aclGetGroup("PSP")) then
local x,y,z = getElementPosition(thePlayer)
local rx,ry,rz = getElementRotation(thePlayer)
Barierka = createObject (1228, x, y ,z, rx, ry, rz)
outputChatBox("Stworzy?e? barierke", thePlayer)
end
end
addCommandHandler("bustaw", barierka)
function barierka (thePlayer, cmd)
if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)),aclGetGroup("PSP")) then
destroyElement(Barierka)
outputChatBox("Usune?e? barierke", thePlayer)
end
end
addCommandHandler("busun", barierka)
Podpis
Użytkownik - 10-05-2016
Support Team - 17.06.2017 Moderator - 25.11.2017 Mod-Team - 02.07.2018
Witam mam problem, mianowicie skrypt si? nie w??cza przy wej?ciu na serwer.
function globalMessage(thePlayer, cmd, ...)
local message = table.concat ( { ... }, " " );
local name = getPlayerName(thePlayer);
local account = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup("user." .. account, aclGetGroup("Admin")) then
outputChatBox("#FF0000<Admin>#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true)
return
else
outputChatBox("#FF0000<Global>#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true)
return
end
local account = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup("user." .. account, aclGetGroup("Moderator")) then
outputChatBox("#FF0000<Moderator>#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true)
return
else
outputChatBox("#FF0000<Global>#00FF00"..name..": #FFFFFF"..message,root, 255, 255, 255, true)
return
end
end
addCommandHandler("global", globalMessage);
addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function()
for index,player in pairs(getElementsByType("player")) do
bindKey(player,"x", "down", "chatbox", "global");
end
end)
Witam mam ma?y problem a mianowicie chcia? bym aby pojazd o ID wyznaczonym wje?d?aj?c w ostatni marker o numerze [22], niszczy? pojazd.
local rootElement = getRootElement()
local busses = {[431] = true, [437] = true}
local busTable = {
[1]={-2090.950, 1277.275, 14.45},[2]={-2289.29980, 1179.61316, 54.51567},[3]={-2477.30005, 1200.80847, 36.08991},[4]={-2661.65088, 1173.08032, 55.85931},[5]={-2458.84766, 1089.95142, 56.03101},
[6]={-2279.13623, 1051.48096, 55.98920},[7]={-2006.67566, 1027.52869, 56.00063},[8]={-2007.32776, 819.93933, 45.71822},[9]={-2006.00781, 575.79053, 35.46132},[10]={-2108.33936, 568.45959, 35.45186},
[11]={-2228.92725, 548.65088, 35.44595},[12]={-2235.86646, 447.24005, 35.41224},[13]={-2256.37109, 348.16998, 33.39291},[14]={-2236.14771, 318.40176, 35.60799},[15]={-2018.66406, 318.24945, 35.44624},
[16]={-1926.19385, 340.26917, 31.87311},[17]={-1846.91760, 403.69186, 17.43918},[18]={-1726.76489, 323.27530, 7.46830},[19]={-1548.17590, 718.31506, 7.47321},[20]={-1525.62781, 908.49677, 7.47321},
[21]={-1637.18433, 1253.72144, 7.46522},[22]={-1988.39563, 1312.31409, 7.48742},}
createBlip(1256.6, -1812.2, 13.41, 55, 3, 0, 0, 255, 255, 0, 250)
function getNewBusLocation(thePlayer, ID)
local x, y, z = busTable[ID][1], busTable[ID][2], busTable[ID][3]
triggerClientEvent(thePlayer,"bus_set_location",thePlayer,x,y,z)
end
function bustpr(thePlayer)
local theVehicle = getPedOccupiedVehicle (thePlayer)
local id = getElementModel(theVehicle)
if id == 431 or id == 437 then
local x, y, z = getNewBusLocation(thePlayer, 1)
setElementData(thePlayer,"buszp",0)
setElementData(thePlayer,"busData",1)
else
end
end
addEventHandler("onVehicleEnter",rootElement,bustpr)
function busStart(thePlayer)
local theVehicle = getPedOccupiedVehicle (thePlayer)
local id = getElementModel(theVehicle)
if id == 431 or id == 437 then
outputChatBox("Zaczynasz prac? kierow!cy Bus/Tpr", thePlayer, 255, 255, 0)
end
end
addEventHandler("onVehicleEnter",rootElement,busStart)
addEvent("bus_finish",true)
addEventHandler("bus_finish",rootElement,
function (client)
if not isPedInVehicle(client) then return end
if not busses[getElementModel(getPedOccupiedVehicle(client))] then return end
local zarp = getElementData(client, "buszp")
local money = math.random(10,20)
setElementData(client, "buszp", zarp + money)
if #busTable == tonumber(getElementData(client,"busData")) then
setElementData(client,"busData",1)
else
setElementData(client,"busData",tonumber(getElementData(client,"busData"))+1)
end
getNewBusLocation(client, tonumber(getElementData(client,"busData")))
end)
function giveMoney(thePlayer)
local theVehicle = getPedOccupiedVehicle (thePlayer)
local id = getElementModel(theVehicle)
if id == 431 or 437 then
local gpm = getElementData(thePlayer, "buszp")
if ((gpm) > 0 ) then
givePlayerMoney(thePlayer, tonumber(gpm))
outputChatBox("Za ten przejazd zarobi?e?: " .. gpm .. "$", thePlayer, 0, 140, 240)
setElementData(thePlayer, "buszp", 0)
end
end
end
addEventHandler("onVehicleExit", rootElement, giveMoney)
addEventHandler("onPlayerQuit", rootElement, giveMoney)
Witam, mam problem z pewnym skryptem.
Chcia?bym ?eby gracz po wej?ciu na serwer mia? wczytan? ilo?? zabitych wcze?niej os?b.
( je?eli gracz wcze?niej zabi? np. 5 os?b, to po wyj?ciu ?eby znowu by?o 5(Na Scoreboardzie jest ma?y podgl?d))
--[[
S SIDE
--]]
exports.scoreboard:addScoreboardColumn('Level')
exports.scoreboard:addScoreboardColumn('Zabojstwa')
player = {} ;
addEventHandler( 'onPlayerLogin', root,
function(_, acc)
if (acc) then
if (getAccountData(acc, "Level") ~= 0) and (getAccountData(acc, "Zabojstwa") ~= 0) then
setElementData(source, "Level", getAccountData(acc, "Level"))
setElementData(source, "Zabojstwa", getAccountData(acc, "Zabojstwa"))
else
setAccountData(acc, "Level", 0)
setAccountData(acc, "Zabojstwa", 0)
setElementData(source, "Level", 0)
setElementData(source, "Zabojstwa", 0)
end
end
end
)
addEventHandler( 'onPlayerQuit', root,
function()
local accPlayer = getPlayerAccount(source)
if (accPlayer) then
setAccountData(accPlayer, "Level", getElementData(source, "Level"))
setAccountData(accPlayer, "Zabojstwa", getElementData(source, "Zabojstwa"))
end
end
)
addEventHandler( 'onPlayerWasted', root,
function(_, Killer)
if (Killer ~= source) and (getElementType(Killer) == 'player') then
local accKiller = getPlayerAccount(Killer)
if (accKiller) then
setElementData(Killer, "Zabojstwa", (getElementData(Killer, "Zabojstwa") or 0) + 1)
setElementData(Killer, "LevelUP", (getElementData(Killer, "LevelUP") or 0) + 1)
if (getElementData(Killer, "LevelUP") == 5) then
setElementData(Killer, "Level", (getElementData(Killer, "Level") or 0) + 1)
setElementData(Killer, "LevelUP", 0)
triggerClientEvent( Killer, "playSound", Killer )
outputChatBox( "Gratulacje! Wbi?e? level!", Killer)
outputChatBox( "Otrzymujesz 300$ za wbicie Levelu!", Killer)
givePlayerMoney( Killer, 300)
end
end
end
end
)
--[[
C SIDE
--]]
addEvent( 'playSound', true )
addEventHandler( 'playSound', root,
function()
local Sound = playSound("LevelUP.mp3")
end
)
Masz tutaj jeszcze muzyczk?, kase za wbicie poziomu/levelu, statystyki resetuj? si? tylko i wy??cznie po wy??czeniu/zrestartowaniu skryptu.
local jobTarget
local jobMarker
local jobVehicle
local maxTarget = #districtsBus
function finishJob()
if jobMarker and isElement(jobMarker) then
destroyElement(jobMarker)
jobMarker = nil
end
if jobTarget and isElement(jobTarget) then
destroyElement(jobTarget)
jobTarget = nil
jobTarget = 0
end
triggerServerEvent("destroyVeh", localPlayer)
end
function busDriver(el, md)
if el ~= localPlayer or not md then return end
if jobTarget > maxTarget and getPedOccupiedVehicle(el) then return end
if jobTarget == maxTarget and not getPedOccupiedVehicle(el) then return end
if jobTarget == #districtsBus then
finishJob()
playSoundFrontEnd(5)
outputChatBox("* Zako?czy?e?/-a? prac?.")
else
showMarker()
playSoundFrontEnd(12)
triggerServerEvent("givePlayerMoney", localPlayer, 50, 1)
end
end
function showMarker()
if jobMarker and isElement(jobMarker) then
destroyElement(jobMarker)
jobMarker = nil
end
addEventHandler("onClientResourceStop", resourceRoot, function()
if jobVehicle and getElementData(localPlayer, "gracz_praca") then
setElementData(localPlayer, "gracz_praca", false)
end
end)
addEventHandler("onClientVehicleExit", resourceRoot, function(plr, seat)
if seat == 0 then
if plr == localPlayer then
finishJob()
outputChatBox("* Zako?czy?e?/-a? prac?")
end
end
end)
Podpis
28.04.2018 - Oficjalne odejście ze społeczności 'MTA:SA'
witam prosil bym o przerobienie skryptu na stacjach dokladniej chodzi mi o to aby nie wpisywalo sie ilosc paliwa tylko podjerzdaza?o na Stacje i wciskalo spacje i samo by pobieralo Kase z kont a
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