Wysłany: 2015-10-18, 13:10
DylemaT929
Nikt
Wiek: 28 Na forum: 4041 dni Posty: 333
Nick w MP: dylemat929
Piwa : 3195
Witam, gdy wpisuje /x i jest kolczatka, ale jest minus tego, ?e jak wjad? przednimi ko?ami to od razu te cztery znikaj? zamiast jednego i czy jest mo?liwo?? taka by mi kto? to edytowa?
Kod:
local thePlayer = getLocalPlayer()
local theKolczatka = {}
local kolec = {}
function kladz()
if( isPlayerInVehicle( thePlayer ) ) then -- is the player in a car?
if( isElement( theKolczatka[ thePlayer ] ) ) then
destroyElement( theKolczatka[ thePlayer ] )
destroyElement( kolec[ thePlayer ] )
end
local theVehicle = getPlayerOccupiedVehicle( thePlayer )
local rx, ry, rz = getVehicleRotation( theVehicle )
local x, y, z = getElementPosition( theVehicle )
local a = getPlayerRotation( thePlayer )
x = x + math.sin( math.rad(a) ) * 4
y = y - math.cos( math.rad(a) ) * 4
rz = rz + 90
local ziemiaZ = getGroundPosition( x, y, z )
if( ziemiaZ ~= z ) then z = ziemiaZ + 0.2 end
theKolczatka[ thePlayer ] = createObject( 2899, x, y, z, 0, 0, rz )
kolec[ thePlayer ] = createColRectangle( (x - 2.0), (y - 2.0), 4.0, 4.0 )
setElementData( kolec[ thePlayer ], "kolce", "abc" )
outputChatBox( "Roz?o?y?e? kolczatk?!", thePlayer, 255, 0, 0, true )
else
outputChatBox( "Musisz by? w aucie ?eby po?o?yc kolczatk?!", thePlayer, 255, 0, 0, true )
end
end
function kolabum( theElement, matchingDimension )
if( getElementType( theElement ) == "vehicle" and getElementData( source, "kolce" ) == "abc" ) then
setVehicleWheelStates( theElement, 2, 2, 2, 2 )
end
end
I jeszcze chce je usun??, ale niestety jeszcze nie umiem tak dobrze tego napisa? aby usun?? czy kto? m?g?by to przerobi? lepiej ?.
Wysłany: 2015-10-19, 18:26
jg2aviva1
Rusek :D
Wiek: 25 Na forum: 4134 dni Posty: 445
Nick w MP: _Wolfenstei[N]^.^
Piwa : 1033
Pr?buj xD :
local thePlayer = getLocalPlayer ()
local theKolczatka = {}
local kolec = {}
function kladz ()
if( isPlayerInVehicle ( thePlayer ) ) then -- is the player in a car ?
if( isElement ( theKolczatka [ thePlayer ] ) ) then
destroyElement ( theKolczatka [ thePlayer ] )
destroyElement ( kolec [ thePlayer ] )
end
local theVehicle = getPlayerOccupiedVehicle ( thePlayer )
local rx , ry , rz = getVehicleRotation ( theVehicle )
local x , y , z = getElementPosition ( theVehicle )
local a = getPlayerRotation ( thePlayer )
x = x + math . sin ( math . rad ( a ) ) * 4
y = y - math . cos ( math . rad ( a ) ) * 4
rz = rz + 90
local ziemiaZ = getGroundPosition ( x , y , z )
if( ziemiaZ ~= z ) then z = ziemiaZ + 0.2 end
theKolczatka [ thePlayer ] = createObject ( 2899 , x , y , z , 0 , 0 , rz )
kolec [ thePlayer ] = createColRectangle ( ( x - 2.0 ), ( y - 2.0 ), 4.0 , 4.0 )
setElementData ( kolec [ thePlayer ], "kolce" , "abc" )
outputChatBox ( "Roz?o?y?e? kolczatk?!" , thePlayer , 255 , 0 , 0 , true )
else
outputChatBox ( "Musisz by? w aucie ?eby po?o?yc kolczatk?!" , thePlayer , 255 , 0 , 0 , true )
end
end
addCommandHandler ( "kolczatka" , kladz )
function kolabum ( theElement , matchingDimension )
if( getElementType ( theElement ) == "vehicle" and getElementData ( source , "kolce" ) == "abc" ) then
setVehicleWheelStates ( theElement , 2 , 0 , 2 , 0 )
end
end
function usun ( theKolczatka [ thePlayer ])
deleteObject ( theKolczatka [ thePlayer ])
end
addCommandHandler ( "usun" , usun )
Podpis
GTAO Member: 2015-08-23, 14:26
Tagi: kolaczatki
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: