ADISEQ
Uczeń Lua
Wiek: 21 Na forum: 2811 dni Posty: 130
Nick w MP: ADISEQ
Piwa : 18
Witam. Przychodz? z takim problemem. Ot?? mam skrypt na bramy no i on wygl?da tak:
function isPlayerInFaction ( plr )
local uid = getElementData ( plr , 'player:uid' )
if not uid then return end
local result = exports [ 'tiyl-db' ]: dbGet ( 'SELECT 1 FROM tiyl_sluzby WHERE code=? AND uid=? LIMIT 1;' , "SAFD" , uid )
if result [ 1 ] then
return true
else
return false
end
end
bm = createMarker ( 2862.73 , 2126.76 , 10.82 - 0.9 , "cylinder" , 1 , 255 , 255 , 255 , 30 ) -- gdzie ma byc marker w ktorym bedzie sie scrollowac
d = createObject ( 11313 , 2860.7998046875 , 2127.2998046875 , 11.80000019073 , 0 , 0 ,- 90 ) -- podajesz koordy obiektu
local kategoria_animacji = "CRIB"
local animacja = "CRIB_Use_Switch"
function od ( thePlayer )
if isElementWithinMarker ( thePlayer , bm ) then
if isPlayerInFaction ( el ) then
moveObject ( d , 5000 , 2860.7998046875 , 2127.2998046875 , 11.800000190735 + 3 ) -- Koordy otwartych drzwi
setTimer ( setPedAnimation , 1066.66 , 1 , thePlayer )
setPedAnimation ( thePlayer , kategoria_animacji , animacja , true , false , false )
end
end
end
function zd ( thePlayer )
if isElementWithinMarker ( thePlayer , bm ) then
if isPlayerInFaction ( el ) then
moveObject ( d , 5000 , 2860.7998046875 , 2127.2998046875 , 11.80000019073 ) -- koordy zamknietych drzwi
setTimer ( setPedAnimation , 1066.66 , 1 , thePlayer )
setPedAnimation ( thePlayer , kategoria_animacji , animacja , true , false , false )
end
end
end
addCommandHandler ( "o" , od ) -- haslo otwartych drzwi
addCommandHandler ( "z" , zd ) -- haslo zamknietych drzwi
No i tak kilka bram jest tylko z innymi kordami i ,,bm1", ,,bm2", ,,d1", ,,d2".
Frakcja jest z paczki Your Adventure 3.1 bodaj?e.
No i problem jest taki, ?e gdy jestem we frakcji to wszystko dzia?a a jak wejd? w marker i wpisze /o to brama si? nie otwiera. Licz? na pomoc.
Daje piwerka i respekt.
[ Dodano : 2020-03-25, 15:25 ]
Ha, nie zauwa?y?em, ?e w isPlayerInFaction jest (el) a powinno byc (thePlayer)
Sry za spam na forum do zamkni?cia