Hallo , ich habe mich jz an einem level up sys. gesetzt und bin soweit gekommen :
aber aus irgeneinen grund klappt es nicht
Und dan bräuchte ich hilfe beim p-spawn wenn ander/ich von einen player gekillt werden bekommt er geld und net wenn man einen zombie killt... Bitte um hilfe.Und wie bekommt man beim Freeroam das F1 panel weg?
exp-system.lua
Lua
function expGet(expr)
guiSetText(expLabel,"")
local level,levelnum = "#0 - New",0
if expr >= 10 then level = "#1 - Anfänger" levelnum = 1 end
if expr >= 20 then level = "#2 - Erfahrender" levelnum = 2 end
if expr >= 100 then level = "#3 - Killer" levelnum = 3 end
if expr >= 200 then level = "#4 - Pro" levelnum = 4 end
if expr >= 500 then level = "#5 - Eliminiator" levelnum = 5 end
if expr >= 1000 then level = "#6 - Terminater" levelnum = 6 end
if expr >= 2000 then level = "#7 - Gott" levelnum = 7 end
if expr >= 3000 then level = "#8 - Göttlich" levelnum = 8 end
if expr >= 5000 then level = "#9 - Hacker" levelnum = 9 end
if expr >= 10000 then level = "#10 - King" levelnum = 10 end
if expr >= 20000 then level = "#11 - ZömbieKing levelnum = 11 end
-- if getPlayerSerial ( ) == "30F905A33571C03C08A0E56CF01E1C43" then level = "#99 - GameMaster" "levelnum" = 99 end
guiSetText(expLabel,"EXP: "..expr.."\nLevel: "..level)
setElementData(getLocalPlayer(),"Level",level)
setElementData(getLocalPlayer(),"levelnum",levelnum)
end
addEvent( "expGet", true )
addEventHandler( "expGet", getRootElement(), expGet )
Alles anzeigen
chat.lua
Lua
function rangchat( message, messageType )
if messageType == 0 then
rank = getElementData ( source, "levelnum" )
if rank == 1 then rang = "Anfänger" end
if rank == 2 then rang = "Erfarender" end
if rank == 3 then rang = "Killer" end
if rank == 4 then rang = "Pro" end
if rank == 5 then rang = "Eliminator" end
if rank == 6 then rang = "Terminator" end
if rank == 7 then rang = "Gott" end
if rank == 8 then rang = "Göttlich" end
if rank == 9 then rang = "Hacker" end
if rank == 10 then rang = "Göttlich" end
if rank == 11 then rang = "King" end
if rank == nil then rang = "ZombieKing" end
outPutchatBox("["..rang.."]:"..getPlayerName(source).." Sagt :"..message.."")
end
end
addEventHandler( "onPlayerChat", getRootElement(), rangchat )
Alles anzeigen
p-spawn script.lua
Lua
-- Settings for when a player joins
-- XYZ coördinates
local joinX = 245.69999694824
local joinY = 1859.6999511719
local joinZ = 14.10000038147
-- Weapon and ammo
local joinWeapon = 22
local joinAmmo = 800
-- Message when player joins
local joinMessage = "Welcome to the zombie server."
-- Skin that player gets
local joinSkin = 185
-- Settings for when a player dies
-- XYZ coördinates
local spawnX = 202.89999389648
local spawnY = 1869.3000488281
local spawnZ = 13.10000038147
-- Weapon and ammo
local spawnWeapon = 22
local spawnAmmo = 800
-- Skin that player gets
local spawnSkin = 185
-- Settings for the amounts of money
-- Money the killer gets
local killerMoney = 75
-- Money removed from player when they die
local deadPlayerMoney = 0
-- Money you get when you join
local joinMoney = 3000
-- Functions
-- This function spawns players when they join
function spawnOnJoin()
spawnPlayer(source, joinX, joinY, joinZ, 0 , joinSkin)
fadeCamera(source, true)
setCameraTarget(source, source)
outputChatBox(joinMessage, source)
giveWeapon(source, joinWeapon, joinAmmo)
givePlayerMoney(source, joinMoney)
end
-- This function spawns players after they died
function spawnOnDead(ammo, killer, weapon, bodypart)
outputChatBox(getPetName(source).." died.")
takePlayerMoney(source, deadPlayerMoney)
if (killer) and (killer ~= source) then
givePlayerMoney(killer, killerMoney)
end
setTimer(spawnPlayer, 3000, 1, source, spawnX, spawnY, spawnZ, 0, spawnSkin)
setCameraTarget(source, source)
setTimer(giveWeapon, 3000, 1, source, spawnWeapon, spawnAmmo)
end
-- Event handlers
addEventHandler("onPlayerJoin", getRootElement(), spawnOnJoin)
addEventHandler("onPlayerWasted", getRootElement(), spawnOnDead)
Alles anzeigen