Jump to content

طلب كود


Recommended Posts

Posted

السلام عليكم

كيفكم ي شطار

المهم

ابي اسوي مود فلشر

بالشادور فلات بس مني عارف كيف اسويه على السيارات :(

هذا ملف الشادر

  
// 
// tex_names.fx 
// 
  
float Time : TIME; 
  
// Make everything all flashy! 
float4 GetColor() 
{ 
    return float4( 1, 1, 0, 1 ); 
} 
  
//----------------------------------------------------------------------------- 
// Techniques 
//----------------------------------------------------------------------------- 
technique tec0 
{ 
    pass P0 
    { 
        MaterialAmbient = GetColor(); 
        MaterialDiffuse = GetColor(); 
        MaterialEmissive = GetColor(); 
        MaterialSpecular = GetColor(); 
  
        AmbientMaterialSource = Material; 
        DiffuseMaterialSource = Material; 
        EmissiveMaterialSource = Material; 
        SpecularMaterialSource = Material; 
  
        ColorOp[0] = SELECTARG1; 
        ColorArg1[0] = Diffuse; 
  
        AlphaOp[0] = SELECTARG1; 
        AlphaArg1[0] = Diffuse; 
  
        Lighting = true; 
    } 
} 
  
  
  
  

اتمنى المساعدة :(

Posted
Qa94AL.png

shader: The shader which is to be applied -- الشادر الي تبيه

textureName: The name of the world texture to apply the shader to. -- texture اسم الـ

اعرف كيف احطة

بس معرف وش احط فيه

+ كيف اخليه يشتغل وطفى بزر معين

+ كيف اخليه على نور السياره وتكون السياره اصلا معدله علشان يشتغل

Posted
وش تبي تسوي؟

مود فليشر

وراح يشتغل على فلات معين في تصميم السياره

يشتغل بزر

1382440408_gta_sa2013-10-2215-10-15-35.jpg

Posted

الي فهمته أنك تبي فلشر للمواتر ?

حط ذا الكود في ملف سيرفر وشغله

واركب موتر واضغط [

او اكتب باف8 ff

  
vehicles = {} 
  
function toggleVehicleLights ( car ) 
    if ( getVehicleOverrideLights ( car ) ~= 2 ) then 
        setVehicleOverrideLights ( car, 2 ) 
    else 
        setVehicleOverrideLights ( car, 1 ) 
    end 
end 
  
function toggleFlashingLights ( thePlayer ) 
    if isPedInVehicle ( thePlayer ) then 
        if getPedOccupiedVehicleSeat ( thePlayer ) == 0 then 
            if vehicles[getPedOccupiedVehicle ( thePlayer )] then 
                killTimer ( vehicles[getPedOccupiedVehicle ( thePlayer )] ) 
                vehicles[getPedOccupiedVehicle( thePlayer )] = nil 
            else 
                vehicles[getPedOccupiedVehicle ( thePlayer )] = setTimer ( toggleVehicleLights, 250, 0, getPedOccupiedVehicle ( thePlayer ) ) 
            end 
        end 
    end 
end 
addCommandHandler ( "ff", toggleFlashingLights ) 
  
addEventHandler ( "onResourceStart", resourceRoot, function ( ) 
    for _,v in ipairs ( getElementsByType ( "player" ) ) do 
        bindKey ( v, "]", "down", toggleFlashingLights ) 
    end 
end) 
  
addEventHandler ( "onPlayerJoin", root, function ( ) 
    bindKey ( source, "]", "down", toggleFlashingLights ) 
end) 
Posted
الي فهمته أنك تبي فلشر للمواتر ?

حط ذا الكود في ملف سيرفر وشغله

واركب موتر واضغط [

او اكتب باف8 ff

  
vehicles = {} 
  
function toggleVehicleLights ( car ) 
    if ( getVehicleOverrideLights ( car ) ~= 2 ) then 
        setVehicleOverrideLights ( car, 2 ) 
    else 
        setVehicleOverrideLights ( car, 1 ) 
    end 
end 
  
function toggleFlashingLights ( thePlayer ) 
    if isPedInVehicle ( thePlayer ) then 
        if getPedOccupiedVehicleSeat ( thePlayer ) == 0 then 
            if vehicles[getPedOccupiedVehicle ( thePlayer )] then 
                killTimer ( vehicles[getPedOccupiedVehicle ( thePlayer )] ) 
                vehicles[getPedOccupiedVehicle( thePlayer )] = nil 
            else 
                vehicles[getPedOccupiedVehicle ( thePlayer )] = setTimer ( toggleVehicleLights, 250, 0, getPedOccupiedVehicle ( thePlayer ) ) 
            end 
        end 
    end 
end 
addCommandHandler ( "ff", toggleFlashingLights ) 
  
addEventHandler ( "onResourceStart", resourceRoot, function ( ) 
    for _,v in ipairs ( getElementsByType ( "player" ) ) do 
        bindKey ( v, "]", "down", toggleFlashingLights ) 
    end 
end) 
  
addEventHandler ( "onPlayerJoin", root, function ( ) 
    bindKey ( source, "]", "down", toggleFlashingLights ) 
end) 

اخوي انا قلت ابيه بـ الشادور فلات

هذا سهل مره

ابي الشادور فلات على الموتر كيف ؟؟؟

Posted
engineApplyShaderToWorldTexture 

وش اكتب في هذا اعرف احطة بس وش احط فيه علشان يشتغل على الموتر

Posted
engineApplyShaderToWorldTexture (shader , "text" ) 

shader = الشادر

text = التكست

حلووووين هذي نعرفها بس وش نكتب في

text = التكست

علشان تجي في المواتر ؟؟؟

Posted
أنت تبيه للسيارة

حط التكست

"vehiclegrunge256" 

والله عارف اني بالشك

بس كيف اعرفه على السياره يعني لمن اصمم السياره احط اوبجكت في السياره بهذا الاسم ولا كيف

فهمني ي مدير

Posted

تصمم سيارة ؟

انت قلت تبي شادر ع السيارة شف بعطيك مثال

وانت طبق عليه

shader = dxCreateShader("shader.fx", 0, 0, false, "vehicle") 
texture = dxCreateTexture("theme.jpg") 
dxSetShaderValue(shader, "CarSkin", texture) 
engineApplyShaderToWorldTexture(shader, "vehiclegrunge256") 

shader.fx

  
texture CarSkin; 
      
technique simple { 
    pass P0 { 
        Texture[0] = CarSkin; 
    } 
} 

Posted

طيب ي اخوان

كثير الله خيركم

بس باقي م خلصنا

اسم التكست vehiclelightson128

بس كيف اخليه م يشتغل إلا لزم تركب السياره

واخليه طفى ويشتغل " يومض " ممكن تفيدوني

Posted
طيب ي اخوان

كثير الله خيركم

بس باقي م خلصنا

اسم التكست vehiclelightson128

بس كيف اخليه م يشتغل إلا لزم تركب السياره

واخليه طفى ويشتغل " يومض " ممكن تفيدوني

حط الشادر بالحدث هذا

"onClientVehicleEnter" 

Posted
طيب ي اخوان

كثير الله خيركم

بس باقي م خلصنا

اسم التكست vehiclelightson128

بس كيف اخليه م يشتغل إلا لزم تركب السياره

واخليه طفى ويشتغل " يومض " ممكن تفيدوني

حط الشادر بالحدث هذا

"onClientVehicleEnter" 

سوينا :(

myShader = dxCreateShader( "shader.fx" ) 
  
addEventHandler("onClientVehicleEnter", root, 
    function(thePlayer, seat) 
        local theVehicle = source 
        if seat == 0 and thePlayer == localPlayer then 
            engineApplyShaderToWorldTexture( myShader, "vehiclelightson128", theVehicle ) 
        end 
    end 
) 
  
addEventHandler("onClientVehicleExit", root, 
    function(thePlayer, seat) 
        local theVehicle = source 
        if seat == 0 and thePlayer == localPlayer then 
            engineRemoveShaderFromWorldTexture( myShader, "vehiclelightson128", theVehicle ) 
        end 
    end 
) 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...