Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2017-10-28, 23:29


mxol







Wiek: 32
Na forum: 3151 dni
Posty: 2
Nick w MP: MXol



Respekt: 50

Prosze powiedzcie mi co tu jest zle bo nie mam sil :/ (chcialbym aby na komende /praca usuwaly sie te wszystkie elementy)

function praca ( praca )
if getElementData(source,"AGJob") == "postman" then
local player = getPlayerFromName(getElementData(source,"JobOwner"))
if isElement(ptVehicle[player]) then
destroyElement(ptVehicle[player])
end
if isElement(ptVehicleBlip[player]) then
destroyElement(ptVehicleBlip[player])
end
if isElement(ptJobMarker[player]) then
destroyElement(ptJobMarker[player])
end
if isElement(ptJobBlip[player]) then
destroyElement(ptJobBlip[player])
end
if isElement(newMarker[player]) then
destroyElement(newMarker[player])
end
if isElement(nMBlip[player]) then
destroyElement(nMBlip[player])
end


ptNumber[player] = nil
setElementData(player,"AGJob",nil)
setElementModel (player, "0",nil)
end

addCommandHandler ( "praca", praca )

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-10-29, 09:20


_Haze

Peace Yo!






Wiek: 24
Na forum: 4184 dni
Posty: 1648
Nick w MP: Haze

Piwa: 2628

Respekt: 1020
Respekt: 1020

function praca (plrcmd)
if getElementData(plr,"AGJob") == "postman" then
local player getPlayerFromName(getElementData(plr,"JobOwner"))
if isElement(ptVehicle[player]) then
destroyElement(ptVehicle[player])
end
if isElement(ptVehicleBlip[player]) then
destroyElement(ptVehicleBlip[player])
end
if isElement(ptJobMarker[player]) then
destroyElement(ptJobMarker[player])
end
if isElement(ptJobBlip[player]) then
destroyElement(ptJobBlip[player])
end
if isElement(newMarker[player]) then
destroyElement(newMarker[player])
end
if isElement(nMBlip[player]) then
destroyElement(nMBlip[player])
end


ptNumber[player] = nil
setElementData(player,"AGJob",false)
setElementModel (player0)
end

addCommandHandler "praca"praca )


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-10-29, 12:49


mxol







Wiek: 32
Na forum: 3151 dni
Posty: 2
Nick w MP: MXol



Respekt: 50

"_Haze" napisał/a:

function praca (plrcmd)
if getElementData(plr,"AGJob") == "postman" then
local player getPlayerFromName(getElementData(plr,"JobOwner"))
if isElement(ptVehicle[player]) then
destroyElement(ptVehicle[player])
end
if isElement(ptVehicleBlip[player]) then
destroyElement(ptVehicleBlip[player])
end
if isElement(ptJobMarker[player]) then
destroyElement(ptJobMarker[player])
end
if isElement(ptJobBlip[player]) then
destroyElement(ptJobBlip[player])
end
if isElement(newMarker[player]) then
destroyElement(newMarker[player])
end
if isElement(nMBlip[player]) then
destroyElement(nMBlip[player])
end


ptNumber[player] = nil
setElementData(player,"AGJob",false)
setElementModel (player0)
end

addCommandHandler "praca"praca )


Nadal nie dziala :/

Postaw piwo autorowi tego posta
 

 
Tagi: praca :: nie :: dziala
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Praca nie dziala Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku