Jump to content

Geteco

Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by Geteco

  1. Today no one wanna try to code by yourself. They just ask for the code and done. Whatever.
  2. The code works perfectly. Are you sure is your ping over 100? and the code are in client-side?
  3. Can you save through XML. here's an example: function saveTable() local loadFile = xmlLoadFile("save.xml", "root") if not (loadFile) then loadFile = xmlCreateFile("save.xml", "root") end for i, v in ipairs(ourTable) do -- change 'ourTable' to your table name local createChild = xmlCreateChild(loadFile, "vehicle") xmlNodeSetAttribute(createChild, "x", v.x) -- v.x is your table value, just change it xmlNodeSetAttribute(createChild, "y", v.y) xmlNodeSetAttribute(createChild, "z", v.z) end end addCommandHandler("rsave", saveTable)
  4. I don't know, if does not work, test code from below. client-side server-side OBS: The first version of this code ins't work. use this one.
  5. local shader = dxCreateShader("shader.fx", 0, 0, true, "ped") local avaliableClothes = { {"cj_ped_torso", "1.png"}, {"cj_ped_torso", "2.png"}, {"cj_ped_torso", "3.png"}, {"cj_ped_torso", "4.png"} -- vector 1 = tex name, vector 2 = tex file } function createClothes(id) local clothes = getAvaliableClothes() local texture = dxCreateTexture(clothes[id][2]) if (id) then if (clothes[id]) then engineApplyShaderToWorldTexture(shader, clothes[id][1]) dxSetShaderValue(shader, "Tex0", texture) outputChatBox("creating shader") else outputChatBox("invalid id") end else outputChatBox("please provied an id") end end
  6. Maybe should use shader? local shader = dxCreateShader("shader.fx", 0, 0, true, "ped") local texture = dxCreateTexture("texture.png") addEventHandler("onClientResourceStart", resourceRoot, function() engineApplyShaderToWorldTexture(shader, "cj_ped_torso") dxSetShaderValue(shader, "Tex0", texture) end) shader.fx
×
×
  • Create New...