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

Wysłany: 2013-02-11, 20:38


Olusia

Jestem Zła






Wiek: 28
Na forum: 4901 dni
Posty: 57
Nick w MP: Olusia

Piwa: 10

Respekt: 50

Hej . Wgra?am sobie skrpyt na odpalanie i zagaszanie

kod :

vehicleEngine = { false }
vehicleLights = { false }
function Script_onPlayerJoin( )
bindKey ( source,"k", "down", Engine )
bindKey ( source, "l", "down", Lights )
end
addEventHandler ( "onPlayerJoin", getRootElement(), Script_onPlayerJoin)
function Script_onVehicleEnter( thePlayer, seat )
if seat == 0 then
if not getVehicleEngineState( source ) then
vehicleEngine[ source ]=false
setVehicleEngineState ( source, false )
else
vehicleEngine[ source ]=true
setVehicleEngineState ( source, true )
end
if vehicleLights[ source ] then
vehicleLights[ source ]=true
setVehicleOverrideLights ( car, 2 )
else
vehicleLights[ source ]=false
setVehicleOverrideLights ( car, 1 )
end
end
end
addEventHandler ( "onVehicleEnter", getRootElement(), Script_onVehicleEnter )

function Script_onVehicleExit( thePlayer, seat )
if ( seat==0 ) then
if not getVehicleEngineState( source ) then
setVehicleEngineState ( source, false )
vehicleEngine[ source ]=false
else
setVehicleEngineState ( source, true )
vehicleEngine[ source ]=true
end
if vehicleLights[ source ] then
setVehicleOverrideLights ( car, 2 )
vehicleLights[ source ]=true
else
setVehicleOverrideLights ( car, 1 )
vehicleLights[ source ]=false
end
end
end
addEventHandler ( "onVehicleExit", getRootElement(), Script_onVehicleExit )

function Engine ( player )
car = getPedOccupiedVehicle ( player )
if ( car ) then
if not getVehicleEngineState( car ) then
setVehicleEngineState ( car, true )
outputChatBox("??ilnik auta zosta?? w????czony.",player, 102, 255, 51, true )
vehicleEngine[ car ]=true
else
setVehicleEngineState ( car, false )
outputChatBox("??ilnik auta zosta?? wy????czony.",player, 102, 255, 51, true )
vehicleEngine[ car ]=false
end
end
end

function Lights ( player )
car = getPedOccupiedVehicle ( player )
if ( car ) then
if not vehicleLights[ car ] then
setVehicleOverrideLights ( car, 2 )
outputChatBox("??wiat??a auta zosta??y w????czone.",player, 102, 255, 51, true )
vehicleLights[ car ]=true
else
outputChatBox("??wiat??a auta zosta??y wy????czone.",player, 102, 255, 51, true )
setVehicleOverrideLights ( car, 1 )
vehicleLights[ car ]=false
end
end
end


function getVehicleEngineState( vehicle )
return vehicleEngine[ vehicle ]
end

Podpis
Jesli ci pomoglam to daj Piwo :]
Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-02-13, 13:38


hale







Wiek: 35
Na forum: 5941 dni
Posty: 775

Piwa: 2794

Respekt: 165,6
Respekt: 165,6Respekt: 165,6

[prze]

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-02-13, 14:21


Oski

LUA Scripter






Wiek: 30
Na forum: 5246 dni
Posty: 428
Nick w MP: Oski

Piwa: 56

Respekt: 75,1

Bo piszesz 4 temat z nieswoimi skryptami.
Kopiujesz i sklejasz jakies skrypty z community.
Ja Przepraszam ale nie mam sil pomagac ludziom ktorzy kopiuja skrypty i chca zeby dzialalaly jak nawet nie znaja podstaw.
Wysiadam

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-02-13, 19:59


Pantera







Wiek: 27
Na forum: 5213 dni
Posty: 52
Nick w MP: Michu

Piwa: 8

Respekt: 70

Tak skrypty nie jest z commu lecz z tego forum,w dziale z tym skryptem jest wszystko ?adnie opisane :)

Podpis
"Bo najważniejsze są oczy, które przejrzą na wskroś cały szajs."
Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-02-13, 21:14


pidbulxd







Wiek: 28
Na forum: 5230 dni
Posty: 135
Nick w MP: Word

Piwa: 540

Respekt: 60

Olusia, wydaje mi si? ze to przez polskie znaki. Sciagnij notepad++ i skonweruj kod do uft bez boom.

[ Dodano: 2013-02-13, 21:15 ]
O to na przyk?a:

??wiat??a auta zosta??y w????czone.",player, 102, 255, 51, true )


Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-02-13, 22:12


Oski

LUA Scripter






Wiek: 30
Na forum: 5246 dni
Posty: 428
Nick w MP: Oski

Piwa: 56

Respekt: 75,1

Debug prawde powie.

Postaw piwo autorowi tego posta
 

 
Tagi: czemu :: nie :: działa :: odpalaniezgaszanie
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » [DM] Czemu mi to nie działa OdpalanieZgaszanie 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