Üzenetek megjelenítése

Ez a szekció lehetővé teszi a felhasználó által írt összes hozzászólás megtekintését. Vedd figyelembe, hogy csak azokba a fórumokba írt hozzászólásokat látod, amelyekhez hozzáférésed van.


Üzenetek - tomaker

Oldalak: [1] 2 3 ... 8
1
Segítségkérés / Multi line text height
« Dátum: 2018. Március 27. - 12:49:04 »
Sziasztok azt szeretném kérdezni ha van egy stringem ami több sorból áll és dinamikusan változik(chat system) hogy tudnám lekérni azt hogy hány sora van ? 
 

str = [[1
2
3
4
5
6
]]

 
ennek pl 6 sort adjon ki 

2
Segítségkérés / Egyedi tuning és szín
« Dátum: 2017. Augusztus 31. - 01:30:05 »
Sziasztok az lenne a kérdésem : 
 
1.) Van egy kocsim annak eltüntettem a bumperjét és creálok egy ujjat mint egy object és hozzá attacholom ez így jó lesz hosszú távon egy kocsis szerveren a tuning rendszerbe ? 
 
2.) Hogy tudnám annak az egy objektumnak a színét meg változtatni ? Mert úgy akarom hogy a kocsi szinéhez passzoljon.
 
Forrás kód :  Kliens : 
 

