Wysłany: 2015-07-17, 19:46
timmer1994
Recon
Wiek: 31 Na forum: 3981 dni Posty: 60
Nick w MP: Recon
Piwa : 6
Witam, stworzy?em marker, jesli sie w niego wiedzie to daje nam felgi.
Przy tym freezuje nam pojazd na czas kiedy jestesmy w markerze.
Chcialem zeby komend? "stop" odblokowa?o mi pojazd bym m?g? odjecha?, ale niestety komenda "stop" nie przynosi wefektu
local myMarker = createMarker ( - 19 , 1178 , 20 , 'cylinder' , 2.0 , 255 , 0 , 0 , 150 )
function fele ( player , commandName , id , hitElement , matchingDimension )
if isPedInVehicle ( player ) then
local elementType = getElementType ( hitElement )
local id = tonumber ( id )
local theVehicle = getPedOccupiedVehicle ( player )
local success = addVehicleUpgrade ( theVehicle , 1073 )
local currentFreezeStatus = isElementFrozen ( theVehicle )
setElementFrozen ( theVehicle , true )
end
end
addEventHandler ( "onMarkerHit" , myMarker , fele )
function stop ( thePlayer , playerVehicle )
if isPedInVehicle ( thePlayer ) then
local playerVehicle = getPedOccupiedVehicle ( thePlayer )
local currentFreezeStatus = isElementFrozen ( playerVehicle )
local newFreezeStatus = not currentFreezeStatus
setElementFrozen ( playerVehicle , false )
end
end
addCommandHandler ( "stop" , stop )
Wysłany: 2015-07-17, 19:55
Tostuch
Wiek: 27 Na forum: 4931 dni Posty: 483
Nick w MP: Tost
Piwa : 137
Drugi argument w addCommandHandler server-side to komenda.
function stop ( thePlayer , command )
Wysłany: 2015-07-17, 20:42
timmer1994
Recon
Wiek: 31 Na forum: 3981 dni Posty: 60
Nick w MP: Recon
Piwa : 6
Dalej jestem zablokowany, po wpisaniu "/stop"
Podpis
Uczę się tworzyć skrypty
Pomóż zielonemu.
Wysłany: 2015-07-17, 21:03
Maximerr
Programmer PHP, LUA
Wiek: 25 Na forum: 4427 dni Posty: 548
Piwa : 1051
function stop ( plr , cmd )
if isPedInVehicle ( plr ) then
local auto = getPedOccupiedVehicle ( plr )
if isElementFrozen ( auto ) then
setElementFrozen ( auto , false )
end
end
end
addCommandHandler ( "stop" , stop )
Tagi: tuning :: marker :: komenda
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: