• Content count

  • Joined

  • Last visited

Community Reputation

4 Neutral

About Overkillz

  • Rank
  1. Inside the loop if value == "whatever" then -- whatever u want to do return end
  2. Help with custom chat commands

    function yourFunctionName (thePlayer,cmd,argument1,argument2) -- Your Code end addCommandHandler ("mute",yourFunctionName)
  3. Questions about shaders

    Hello dear community, well, today I started to working with shaders and I have 2 questions about them. The first one is how can I modify the following variable float3 colorrgb = float3(255,255,255); with dxSetShaderValue. I tried to use: dxSetShaderValue(myShader, "colorrgb", 255,0,0) but it didn't work. Will give I get problem while using dxSetShaderValue on a render ? Thats all for now. I hope u can bring me a hand. Thanks for reading. Best regards.
  4. Hello dear community. I know that this question could sound so silly but I would like to know what is the max length of setAccountData and setElementData I want to storage several positions x,y,z like 32 times .. I want to storage them in a table and using toJSON thanks and best regards.
  5. Sort Table Problem

    Hello dear community. Im having a simple issue which is annoying me a lot ... Well, Im trying to sort a table like the following one by Player points. However, it doesn't return the ordered from high to lower. It doesn't even order it. simpleTable = { player1 = {points = 25, playerName = "RandomNick1"}, player2 = {points = 1, playerName = "RandomNick2"}, player3 = {points = 13, playerName = "RandomNick3"}, player4 = {points = 27, playerName = "RandomNick4"}, player5 = {points = 7, playerName = "RandomNick5"} } table.sort (simpleTable, function (a, b) return a.points > b.points end) I hope u can bring me a hand with my problem or another way to fix it. Thanks for reading. Regards.
  6. Asking for a vehicle Light function

    Im already aware about that. But first, I want to create a simple light with X size and X colour. I won't attach it to my vehicle. That is a simple thing to do and I will leave it to the end.
  7. Asking for a vehicle Light function

    Well, You gave me a great idea for other thing in a near future, however, this function didn't help me at all. Might I'm executing worngly the following function I tried to create a simple light on my vehicle position with a red colour, however, It didn't work. I tried to change the light type from 1-3 function createTheLight() local theVeh = getPedOccupiedVehicle(localPlayer) if theVeh then local x,y,z = getElementPosition( theVeh ) createLight(2,x,y,z,25,255,0,0,0,0,90,true) outputChatBox("Created Light") end end addCommandHandler("testlight",createTheLight)
  8. Asking for a vehicle Light function

    I see, it work pretty good but, isnt there any other function that only modify tail lights ?
  9. Asking for a vehicle Light function

    Hello dear community, well, Im so dump right now and I have forgotten a new function which was added to MTA some few months ago. It was the possibility to keep the vehicle tail lights ON even if the time in game was too early. I have been several minutes looking for this function at the wiki, sadly, I couldn't find it. Here some screen shots (Open the spoiler) if you don't understand me. As you can see, on the first picture the car is stopped, but on the second one the car is stopping.Thanks for reading
  10. load function from file

    So, there is not any way that I can run those scripts ? Might converting to some format or something ?
  11. teaDecode return

    Yes, I was already aware about doing a trigger but I wanted to avoid that. Luckily I could do it checking if the files was successfully teaDecoded and checking if the variable is a table. Looks like it works pretty good and I don't need to trigger it.
  12. load function from file

    Thanks, I could fix it with the idea that u gave me. Otherwise, is there some problem with load and loadstring to not to laod copile scripts ? I have uploaded a map on my server which has copiled scripts and when I use load or loadstring functions it doesn't load the scripts.
  13. teaDecode return

    Hello guys, well, my question is simple. Im saving a file on the client folder and it is teaEncoded. Well, this fille can be modified by the user writing on it ...etc However, I want to prevent this while it is read. My idea is to get the bool value using teaDecode. However, Im always getting that the file is Ok even if it is modified by the user (In this case me) Im not sure if you understand me. Here is my code function loadMapFromCache(wha) if wha then local pathMap = tostring("asd/dsa/"..wha..".wah") if fileExists(pathMap) then file = fileOpen(pathMap) if file then local fileR = fileRead(file, fileGetSize(file)) fileR = teaDecode( fileR, temporalTeaCode ) fileClose(file) if fileR then outputChatBox("Is Ok") else outputChatBox("Is wrong") end end end end end
  14. load function from file

    Well, I couldn't be online to test the fix that you gave me. I implement it to the code and now looks like it works pretty fine. However, I needed to change the load function to loadstring and u suggested me before. Sadly, It doesn't execute the function. Here you can see the result of it (I added iprint to the loadScript to let you see water.lua | The water colour should be blue) function loadScript(scriptData) iprint(scriptData) hold("Called the loadScript function") local loaded = loadstring(tostring(scriptData)) local ex = pcall(loaded) hold("Called the load function.") if ex then outputChatBox("loaded the code") end end Thanks for helping me. Best regards.
  15. load function from file

    First of all, thanks for bringing me a code which will help me alot in a near future. Well, respecting the code, I tried to test your coroutine function (I have never heard about this function before). Sadly. There is something wrong there. Here you have an screenshot about the problem Thanks for reading. Best regards.