bumper = nil
addEventHandler(\"onClientResourceStart\",resourceRoot,
function()
shader = dxCreateShader(\"color.fx\",0,0,false,\"object\")
end)
 
function newBumper()
local theVeh = getPedOccupiedVehicle(localPlayer)
setVehicleComponentVisible(theVeh, \"bump_front_dummy\", false)
local x,y,z = getVehicleComponentPosition(theVeh, \"bump_front_dummy\")

triggerServerEvent ( \"CreateBumper\", resourceRoot,localPlayer,theVeh,x,y,z)
end
addCommandHandler(\"bumper\",newBumper)
function getBumperGlobal ( bum,veh )
outputChatBox(\"GOOD NIGGA\")
  bumper = bum
  engineApplyShaderToWorldTexture (shader,\"#emapelegybody128\",veh)
end
addEvent( \"getBumpCli\", true )
addEventHandler( \"getBumpCli\", localPlayer, getBumperGlobal )
 
function playerPressedKey(button, press)
    if (press)  and (button == \"arrow_l\")then
   local x,y,z =  getElementAttachedOffsets(bumper)   
   triggerServerEvent ( \"MoveBump\", resourceRoot,bumper,x+0.01,y,z)
    end
if (press)  and (button == \"arrow_r\")then
   local x,y,z =  getElementAttachedOffsets(bumper)   
   triggerServerEvent ( \"MoveBump\", resourceRoot,bumper,x-0.01,y,z)
    end

if (press)  and (button == \"arrow_u\")then
   local x,y,z =  getElementAttachedOffsets(bumper)   
   triggerServerEvent ( \"MoveBump\", resourceRoot,bumper,x,y+0.01,z)
    end

if (press)  and (button == \"arrow_d\")then
   local x,y,z =  getElementAttachedOffsets(bumper)   
   triggerServerEvent ( \"MoveBump\", resourceRoot,bumper,x,y-0.01,z)
    end

if (press)  and (button == \"num_1\")then
   local x,y,z =  getElementAttachedOffsets(bumper)   
   triggerServerEvent ( \"MoveBump\", resourceRoot,bumper,x,y,z+0.01)
    end

if (press)  and (button == \"num_3\")then
   local x,y,z =  getElementAttachedOffsets(bumper)   
   triggerServerEvent ( \"MoveBump\", resourceRoot,bumper,x,y,z-0.01)
    end


end
addEventHandler(\"onClientKey\", root, playerPressedKey)
 
-- This function will set the new color of the nitro
function Coloring(r,g,b)
if shader then
   if r and g and b then
   local theVeh = getPedOccupiedVehicle(localPlayer)
      
      dxSetShaderValue (shader, \"gNitroColor\", r/255, g/255, b/255 )
   end
end
end
-- Example command use
addCommandHandler(\"color\",
function(command,r,g,b)
if r and g and b then
   local r,g,b = tonumber(r),tonumber(g),tonumber(b)
   if r <= 255 and g <= 255 and b <= 255 then
      Coloring(r,g,b)
   else
      outputChatBox(\"Colors must be between 0 and 255\",255,255,255,true)
   end

end
end)

 
Szerver : 
 

function createBumpObject(player,vehicle,x,y,z)
bumper = createObject ( 1172,  x,  y,  z)
attachElements(bumper,vehicle,x,y,z)
triggerClientEvent ( player, \"getBumpCli\", player,bumper,vehicle)
end
addEvent( \"CreateBumper\", true )
addEventHandler( \"CreateBumper\", resourceRoot, createBumpObject )
 
function moveBump(bump,x,y,z)
setElementAttachedOffsets (bump,x,y,z)
end
addEvent( \"MoveBump\", true )
addEventHandler( \"MoveBump\", resourceRoot, moveBump )
 
function getBump(bump,x,y,z)
getElementAttachedOffsets (bump,x,y,z)
end
addEvent( \"getBump\", true )
addEventHandler( \"getBump\", resourceRoot, getBump )

 
Shader : 
 

float4 gColorShader = float4(255,255,255,150);
 
//---------------------------------------------------------------------
// These parameters are set by MTA whenever a shader is drawn
//---------------------------------------------------------------------
float4x4 gWorld : WORLD;
float4x4 gView : VIEW;
float4x4 gProjection : PROJECTION;
 
//------------------------------------------------------------------------------------------
// textureState - String value should be a texture number followed by \'Texture\'
//------------------------------------------------------------------------------------------
texture gTexture0           < string textureState=\"0,Texture\"; >;
 
//---------------------------------------------------------------------
// Sampler for the main texture
//---------------------------------------------------------------------
sampler texsampler = sampler_state
{
    Texture = (gTexture0);
};
 
//---------------------------------------------------------------------
// Structure of data sent to the vertex and pixel shaders
//---------------------------------------------------------------------
struct VertexShaderInput
{
    float3 Position : POSITION0;
    float4 Diffuse : COLOR0;
    float2 TexCoords : TEXCOORD0;
};
struct PixelShaderInput
{
    float4 Position  : POSITION;
    float4 Diffuse : COLOR0;
    float2 TexCoords : TEXCOORD0;
};
 
//------------------------------------------------------------------------------------------
// VertexShaderFunction
//------------------------------------------------------------------------------------------
PixelShaderInput VertexShaderFunction(VertexShaderInput In)
{
    PixelShaderInput Out = (PixelShaderInput)0;

float4 posWorld = mul(float4(In.Position,1), gWorld);
    float4 posWorldView = mul(posWorld, gView);
    Out.Position = mul(posWorldView, gProjection);
Out.TexCoords = In.TexCoords;

    Out.Diffuse = saturate(gColorShader);

    return Out;
}
 
//------------------------------------------------------------------------------------------
// PixelShaderFunction
//------------------------------------------------------------------------------------------
float4 PixelShaderFunction(PixelShaderInput In) : COLOR0
{
float4 texel = tex2D(texsampler, In.TexCoords);

float4 finalColor = texel * In.Diffuse;
   
finalColor *= 0.23;

    return finalColor;
}
 
//-----------------------------------------------------------------------------
// Techniques
//-----------------------------------------------------------------------------
technique nitro
{
    pass P0
    {
        VertexShader = compile vs_2_0 VertexShaderFunction();
        PixelShader  = compile ps_2_0 PixelShaderFunction();
    }
}
 
technique fallback
{
    pass P0
    {
    }
}

 
 

3
MTA: Általános / Dynamic Camera
« Dátum: 2017. Augusztus 30. - 01:27:57 »
Sziasztok egy ehhez hasonlo kamera rendszert szeretnék létre hozni hogyan kezdjem ? Igazából csak a kosics része érdekel leginkább a többi nem de az nagyon.
 
Kezdjem a nulláról vagy valami ötlet ? 
 


   

 
 

4
Segítségkérés / Gombok
« Dátum: 2016. Augusztus 11. - 17:43:40 »
köszi és ezt nem lehet leröviditeni ?
 
function clicked(button,state)
        if state == \"down\" and isCursorOnElement(positionCache[1],screen[2]/2-box[2]/2, box[1], box[2] ) then
                outputChatBox(\"click\")
        elseif state == \"down\" and isCursorOnElement(positionCache[2],screen[2]/2-box[2]/2, box[1], box[2] ) then
                outputChatBox(\"click2\")
        elseif state == \"down\" and isCursorOnElement(positionCache[3],screen[2]/2-box[2]/2, box[1], box[2] ) then
                outputChatBox(\"click3\")
        end
end
addEventHandler(\"onClientClick\", getRootElement(), clicked)

 

Dupla hozzászólás automatikusan összefûzve. ( [time]2016. augusztus 11. 17:44:44[/time] )

mert vagy 15-20 gombot igy egyesével nehéz lesz beirni

Dupla hozzászólás automatikusan összefûzve. ( 2016. Augusztus 11. - 17:45:51 )

ja semmi bocs hülye vagyok  ;D ;D :D

5
Segítségkérés / Ne tudjon futni
« Dátum: 2016. Augusztus 11. - 16:54:00 »
Kliensben
 
toggleControl(\"sprint \",false)

6
Segítségkérés / Gombok
« Dátum: 2016. Augusztus 11. - 16:34:42 »
jó ezt én is tudtam :D :D
De nekem loopban kéne és azt meglehet oldani ? azért nyitottam a témát

7
Segítségkérés / Gombok
« Dátum: 2016. Augusztus 11. - 16:23:24 »
Tudom hogy a gőrgetés mi de én csak Guiban gondolkoztam és azért mondom hogy lehet Cursor pos - al nehezebb
Egy saját játék mód melyekben vannak pályák és pályákat csinálok és a játékosok majd a pálya között fognak választani röviden olyan mint egy CS:GO játék választó de a Játék mód teljesen más

8
Segítségkérés / Út textúrához script
« Dátum: 2016. Augusztus 11. - 16:20:46 »

function SkinSet()
txd = engineLoadTXD(\"bfost.txd\")
engineImportTXD(txd,10)
dff = engineLoadDFF(\"bfost.dff\",10)
engineReplaceModel(dff,10)
end
addCommandHandler(\"Sk\",SkinSet)

 
ha erről beszélsz

9
Segítségkérés / Gombok
« Dátum: 2016. Augusztus 11. - 16:16:42 »
Ez egy lobby script akar lenni és nekem az kellene hogy minden k elemű dxDrawRectanglere rátudjak kattintani és hogy lehessen gőrgővel mozogni azért akartam beálitani a Guit mert CursorGetPos - al nehezen lehet azt megoldani hogy tudjak majd gőrgetni
 
 
local dif = (screenH * 0.3620) - (screenH * 0.3034)
local k = {}
for k = 1,10 do
dxDrawRectangle(screenW * 0.0928, screenH * 0.2448+(k*dif), screenW * 0.6764, screenH * 0.0456, tocolor(254, 0, 0, 255), false)

10
Segítségkérés / Gombok
« Dátum: 2016. Augusztus 11. - 13:11:37 »
az - az ?

11
Segítségkérés / Gombok
« Dátum: 2016. Augusztus 11. - 03:20:34 »
code=lua]
for k = 1,10 do
label[k] = guiCreateLabel(screenW * 0.0928, screenH * 0.2448+(k*dif), screenW * 0.6764, screenH * 0.0456,\"\",true)
addEventHandler ( \"onClientGUIClick\", label[k], outputEditBox, false )[

 
ebben mi lehet a probléma ? dif jól van deklarálva

12
Segítségkérés / Gombok
« Dátum: 2016. Augusztus 11. - 01:14:15 »
Nem hanem az hogy a Labelhez ugye nem kell külön külön hozzá rendelni az eseményt(addEventHandler úgyértem hogy ugye nem ezt kellesz csinálnom :
 addEventHandler ( \"onClientGUIClick\", label[1], outputEditBox, false )
 addEventHandler ( \"onClientGUIClick\", label[2], outputEditBox, false )
 addEventHandler ( \"onClientGUIClick\", label[3], outputEditBox, false )
 addEventHandler ( \"onClientGUIClick\", label[4], outputEditBox, false )
)

13
Segítségkérés / Gombok
« Dátum: 2016. Augusztus 10. - 23:43:49 »
Sziasztok ! :)
 
      
menu = getElementData(root, \"root.menu\")      
Count = 0
for Index, Value in pairs( menu.name ) do
Count = Count + 1
end
 
for k = 1,Count do
label[k] = guiCreateLabel(screenW * 0.0928, screenH * 0.2448+(k*dif), screenW * 0.6764, screenH * 0.0456,\"\",true)
addEventHandler ( \"onClientGUIClick\", label[k], outputEditBox, false )
dxDrawRectangle(screenW * 0.0928, screenH * 0.2448+(k*dif), screenW * 0.6764, screenH * 0.0456, tocolor(254, 0, 0, 255), false)   
dxDrawText(menu.name[k], screenW * 0.0908,screenH * 0.2448+(k*dif), screenW * 0.2599, screenH * 0.3490, tocolor(255, 255, 255, 255), 2.00, \"default-bold\", \"center\", \"top\", false, false, false, false, false)
dxDrawText(menu.map[k], screenW * 0.2599, screenH * 0.2448+(k*dif), screenW * 0.4290, screenH * 0.3490, tocolor(255, 255, 255, 255), 2.00, \"default-bold\", \"center\", \"top\", false, false, false, false, false)
dxDrawText(menu.player[k], screenW * 0.4290, screenH * 0.2448+(k*dif), screenW * 0.5981, screenH * 0.3490, tocolor(255, 255, 255, 255), 2.00, \"default-bold\", \"center\", \"top\", false, false, false, false, false)
dxDrawText(menu.time[k], screenW * 0.5981, screenH * 0.2448+(k*dif), screenW * 0.7672, screenH * 0.3490, tocolor(255, 255, 255, 255), 2.00, \"default-bold\", \"center\", \"top\", false, false, false, false, false)
end

 
Az lenne a kérdésem hogy most ez miért nem működik vagy minden labelt egyesével kell majd beirnom vagy hogy van ez ?Mi lehet benne a probléma ?

14
Segítségkérés / Lobby system
« Dátum: 2016. Augusztus 10. - 17:56:42 »
A lobby azért különbözik a Frakciótól . A lobbyt azért akarom megirni hogy a játékosok akik egymással akarnak játszani azok bemehessenek játék szóbába és ki.
Köszönöm nagyon sokat segitettél . Mert egy komolyabb játék szobákra oszló gamemodot irtunk csak a szoba csinálás nehéz és megáltunk a projektel és nem tudunk hová menni mert a gamemode kész már csak ez maradt hátra

15
Segítségkérés / Lobby system
« Dátum: 2016. Augusztus 10. - 14:05:18 »
Igen de az nem lenne lassú kommunikálni a szerverrel mert már kész van a lobby design és dxDraw használok és mysql meg nem lenne túl lassú ? vagy ha minden Rendernél lekérném akkor meg kiakadna a szerver

Oldalak: [1] 2 3 ... 8
SimplePortal 2.3.7 © 2008-2024, SimplePortal