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?
[code]
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&q... |