Valakinek esetleg meg van a Shodown mód?
Ez a szekció lehetővé teszi a felhasználó által írt összes hozzászólás megtekintését. Vedd figyelembe, hogy csak azokba a fórumokba írt hozzászólásokat látod, amelyekhez hozzáférésed van.
Üzenetek megjelenítése menüfunction hullaRendszer ( megolte, fegyver, testresz )
local x,y,z = getElementPosition(getLocalPlayer())
local rx,ry,rz = getElementRotation ( getLocalPlayer() )
local int = getElementInterior(getLocalPlayer())
local dim = getElementDimension(getLocalPlayer())
local penz = getPlayerMoney(getLocalPlayer())
if not getElementData(getLocalPlayer(), \"adminjailed\") then
triggerServerEvent(\"createHulla\", getLocalPlayer(), x, y, z, rz, penz, int, dim)
end
-- setTimer(triggerServerEvent, 15000, 0, \"createHulla\", getLocalPlayer(), x, y, z, rz, penz)
end
addEventHandler ( \"onClientPlayerWasted\", getLocalPlayer(), hullaRendszer )
addEventHandler ( \"onClientPlayerSpawn\", getLocalPlayer(), function()
hide()
end)
bJobbkatt = nil
gomb = nil
bezar = nil
ax, ay = nil
localPlayer = getLocalPlayer()
rob = nil
AHULLA = nil
function click(button, state, absX, absY, wx, wy, wz, element)
if getElementData(getLocalPlayer(), \"exclusiveGUI\") then
return
end
if element and getElementType( element ) == \"object\" and button == \"right\" and state == \"down\" and (getElementModel(element) == 2907) then
local x, y, z = getElementPosition(localPlayer)
if getDistanceBetweenPoints3D(x, y, z, wx, wy, wz) <= 15 then
if (bJobbkatt) then
hide()
end
local dimension = getElementDimension(getLocalPlayer())
showCursor(true)
ax = absX
ay = absY
rob = element
AHULLA = element
showMenu()
end
end
end
addEventHandler(\"onClientClick\", getRootElement(getThisResource()), click, true)
function showMenu()
bJobbkatt = guiCreateWindow(ax, ay, 200, 150, \"Hulla\", false)
penz = getElementData(rob, \"money\")
money = exports.ax_core:formatMoney(penz)
gomb = guiCreateButton(0.05, 0.25, 0.87, 0.15, \"Pénz: \".. money ..\" Ft\", true, bJobbkatt)
addEventHandler(\"onClientGUIClick\", gomb, rabol, false)
gomb = guiCreateButton(0.05, 0.50, 0.87, 0.15, \"Eltüntet\", true, bJobbkatt)
addEventHandler(\"onClientGUIClick\", gomb, eltuntet, false)
bezar = guiCreateButton(0.05, 0.75, 0.87, 0.15, \"Menü bezárása\", true, bJobbkatt)
addEventHandler(\"onClientGUIClick\", bezar, hide, false)
end
function rabol()
penz = getElementData(rob, \"money\")
setElementData(rob, \"money\", 0)
triggerServerEvent(\"onHullaPenzElvesz\", getLocalPlayer(), getLocalPlayer(), penz)
hide()
end
function eltuntet()
if ( isPlayerDead ( getLocalPlayer() ) ) then
outputChatBox(\"(( Felejtsd el! ))\", 255, 0, 0)
hide()
return
end
local theTeam = getPlayerTeam(getLocalPlayer())
local factionType = getElementData(theTeam, \"type\")
if (factionType==4) or exports.ax_core:isRpSeged(getLocalPlayer()) then -- (factionType==4) itt megadod melyik frakció tudja majd eltüntetni [iD]
setElementData(rob, \"money\", 0)
triggerServerEvent(\"onHullaEltuntet\", getLocalPlayer(), getLocalPlayer(), penz, AHULLA)
else
outputChatBox(\"(( Csak admin vagy mentős! ))\", 255,0,0)
end
hide()
end
function hide()
if (isElement(bezar)) then
destroyElement(bezar)
end
bezar = nil
if (isElement(bJobbkatt)) then
destroyElement(bJobbkatt)
end
bJobbkatt = nil
ax = nil
ay = nil
showCursor(false)
triggerEvent(\"cursorHide\", localPlayer)
setElementData(localPlayer, \"exclusiveGUI\", false, false)
end
hullak = 0
local timerHulla = {}
function penz (jatekos, penz)
if ( isPedDead ( jatekos ) ) then
outputChatBox(\"(( Felejtsd el! ))\", jatekos, 255, 0, 0)
return
end
if (penz > 0) then
exports.ax_core:giveMoney(jatekos, penz)
exports.ax_core:sendLocalMeAction(jatekos, \"elvette a hulla pénzét.\")
else
exports.ax_core:sendLocalMeAction(jatekos, \"megpróbálja elvenni a hulla pénzét de sajnos nincs nála pénz.\")
end
end
addEvent(\"onHullaPenzElvesz\", true)
addEventHandler(\"onHullaPenzElvesz\", getRootElement(), penz)
function penz (x, y, z, rz, money, int, dim)
hulla = createObject(2907, x, y, z - 0.9, 0, 0, rz - 180)
setTimer(hullaEltuntet, 60000*15, 1, hulla)
setElementInterior(hulla, int)
setElementDimension(hulla, dim)
setElementData(hulla, \"money\", money)
hullak = hullak + 1
end
addEvent(\"createHulla\", true)
addEventHandler(\"createHulla\", getRootElement(), penz)
function hullaEltuntet(element)
destroyElement(element)
end
function eltuntet (jatekos, penz, AHULLA)
if ( isPedDead ( jatekos ) ) then
outputChatBox(\"(( Felejtsd el! ))\", jatekos, 255, 0, 0)
return
end
destroyElement(AHULLA)
outputChatBox(\"(( Sikeresen eltűntetted a holttestet! ))\", jatekos, 0, 255, 0)
end
addEvent(\"onHullaEltuntet\", true)
addEventHandler(\"onHullaEltuntet\", getRootElement(), eltuntet)
function ehseg()
local players = getElementsByType(\"player\")
for k, p in ipairs(players) do
if(getElementData(p, \"CharLoggedIn\") or 0 == 1) then
if(tonumber(getElementData(p, \"char.hunger\") or 0)<=0)then
if(getElementHealth(p)<=5 and getElementHealth(p)~=1)then
outputChatBox(\"Éhezel! Egyél valamit, mielőtt valami baj történne!\", p, 255, 60, 40)
end
setElementHealth(p,getElementHealth(p)-1)
else
setElementData(p, \"char.hunger\", getElementData(p, \"char.hunger\")-1)
end
end
end
end
ehseg()
setTimer(ehseg, 120000, 0)
--- ID RENDSZER
local ids = {}
function assignID()
for i=1,getMaxPlayers() do
if not ids then
ids = source
setElementData(source,\"char:id\",i,not optimize)
setElementData(source,\"playerid\",i,not optimize)
break
end
end
end
addEventHandler(\"onPlayerJoin\",root,assignID)
function freeID()
local id = getElementData(source,\"char:id\")
if not id then return end
ids[id] = nil
end
addEventHandler(\"onPlayerQuit\",root,freeID)
function onPlayerNameChange()
cancelEvent()
end
addEventHandler(\"onPlayerChangeNick\", getRootElement(), onPlayerNameChange)
function load()
for index, weapon in pairs(weapons) do
tex = engineLoadTXD ( \"weap/\"..weapon.fileName.. \".txd\", weapon.model )
engineImportTXD ( tex, weapon.model )
mod = engineLoadDFF ( \"weap/\"..weapon.fileName.. \".dff\", weapon.model )
engineReplaceModel ( mod, weapon.model )
end
end
local dxpS = {guiGetScreenSize()}
local dxpK = {401,500}
local dxpP = {dxpS[1]/2-dxpK[1]/2,dxpS[2]/2-dxpK[2]/2}
local screen = {}
local comandofund = false
local functionlist = 0
local commandfunction = -dxpK[1]
local r = {0,0,0}--fekete
local H = {157, 126, 88}--hover
local coloredText = \"#ffffff\"
local listacomandos = { -- \"..\"
{\"/teszt\",\"teszt\",10},
}
function comandos()
if not comandofund then return end
commandfunction = commandfunction + 10
if commandfunction > dxpP[2] then
commandfunction = dxpP[2]
end
screen = {dxpP[1],commandfunction}
dxDrawRectangle(screen[1],screen[2],dxpK[1],dxpK[2],tocolor(r[1],r[2],r[3],255/2))
dxDrawRectangle(screen[1],screen[2],dxpK[1],50,tocolor(r[1],r[2],r[3],255/3))
dxDrawRectangle(screen[1],screen[2],dxpK[1],1,tocolor(r[1],r[2],r[3],255/2))
dxDrawRectangle(screen[1],screen[2],1,dxpK[2],tocolor(r[1],r[2],r[3],255/2))
dxDrawRectangle(screen[1]+400,screen[2],1,dxpK[2],tocolor(r[1],r[2],r[3],255/2))
dxDrawRectangle(screen[1]+200,screen[2]+50,1,dxpK[2]-50,tocolor(r[1],r[2],r[3],255/1.5))
dxDrawText(\"Valami MTA #4097DFSzabályzat\",screen[1]+60,screen[2]+10,dxpK[1],dxpK[2],tocolor(255,255,255,255),2,\"default-bold\",\"left\",\"top\",false, false, false, true)
dxDrawText(\"Szabályok:\", screen[1]+70,screen[2]+70,dxpK[1],dxpK[2], tocolor(255, 255, 255, 255), 1.0, \"default-bold\", \"left\", \"top\", false, false, false, true)
dxDrawText(\"Leírások:\", screen[1]+280,screen[2]+70,dxpK[1],dxpK[2], tocolor(255, 255, 255, 255), 1.0, \"default-bold\", \"left\", \"top\", false, false, false, true)
local elecommandfunction = 0
for i, parafunctioncommand in ipairs( listacomandos ) do
if (i > functionlist and elecommandfunction < 12) then
elecommandfunction = elecommandfunction + 1
coloredText = \"#ffffff\"
dxDrawRectangle(screen[1],screen[2]+65 + elecommandfunction * 30,dxpK[1],25,tocolor(r[1],r[2],r[3],255/4))
dxDrawText(coloredText..\"/\"..tostring(parafunctioncommand[1],parafunctioncommand[2]),screen[1]+40,screen[2]+70 + elecommandfunction * 30,dxpK[1],dxpK[2], tocolor(255, 255, 255, 255), 1.0, \"default-bold\", \"left\", \"top\", false, false, false, true)
dxDrawText(coloredText..tostring(parafunctioncommand[2]),screen[1]+235,screen[2]+70 + elecommandfunction * 30,dxpK[1],dxpK[2], tocolor(255, 255, 255, 255), 1.0, \"default-bold\", \"left\", \"top\", false, false, false, true)
end
end
end
addEventHandler(\"onClientRender\",getRootElement (),comandos)
addEventHandler(\"onClientKey\", getRootElement (), function(g, v)
if not comandofund or not v then return end
if g == \"mouse_wheel_down\" then
functionlist = functionlist + 1
if functionlist > #listacomandos - 12 then
functionlist = #listacomandos - 12
end
elseif g == \"mouse_wheel_up\" then
functionlist = functionlist - 1
if functionlist < 1 then
functionlist = 0
end
end
end)
function functioncomandoslist2(dX, dY, dSZ, dM, eX, eY)
if(eX >= dX and eX <= dX+dSZ and eY >= dY and eY <= dY+dM) then
return true
else
return false
end
end
bindKey(\"c\", \"down\", function()
if comandofund then
comandofund = false
commandfunction = -500
playSound (\"fechar.mp3\")
showChat(true)
setElementData(localPlayer, \"screenmod\",false)
else
comandofund = true
playSound (\"abrir.mp3\")
showChat(false)
setElementData(localPlayer, \"screenmod\",true)
end
end)function penz_set()
setPlayerMoney(1000000)
end
addCommanhandler(\"penz_set\",penz_set)
-- Kapcsolódási adatok
local host = \"37.221.210.24\"
local felhasznalonev = \"user8712\"
local jelszo = \"46b41454\"
local adatbazis = \"paki111?server1\"
--local port = 3306
local MySqlCsatlakozas = nil
local QueryLogolas = false
function csatlakozasAzAdatbazishoz(res)
MySqlCsatlakozas = dbConnect( \"mysql\", \"dbname=\"..adatbazis..\";host=\"..host, felhasznalonev, jelszo, \"charset=utf8\" )
if (not MySqlCsatlakozas) then
if (res == getThisResource()) then
cancelEvent(true, \"Nem sikerült elérni az adatbázist\")
end
return nil
end
return nil
end
addEventHandler(\"onResourceStart\", getResourceRootElement(getThisResource()), csatlakozasAzAdatbazishoz, false)
-- destroyDatabaseConnection - Internal function, kill the connection if theres one.
function lecsatlakozasAzAdatbazisrol()
if (not MySqlCsatlakozas) then
return nil
end
MySqlCsatlakozas = nil
return nil
end
addEventHandler(\"onResourceStop\", getResourceRootElement(getThisResource()), lecsatlakozasAzAdatbazisrol, false)
function kapcsolatCallback()
if(MySqlCsatlakozas) then
return MySqlCsatlakozas
else
return nil
end
end
Az oldal 0.041 másodperc alatt készült el 20 lekéréssel.