Jump to content

~DarkRacer~

Members
  • Posts

    130
  • Joined

  • Last visited

Everything posted by ~DarkRacer~

  1. ~DarkRacer~

    Question

    Is there a function or custom function that makes the player like a ghost.. i mean not walk through walls but only walk through players.
  2. unfortunately i will not going to compare the data i will actually retrieve them but yes the decoder idea is great.. i will work on my own one. and as for the xml file that i was talking about.. i found a way to do it, here is my code: if not fileExists("@userdata.xml") then local file = fileCreate("@userdata.xml") fileWrite(file, '') fileClose(file) end local xml = xmlLoadFile("@userdata.xml") local rememberData = {} for i,node in pairs(xmlNodeGetChildren(xml))do rememberData[xmlNodeGetName(node)] = xmlNodeGetValue(node) end xmlUnloadFile(xml) local acc = rememberData.acc or '' local pass = rememberData.pass or '' guiSetText(usernameEdit, acc) guiSetText(passwordEdit, pass) Thank you all
  3. I tried it on my mysql database and it works but what if the player have more than one account? my method was to get userdata from user's serial, so i decided to make it as a local xml file in this format: <userdata> <acc></acc> <pass></pass> </userdata> with the possibility of no one to see this file, how would i do that?
  4. ~DarkRacer~

    help xml

    Can someone explain to me how can i create a protected xml file to use it to store player's username and password, i know how to create an xml file its obvious, but i want to make it hidden so no one can see its content on the client's pc.
  5. your code prevent the player from doing the action but it still getting damage!
  6. Thanks you now i get it. but the thing is .. the source get damaged and cancelEvent() has no effect. what's the solution for that?
  7. as for the report.. (EDIT : NVM) and as for the solution.. i don't understand, i'll be glad if you make it more clear for me and thank you.
  8. Never, its working fine but if the attacker's weapon is spraycan it doesn't trigger. Edit: Please try it on your local server and tell my the result cause i test it on my brother's pc and still the same.
  9. onClientPlayerDamage doesn't get triggered if the weapon was a spraycan! it was working fine but suddenly it became untriggerable for the spraycan weapon... i tried it on other weapons and it works but on spraycan it won't work. addEventHandler('onClientPlayerDamage', getRootElement(), function(attacker, weapon, bodypart ,loss) outputChatBox('1') end ) is this a MTA bug or what? please try it on your local server and tell me the result.. because my mind will explode soon !
  10. Next time, you will provide the screenshot earlier, you won't cut part of the code involved in your problem and you won't say the priority isnt working when it's obviously working. Thanks. Dude, chill! it wasn't working and you know that, and why would i post this topic if its "obviously working"? i didn't lie .. the set priority function wasn't doing any effect on the column that what i meant with not working !. And Yes i will cut the code that involved to my problem, what do you expect ? to show you my whole 1265 lines of my gamemode's main server script?. Thanks to all of you, again.
  11. i have a question, is there a way to change the width of the name column? i took a look inside the resource script but its just too complicated i couldn't find that part.
  12. Try removing a priority at job like exports['scoreboard']:scoreboardAddColumn( "job" , getRootElement() , 20, "job") Worked .. Thanks! i removed all the priorities of the columns except for the id column, i set it to 1. here is the code: exports['scoreboard']:scoreboardSetColumnPriority( "name" , 2 , root ) exports['scoreboard']:scoreboardAddColumn( "id" , root , 20, "id", 1 ) exports['scoreboard']:scoreboardAddColumn( "job", getRootElement() , 70 , "job" ) -- other columns that i don't wanna show...
  13. i tried your way (upper-casing the first letter) but it didn't work. result is the same as my previous post
  14. So it basically mean you can't put it before the name column. You will have to modify the scoreboard resource to be able to support such modification or just to add directly the id column directly in the render function using the name column as example. I'll give it a look later and do a fork of this script to support this. well take a look at this: here is the code: --server exports['scoreboard']:scoreboardSetColumnPriority( "name" , 2 , getRootElement() ) exports['scoreboard']:scoreboardAddColumn( "id" , getRootElement() , 20, "id" , 1 ) exports['scoreboard']:scoreboardAddColumn( "job" , getRootElement() , 20, "job" , 3 ) i took a look at the scoreboard_client.lua script but i couldn't find the part that defines the priority of the name column.. i think i should just add the id column directly as you said to the script, i will try that out.
  15. You can also cancel the onClientPlayerDamage event with the same result. onClientPedChoke never triggers on player.. addEventHandler('onClientPedChoke' , getRootElement() , function(wep) --outputChatBox(wep) if ( wep == 41 ) then cancelEvent() end end ) and cancelEvent() doesn't work on onClientPlayerWeaponFire and onPlayerDamage but it actually works on onClientPlayerDamage and it prevent player from shocking though. Thanks!
  16. hey everyone, i'm making a script for medics and its working fine but there is one bug.. when i start to heal a player .. the player acts like shocking from the spraycan. how can i stop that? i tried canceling the event but nothing.. i'm using onClientPlayerWeaponFire event and i also tried onPlayerDamage
  17. Its optional and it didnt work
  18. hey everyone, i want to make an ID column in the scoreboard but the problem is that i want it to be before the 'name' column so i tried some of the functions that are already exist with the scoreboard mod but none worked.. here is the code: -- server exports['scoreboard']:scoreboardSetColumnPriority( "name" , 2 ) exports['scoreboard']:scoreboardAddColumn( "id" , getRootElement() , 20, "id" , 1 ) and no errors..
  19. I love you Do you mean this ? But it moving,You can change the images and the model Not really
  20. as the title says, how can i replace textures using shaders? i've got some model names from engineGetModelNameFromID and i want to replace them with pictures that i have. (Models such as radar, crosshair, etc..) i have this code which i don't know what it does... : texture Tex0; technique simple { pass P0 { Texture[0] = Tex0; ColorOp[0] = SelectArg1; ColorArg1[0] = Texture; AlphaOp[0] = SelectArg1; AlphaArg1[0] = Texture; ColorOp[1] = Disable; AlphaOp[1] = Disable; } }
  21. ~DarkRacer~

    Help me

    /debugscript 3 ??
  22. This is an example, try it: local sx,sy = guiGetScreenSize() local x = 0 addEventHandler("onClientRender",root, function() x = x + 1 dxDrawText("Current Map: BLA BLA", x,10,sw,30) end ) you can change the positions of the text ..
×
×
  • Create New...