Hallo Community,
Ich habe ein Script gemacht, wo sobald man getötet wird, auf dem Screen etwas stehen soll.
Jedoch funktioniert das nicht wie ich es möchte und weiß nicht wie ich das fixxen soll .
Lua
addEventHandler("onClientPlayerWasted", getRootElement(),
function (killer, weapon, bodypart)
if ( killer ~= localPlayer ) then
function drawDeath()
local sx,sy = guiGetScreenSize()
local px,py = 1680,1050
local x,y = (sx/px), (sy/py)
dxDrawImage(x*0, y*-10, x*1680, y*420, "miau.png", 0, 0, 0, tocolor(0, 0, 0, 114), true)
dxDrawText("Du wurdest von"..killer.."gekillt !", x*0, y*0, x*1680, y*396, tocolor(255, 255, 255, 255), 4.00, "pricedown", "center", "top", false, false, true, false, false)
dxDrawImage(x*364, y*120, x*1018, y*930, "troll_face.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
end
addEventHandler("onClientRender", getRootElement(), drawDeath)
end
end)
function respawn( posX, posY, posZ, spawnRotation, theTeam, theSkin, theInterior, theDimension)
removeEventHandler("onClientRender", getRootElement(), drawDeath)
end
addEventHandler("onPlayerSpawn", getRootElement(), respawn)
Alles anzeigen