-
Posts
1,131 -
Joined
-
Last visited
-
Days Won
2
Everything posted by MIKI785
-
Might be a stupid question but do you use fileClose first? it should work otherwise, i guess you're using trigger(Latent)ClientEvent, right? In that case it shouldn't be able to get corrupted either. Show me how you load the files and send them on the server.
-
Obviously you have to finish downloading them before you run the dx functions. How do you actually download them?
-
Those are actual models, it's not possible to add new models (IDs), you may only replace existing ones.
-
because you're attaching it to localPlayer on the client, use root or resourceRoot instead.
-
Do you have restricted argument set to true in your addCommandHandler?
-
There are no commands to do that, either create a resource yourself or use runcode and ACL functions to do it manually.
-
Well, where is that function being called?
-
Yeah i told you it cannot be done, since the weapon the player is holding is not an element. You know what i mean? In engineApplyShaderToWorldTexture the targetElement argument, what do you set it to? There's no element for the weapon the player is holding but you could try setting it to be the player element, see what that does. If that doesn't solve it then I'm afraid it's not possible or maybe I just don't know how myself, so wait for someone else to reply. But try the player element first.
-
Well you might, it's not supposed to be happening because dash is a legal character for resource names. It's most likely a bug in admin resource and not MTA itself. But i could test that to be sure.
-
Shaders replace textures, not the models. Do you want to replace just one weapon (element) and not all of them that are of the same weapon ID? For example that two players have an M4 and you want it to be changed for just one player? I don't know if that's possible, since the weapons that are held by players are not elements of their own. createWeapon does create elements, that's why it's possible to change it per element there.
-
And you have no errors? Because that's not possible, outputChatBox( getPlayerName(killer) " get 10000", killer) is wrong. There should be .. between the getPlayerName and the string. Also, where is Musuh defined?
-
So youre saying that whenever you edit the setting in admin it doesnt change it but creates a new one instead? Thats really strange and it looks like the bug is in admin. Try changing the resource name so that it doesnt contain a dash (-) character.
-
You're telling us that you're not using leaked scripts. Well it looks like you do.. the Scripting section is filled with your topics and it looks like you have some resource (or a set of resources) that doesn't work and you just keep posting topics asking us to fix bits of these resources and hoping that you can somehow put it together and that it will eventually work. That's just awful and this section is not intended for this.
-
Well it's simple: the 'heroes' page isn't working. The page itself is but when you try to donate PayPal will tell you this: So yeah... fix it please.
-
There's no need to use that resource, just use TEA, it will do the job. I think i've answered your question, that is how to protect files. You should try and experiment around yourself with what i gave you, if you expect me to post a full code here that you'll just copy and paste then you're wrong and you'll never learn.
-
Right, now i understand. The easiest way would probably be to edit the image itself to make it a full crosshair or just find a different one on the internet, i'm sure you'll find some. The other (not so simple) way would be to draw the image twice, with the second one rotated. Something like this: dxDrawImage(screenX1-(size/2), screenY1-(size/2), size, size, "outras/trgt.png", 0,0,0, tocolor(255,255,255,255)) dxDrawImage(screenX1, screenY1, size, size, "outras/trgt.png", 180,-(size/2),-(size/2), tocolor(255,255,255,255)) --Something like that, it will be off but i'm just showing that it is possible, but it's better to go for a full crosshair image.
-
It should be scaled down and still show the full image, just smaller. It's strange, it looks like a whole different image altogether. Are you sure that you have the right image in dxDrawImage?
-
I don't know what you're saying but it would look something like this: Server: local file = fileOpen("file.dff") --Open the file you want local data = fileRead(file, fileGetSize(file)) --Get the data in it fileClose(file) --Don't need it anymore data = teaEncode(data, "secret") --Encrypt the data with the passkey "secret" if fileExists("protected/file.dff") then --Check if it's there already fileDelete("protected/file.dff") --If so, delete it end local newFile = fileCreate("protected/file.dff") --Create a new one in 'protected' directory (so the names don't collide) fileWrite(newFile, data) --Write the encrypted data fileClose(newFile) --Save & close You would have to restart the resource after the encryption so that the HTTP cache is updated and players download the new ecrypted versions. Client: local file = fileOpen("protected/file.dff") --open the encrypted file local data = fileRead(file, fileGetSize(file)) --Read the encrypted data fileClose(file) data = teaDecode(data, "secret") --Decrypt the data using the "secret" passkey local dff = engineLoadDFF(data) --Load the DFF data --Do your stuff here.. Now in meta: <meta> <!-- Your scripts and stuff --> <file src="protected/file.dff"> </meta> Don't put in the original files. And of course, if it's not just a single file then rework it into a loop, this is just an example.
-
As the name suggests, loadstring takes a string. So the way to do it would be loadstring("input()") Why would you even want to do it this way? It makes no sense, just call input() directly. Or you could use call.
-
Well you would get the contents of the .dff using fileRead and then pass that to teaEncode, teaEncode has 2 arguments, that is data to encrypt and a key. You choose whatever key you want, it's like a password. Then on the client you use the same key to decrypt the data. Do you understand? Im on a phone atm so i cant really write actual code.
-
I dont quite fully understand you but i guess you want a way of 'protecting' your model files, right? In that case just encrypt them using teaEncode and then on the client decrypt them and pass the decrypted data to engineLoadDFF and so on..
-
Problem with external url in fetchRemote (#1006)
MIKI785 replied to Misha_Konsta's topic in Scripting
Not really, error number 1006 is not a curl error, its added by mta and the only use for it is client sided when trying to connect anywhere that is not the same IP as the server youre connected to. So are you sure that youre running that code on the server?