Znalaz?em w jakiej? paczce skrypt na impuls elektromagnetyczny dla SAPD. Pozmienia?em w nim elementdaty aby pasowa?y pod moj? paczk? i wszystko wydaje si? by? w porz?dku. Gdy policjant wsiada do pojazdu wy?wietla mu si? informacje ?e mo?e odda? strza? itp. Problem jest w tym ?e gdy "strzela" pojawia si? przed nim na chwil? marker, ale pojazd przed nim nie ga?nie ani nic. Prosz? o pomoc
[lua]
Server side
function pokazIEM(player,seat,jacked)
if getElementData(player,"player:duty") == "SAPD" then
if seat == 0 then
triggerClientEvent("pokaz:IEM",player,player)
end
end
end
addEventHandler("onVehicleEnter",root,pokazIEM)
function schowajIEM(player,seat,jacked)
if getElementData(player,"player:duty") == "SAPD" then
if seat == 0 then
triggerClientEvent("schowaj:IEM",player,player)
end
end
end
addEventHandler("onVehicleExit",root,schowajIEM)
function funkcjeoff(hitElement)
local veh = getPedOccupiedVehicle(hitElement)
if not veh then return end
setVehicleEngineState(veh, false)
setVehicleOverrideLights(veh,1)
setElementData(veh,"veh:iem",true)
setElementData(veh, "stereo:use",false)
setTimer(removeElementData,15000,1,veh,"veh:iem")
setTimer(setElementData,15000,1,veh,"stereo:use",true)
outputChatBox("* Siln... |