Jump to content

MightyAnimals

Members
  • Posts

    46
  • Joined

  • Last visited

Posts posted by MightyAnimals

  1. I'll give you an example of what I've got to do custom paintjobs though.

    Client sided -

    local shaderPJ = dxCreateShader ( "texture.fx" ) 
    local shaderPJ2 = dxCreateShader ( "texture.fx" ) 
    local shaderPJ3 = dxCreateShader ( "texture.fx" ) 
      
    --Elegy paintjob 1 
    function elegyPaintjob1( ) 
            local elegyPaintjob1 = dxCreateTexture ( "paintjobs/pj1.png") 
            dxSetShaderValue ( shaderPJ, "gTexture", elegyPaintjob1 ) 
            engineApplyShaderToWorldTexture ( shaderPJ, "elegy1body256" )    
        end 
    addEventHandler ( "onClientResourceStart", resourceRoot, elegyPaintjob1)     
    --Elegy paintjob 2 
    function elegyPaintjob2( ) 
            local elegyPaintjob2 = dxCreateTexture ( "paintjobs/pj2.png") 
            dxSetShaderValue ( shaderPJ2, "gTexture", elegyPaintjob2 ) 
            engineApplyShaderToWorldTexture ( shaderPJ2, "elegy2body256" )   
        end 
    addEventHandler ( "onClientResourceStart", resourceRoot, elegyPaintjob2)     
    --Elegy paintjob 3 
    function elegyPaintjob3( ) 
            local elegyPaintjob3 = dxCreateTexture ( "paintjobs/pj3.png") 
            dxSetShaderValue ( shaderPJ3, "gTexture", elegyPaintjob3 ) 
            engineApplyShaderToWorldTexture ( shaderPJ3, "elegy3body256" )   
        end 
    addEventHandler ( "onClientResourceStart", resourceRoot, elegyPaintjob3) 
      
     

    You see elegy1body256? Ofcourse you do, that is the name of the first paintjob.

    You can find those Id's in the .txd files, use txdworkshop to find em. elegy.txd or savanna.txd etc.

     

    texture.fx:

    texture gTexture;
    
    technique TexReplace
    {
        pass P0
        {
            Texture[0] = gTexture;
        }
    }

     

  2. That did work!

    I got another problem

    table.insert(content, {"   -  " ..(getElementData(source, "carname[model]") or getVehicleNameFromModel( getElementModel( source ) ))} ) 
    

    I've tried some options neither did they work. I actually want the custom carname to show instead of the mta model

  3.   
    bantime = getRealTime(getBanTime(theBan)) 
    local day = bantime.day 
    local month = bantime.month+1 
    local year = bantime.year+1900 
    local hour = bantime.hour 
    local minute = bantime.minute 
    local second = bantime.second 
    dateformatted = string.format(%.2d/%.2d/%.4d %.2d:%.2d:%.2d, day, month, year, hour, minute, second) 
      
    

    Gives a formatted date like this:

    01/01/0001 00:00:00

    That's what I ment earlier when I asked if you scripted the date sequence Sendy.

    Seems that you didn't do that.

  4. You don't have to.. Just look for the command.refreshall to the right it says, access="true"<>/right> or access="false"<>/right>

    See these?

    Means it's disabled. Putting it on true makes sure you can start and stop resources by just typing: /start resourcename /stop resourcename

    Just look for these

    and put them on true if the ACL group needs it, if not just leave it on false.

    Problem probably solved. Case Closed.

  5. Heh, the only thing I wanted was that it actually showed the custom car

    > Example: This 1993 Sabaru Impreza Belongs to Brian O'Donnald.

    Since I forgot what I had to do, I made this topic..

  6. That didn't work though..

    Still, thanks for trying.

    That's what i've got to get the new name.

    function getVehicleCustomNameAndIDFromModel(model) 
        local exists = 0 
        for k,v in pairs(carname) do 
            if k == model then 
                exists = 1 
            end 
        end 
        if exists == 1 then 
            local newvehnameid = math.random(1,#carname[model]) 
            return {carname[model][newvehnameid], newvehnameid} 
        else 
            return {getVehicleNameFromModel(model), 1} 
        end 
    end 
    

  7. Well, in the begin of the script i've got

    local carname = { }

    carname[506] = {"Austin Martin Z12 Zagato MD10"}

    carname[560] = {"1993 Subaru Impreza"}

    when I do

    outputChatBox("(( This " .. tostring(carname) .. " belongs to " .. ownerName .. ". ))", thePlayer, 255, 195, 14)

    it gives me those variables.

    in the spoiler it says vehnameid which is the vehicles.sql. shows nil when I enter the car.

×
×
  • Create New...