Jump to content

xTravax

Members
  • Posts

    665
  • Joined

  • Last visited

Everything posted by xTravax

  1. downloadFile does not work on 1.3.5, i already made 1.4 downloader, i want to learn how to make 1.3.5 or below version one
  2. i was using scripts just as example,actually i want to write big files like mods and so on, but i also have no idea how to pass data with triggerClientEvent even tho i readed that wiki page already also im having problems with even detecting do the following scripts exist, so i can't even start on working your way
  3. okay but what do i do now then? i have no idea which event to put, and how to check if scripts exist so if they dont, it would start writing them
  4. i have tried to do this but i got a warning writeScripts = { {"send_client.lua"}, {"send_server.lua"}, } function triggerWriting(filepath) if not fileExists(filepath) then outputChatBox("file doesn't exist, about to create and write it!") writeScriptsToDisk() outputChatBox("starting to write...") end end addEventHandler("onResourceStart",root,triggerWriting) function writeScriptsToDisk(filepath) for i,v in ipairs(writeScripts) do local theFile = fileCreate(v[1]) local fileData = fileRead(theFile,120) if theFile then if fileData then outputChatBox("file was creating, about to write data...") fileWrite(theFile,fileData) outputChatBox("writing...") fileClose(theFile) outputChatBox("Done!") end end end end bad argument fileExists, expected string at argument 1, got resource-data please have understanding that i am new to file functions,haven't used them before and i don't have good experience with it
  5. i wanted to ask how couuld i do something like this i got a file (e.g a script or just random file with text) and i don't have it in meta,but i want to use fileWrite to write it so if the file was a e.g server-side script(server.lua) like this function test() outputChatBox("server file") end addEventHandler("onVehicleEnter",root,test) how could i use 'fileWrite' to write it to player's disk? i am getting confused about second argument 'string1' -- text which we want to write and first argument would be a file e.g "server_s.lua" so how could i write server.lua file to server_s.lua ? how do i load the server.lua text ? that's confusing me
  6. xTravax

    no disc inserted

    Please stop writing bullshit. All he has to do is patch his gta_sa.exe process.
  7. if he just hacks into whole (FTP?) Server which is very hard, you think he won't know how to decompile the serverside scripts? lol.
  8. server function isMuted() setElementData(source,"playermuted",1) end addEventHandler("onPlayerMute",root,isMuted) function isNotMuted() setElementData(source,"playermuted",0) end addEventHandler("onPlayerUnmute",root,isNotMuted) client function testing() local px, py, pz, tx, ty, tz, dist px, py, pz = getCameraMatrix( ) for _, v in ipairs( getElementsByType 'player' ) do tx, ty, tz = getElementPosition( v ) dist = math.sqrt( ( px - tx ) ^ 2 + ( py - ty ) ^ 2 + ( pz - tz ) ^ 2 ) if dist < 32.0 then if isLineOfSightClear( px, py, pz, tx, ty, tz, true, false, false, true, false, false, false,localPlayer ) then local sx, sy, sz = getPedBonePosition( v, 5 ) local x,y = getScreenFromWorldPosition( sx, sy, sz + 0.30 ) local x1,y1 = getScreenFromWorldPosition( sx, sy, sz + 0.35 ) local r,g,b = getPlayerNametagColor(localPlayer) scale = 0.65 if x then if getElementData(localPlayer,"playermuted") == 1 then dxDrawText( "Muted", x, y, x, y, tocolor(r, g, b), scale + ( 15 - dist ) * 0.02, "bankgothic" ) end end end end end end addEventHandler("onClientRender",root,testing)
  9. -- CLIENT SIDE function testing() local px, py, pz, tx, ty, tz, dist px, py, pz = getCameraMatrix( ) for _, v in ipairs( getElementsByType 'player' ) do tx, ty, tz = getElementPosition( v ) dist = math.sqrt( ( px - tx ) ^ 2 + ( py - ty ) ^ 2 + ( pz - tz ) ^ 2 ) if dist < 32.0 then if isLineOfSightClear( px, py, pz, tx, ty, tz, true, false, false, true, false, false, false,localPlayer ) then local sx, sy, sz = getPedBonePosition( v, 5 ) local x,y = getScreenFromWorldPosition( sx, sy, sz + 0.30 ) local x1,y1 = getScreenFromWorldPosition( sx, sy, sz + 0.35 ) local r,g,b = getPlayerNametagColor(localPlayer) scale = 0.65 if x then if getElementData(localPlayer,"playermuted") == 1 then dxDrawText( "Muted", x, y, x, y, tocolor(rr, gg, bb), scale + ( 15 - dist ) * 0.02, "bankgothic" ) end end end end end end addEventHandler("onClientRender",root,testing) -- SERVER SIDE function isMuted() if isPlayerMuted(source) then setElementData(source,"playermuted",1) else setElementData(source,"playermuted",0) end end setTimer(isMuted,500,0,source) addEventHandler("onPlayerJoin",root,isMuted) -- META this should work
  10. it is possible. your sentence is basically same as like saying facebook can't be hacked. And every few months few million million accounts get leaked by hackers
  11. 1. What's point of this? Un-encrypting and decompiling the scripts is pretty easy if you know how to do it, and hacking a server is much harder. So if someone succeeds to hack whole server, he surely knows how to decompile/unencrypt the scripts, so it's kinda useless.There aren't really much people who would just hack into server and run compiled/encrypted scripts. 2. Your element data would fail after some time. You put element data to everyone that server is "protected" and after someone else joins who previously hasn't, he won't have that element data.Same thing if some player reconnects. And the result would be that server is unprotected and script(s) would fail to load.
  12. xTravax

    The last reply

    bilal your character on your avatar is outdated, so you will get a ban!
  13. why don't you make something useful out of this like: make a tutorial how to fix it? in that case you would help others how to fix it if they don't know how to.
  14. not sure if this is the cause but you are overwriting stuff local playerZoneName = getZoneName ( playerX, playerY, playerZ, true ) local playerZoneName = ( tab [ playerZoneName ] or "None" ) ofc its showing none when you named 2 local variables with same name,change it so its like playerZoneName and playerZoneName2 or something local zoneName = getZoneName ( playerX, playerY, playerZ, true ) local zoneName = ( tab [ zoneName ] or "None" ) here same thing if ( zoneName == playerZoneName ) then you have defined zoneName as 2 variables,as you named them both the same name, 2nd one is overwriting first one and zoneName = (tab [ zoneName ] or "None" ) so that's why it doesn't output anything to chat as zoneName isn't 'playerZoneName' sry for messy post.
  15. 1) veh is not defined 2) im not sure 3) kokstruckcount is not defined as well
  16. i know but it's still bug why do we have to make a script for fixing this issue ? it's the admin panel i think or the mta program . because mta developers don't have time to fix it, and it's extremely easy to fix this problem by yourself
  17. ugh i told you after 9 line,not on line 9 local tab = { [ 'Los Santos' ] = 'LS'; [ 'Las Venturas' ] = 'LV'; [ 'San Fierro' ] = 'SF'; } function chatbox ( text, msgtype ) if ( msgtype == 0 ) then cancelEvent ( ) local name = getPlayerName ( source ) local playerX, playerY, playerZ = getElementPosition ( source ) local playerZoneName = getZoneName ( playerX, playerY, playerZ, true ) local playerZoneName = ( tab [ playerZoneName ] or "None" ) local team = getPlayerTeam ( source ) local r, g, b = unpack ( team and { getTeamColor ( team ) } or { getPlayerNametagColor ( source ) } ) for _, player in ipairs ( getElementsByType ( "player" ) ) do local playerX, playerY, playerZ = getElementPosition ( player ) local zoneName = getZoneName ( playerX, playerY, playerZ, true ) local zoneName = ( tab [ zoneName ] or "None" ) if ( zoneName == playerZoneName ) then outputChatBox ( "(".. playerZoneName ..")".. name ..":".. text, player, r, g, b, true ) end end end end addEventHandler ( "onPlayerChat", root, chatbox )
  18. cancel the event after line 9, not in the end of function
  19. Go to the main page. realy i don't saw it and not see it e.e and Sorry for that stupid think because i can't find it make sure you are loggined in before doing this STEP ONE STEP TWO STEP THREE here are links if you cant see full-sized image(s) of mine http://www.upload.ee/image/4189234/1.PNG http://www.upload.ee/image/4189235/2.PNG http://www.upload.ee/image/4189237/3.PNG
  20. Not working also i was see the after login: Download error: HTTP server file mismatch (downloadFilesResources) infernus.dff Download error: HTTP server file mismatch (downloadFileResources) infernus.txd it seems like an mta bug since my script and even wiki script doesnt work this should be reported to bugs.mtasa.com
  21. did you try to debug it manually with outputChatBox or outputDebugString messages? that way you can see where the code stops functioning properly
  22. when you start the resource do you get any error in console(F8) ?
  23. ok thanks tapl and max
×
×
  • Create New...