irgendwie geht das bei mir immernoch net
dutymarkerlvpd= createMarker(299.48422,191.3292,1007.1794,"corona",3,255,0,0)
setElementInterior(dutymarker, 3)
dutySkins = { [280]=true, [281]=true, [282]=true, [283]=true, [284]=true, [285]=true, [286]=true, [288]=true }
function tazer(player)
if (getElementData(player,"Duty") == 1) or (getElementData(player,"Fraktion") == 5) or (getElementData(player,"Fraktion") == 4) then
if getElementData(player,"Tazer") ~= 1 then
local posX, posY, posZ = getElementPosition( player )
local tazerCol = createColSphere( posX, posY, posZ, 3 )
local nearbyPlayers = getElementsWithinColShape( tazerCol, "player" )
local target = nil
local pdistance = 500
destroyElement( tazerCol )
for index, nearbyPlayer in ipairs( nearbyPlayers ) do
if nearbyPlayer ~= player and not getPedOccupiedVehicle ( nearbyPlayer ) then
pX, pY, pZ = getElementPosition ( nearbyPlayer )
current = getDistanceBetweenPoints3D ( posX, posY, posZ, pX, pY, pZ )
if current <= pdistance then
target = nearbyPlayer
pdistance = current
end
end
end
if pdistance <= 499 then
setPedAnimation( target, "crack", "crckdeth2",-1,true,true,false)
toggleAllControls ( target, false, true, false )
setTimer ( antitazer, 10000, 1, player, target)
setElementData ( player, "Tazer", 1 )
local posX, posY, posZ = getElementPosition( player )
local chatCol = createColSphere( posX, posY, posZ, 10 )
local nearbyPlayers = getElementsWithinColShape( chatCol, "player" )
destroyElement( chatCol )
for index, nearbyPlayer in ipairs( nearbyPlayers ) do
local name = getPlayerName ( player )
outputChatBox ("Officer "..name.." hat "..getPlayerName(target).." getazert!", nearbyPlayer, 0, 255, 0 )
end
else
outputChatBox("Es ist kein Spieler in der Nähe!",player,255,0,0)
end
else
outputChatBox("Du kannst nur alle 10 sekunden Tazern!", player,255,0,0)
end
else
outputChatBox("Du bist nicht im Dienst!", player,200,0,0)
end
end
addEvent ( "tazer", true )
addEventHandler ( "tazer", getRootElement(), tazer)
addCommandHandler ( "tazer", tazer )
function antitazer(player, target)
setPedAnimation ( target )
setElementData ( player, "Tazer", 0 )
toggleAllControls ( target, true, true, false )
end
function dutylvpd(theCop, command)
if getElementData(theCop, "Fraktion") == 1 then
if isElementWithinMarker(theCop,dutymarker) then
if getElementData(theCop, "Rank") == 0 then
setPedSkin(theCop, 284)
takeAllWeapons ( theCop )
giveWeapon(theCop, 22, 127, true)
setElementData(theCop,"Duty",1)
elseif getElementData(theCop, "Rank") == 1 then
takeAllWeapons ( theCop )
setPedSkin(theCop, 280)
giveWeapon(theCop, 22, 127, false)
giveWeapon(theCop, 25, 60, true)
setElementData(theCop,"Duty",1)
elseif getElementData(theCop, "Rank") == 2 then
takeAllWeapons ( theCop )
setPedSkin(theCop, 281)
giveWeapon(theCop, 22, 127, false)
giveWeapon(theCop, 25, 60, true)
setElementData(theCop,"Duty",1)
elseif getElementData(theCop, "Rank") == 3 then
takeAllWeapons ( theCop )
setPedSkin(theCop, 282)
giveWeapon(theCop, 24, 127,false)
giveWeapon(theCop, 25, 60,true)
setElementData(theCop,"Duty",1)
elseif getElementData(theCop, "Rank") == 4 then
takeAllWeapons ( theCop )
setPedSkin(theCop, 283)
giveWeapon(theCop, 24, 127,false)
giveWeapon(theCop, 25, 60,false)
giveWeapon(theCop, 29, 127,true)
setElementData(theCop,"Duty",1)
elseif getElementData(theCop, "Rank") == 5 then
takeAllWeapons ( theCop )
setPedSkin(theCop, 288)
giveWeapon(theCop, 24, 127,false)
giveWeapon(theCop, 25, 60,false)
giveWeapon(theCop, 29, 127,true)
setElementData(theCop,"Duty",1)
end
outputChatBox("Du bist nun im Dienst!", theCop)
else
outputChatBox("Du bist nicht am richtigen Ort!", theCop)
end
else
outputChatBox("Du bist kein Beamter !")
end
end
addCommandHandler("duty", dutylvpd)
function offdutylvpd(theCop, command)
local skinID = getElementModel ( theCop )
if (getElementData(theCop, "Fraktion") == 1) and (dutySkins[skinID]) then
if isElementWithinMarker(theCop,dutymarkerlvpd) then
local skin = getElementData(theCop, "Skin")
takeAllWeapons(theCop)
setPedSkin(theCop, skin)
setElementData(theCop,"dutymarkerlvpd",0)
outputChatBox("Du bist nun außer Dienst!", theCop)
else
outputChatBox("Du kannst dich hier nicht umziehen!", theCop)
end
else
outputChatBox("Du bist kein Beamter oder nicht im Dienst!")
end
end
addCommandHandler("offduty", offdutylvpd)
sry das ich es so eingefügt habe weil das andere weis ich net wei ich das so einfügen kann aber ich mache schon alles mit notepad++
und ich bin ja leader der fraktion und ein feund von mir ist leader von reporter und wenn er leute einladen will kommt immer das darfst du nicht und bei mir auch obwohl ich mit makeleader das eingegeben habe