Hey,
Habe ein VIP System gemacht, nun dies klappt leider nicht:D
Der Fehler ist, wenn ich ein mit einem Cmd in die VIP Gruppe hinzufügen will. ( = Dies klappt nicht. )
Code:
Lua
--[[
Scripted by 300PBS
V.I.P System
(c) 2013 - 300PBS
]]
function outputVipText_func (player, text)
outputChatBox("[VIP] "..getPlayerName(player).." sagt: "..text.."!", getRootElement(), 255, 0, 0)
end
addEvent("outputVipText", true)
addEventHandler("outputVipText", getRootElement(), outputVipText_func)
function warpPedIntoVipVeh_func (player, veh)
warpPedIntoVehicle(player, veh)
outputChatBox("Fahrzeug erstellt!", player, 255, 0, 0)
end
addEvent("warpPedIntoVipVeh", true)
addEventHandler("warpPedIntoVipVeh", getRootElement(), warpPedIntoVipVeh_func)
function setPlayerVip (player, cmd, target, vipdata)
if getElementData(player, "adminlvl") >= 4 then
setElementData(target, "vip", vipdata) -- 1 ist Ja, 0 ist Nein.
else
outputChatBox("Du bist kein Admin!", player, 255, 0, 0)
end
end
addCommandHandler("setvip", setPlayerVip)
function remPlayerVip (player, cmd, target, vipdata)
if getElementData(player, "adminlvl") >= 4 then
setElementData(target, "vip", vipdata) -- 1 ist Ja, 0 ist Nein.
else
outputChatBox("Du bist kein Admin!", player, 255, 0, 0)
end
end
addCommandHandler("remvip", remPlayerVip)
Alles anzeigen
M.f.G