Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: skrypcie.
1. Kłopoty w skrypcie.
Ostatnio zrobi?em sobie skrypt i pojawi? si? b??d w kt?rym nie wiem o co chodzi. W skrypcie chodzi o to aby po wpisaniu komendy /ut pojawia sie blip i to dziala, lecz gdy wpisuje ponownie /ut to wyswietla sie napis, lecz blip sie nie usuwa.

function ut(plr, cmd)
if 
getElementData(plr,'player:duty') == 'SAPD' then
if not getElementData(plr, "player:ut") then
outputChatBox
("Dodano X", plr, 255, 255, 255, true)
--
local poz = getElementPosition(source)
local x, y, z = getElementPosition (plr)
local blip = createBlip(x, y, z, 47, 2, 0, 0, 0, 0, 0, 275, source)
setElementData(plr, "player:ut", true)
elseif 
getElementData(plr, "player:ut") then
setElementData
(plr, "player:ut", false)
for 
blip in ipairs(getElementData(plr, "player:ut")) do
destroyElement(blip)
--
destroyElement(source)
outputChatBox("Usunieto X", plr, 255, 255, 255, true)
            
end
        end
    end
end
addCommandHandler
("ut", ut)