Jump to content

WhoAmI

Members
  • Posts

    1,248
  • Joined

  • Last visited

Everything posted by WhoAmI

  1. shader.fx: //-- Declare the texture. These are set using dxSetShaderValue( shader, "Tex0", texture ) texture Tex0; technique simple { pass P0 { //-- Set up texture stage 0 Texture[0] = Tex0; //-- Leave the rest of the states to the default settings } } some client LUA code: function applyShader ( ) local shader = dxCreateShader ( "shader.fx" ); -- creating shader local texture = dxCreateTexture ( "someimage.png" ); -- creating texture from image if ( shader and texture ) then -- checking if everything is okay dxSetShaderValue ( shader, "Tex0", texture ); -- applying texture to shader setElementModel ( localPlayer, 0 ); -- setting CJ skin to player engineApplyShaderToWorldTexture ( shader, "cj_ped_torso", localPlayer ); -- applying shader to CJ's torse for player who used command end end addCommandHandler ( "applyshader", applyShader ); -- creating command /applyshader to applyShader function.
  2. It is. engineApplyShaderToWorldTexture
  3. Well, ports are opened, so that is strange. In both server have you added permission in ACL to this resource?
  4. That's strange. 401 error is It means that call was valid, but server that you are calling to, didn't respond. Are you sure that you are giving correct HTTP port? Give me your server's IPs.
  5. Copy my code again and tell me what it outputs now.
  6. If doesn't work change playerChatCallback function to function playerChatCallback(info, n) outputChatBox ( info .. " " .. n ) end And tell me what it tells on chat box. Also, are there any errors in /debugscript 3?
  7. Did you add it to ACL.xml? <group name="OutRPCGroup"> <acl name="OutRPC" /> <object name="resource.examplechat" /> </group> <acl name="OutRPC"> <right name="function.callRemote" access="true" /> </acl> <group name="InRPCGroup"> <acl name="InRPC" /> <object name="user.http_guest" /> </group> <acl name="InRPC"> <right name="resource.examplechat.http" access="true" /> </acl> Whre examplechat is your resource name.
  8. local length = songData[song][1] local minutes, seconds = unpack ( split ( length, ":" ) ) local length = (minutes*60 + seconds)*1000 outputChatBox(length.." | "..minutes..":"..seconds)
  9. local s = "3:41"; local minutes, seconds = split ( s, ":" );
  10. Or use toJSON and fromJSON.
  11. You can't export function as far as I know.
  12. Random Access Network XXX
  13. Of course it is. Just use database (MySQL/SQLite), before resource stops, get all vehicles and save it. After resource starts, load them.
  14. We won't make code for you. Show your code and we'll try to help you.
  15. What do you mean by area? Radararea? Or some part of map? If so, use colshape.
  16. It doesn't matter where the files will be. They just have to be in same resource.
×
×
  • Create New...