Jump to content

IIYAMA

Moderators
  • Posts

    6,097
  • Joined

  • Last visited

  • Days Won

    218

Everything posted by IIYAMA

  1. IIYAMA

    Custom Mute

    Well the break should be there after it found it's target. Only you have out it in the wrong block. Should be in the 4th block. function () --block 1 if --block 2 for .... loop... --block 3 if true then -- fount target condition... --block 4 break end end end end
  2. It's possible. Not with MTA Functions, but with LUA functions. Lua functions can't do anything with object's except saving their userdata's, nothing more nothing less. While MTA functions, can change things ingame..... Pls don't talk crap.
  3. IIYAMA

    Custom Mute

    why don't you output both the names and find your problem... Those bugs can be found when you are debugging, when you don't do that it will cost 10 times more time to find it.
  4. if you debug your script for every step you take, you hardly can make mistakes. It is learning from your mistakes, retry, debug again till you got the problem. You can't fix a problem caused by a problem when you don't see it.
  5. well debug it..... > outputChatBox That is the best way to solve it.
  6. local tex, mod = getPedClothes(player, tonumber(clothesType))
  7. You forgot to convert world position to screenposition. https://wiki.multitheftauto.com/wiki/Ge ... ldPosition
  8. Also: local cars = { {602}, {600}, {587}, {603}, -- etc --Too: local cars = { 602, 600, 587, 603, --ect
  9. function saveSkin(player,clothesType) local account = getPlayerAccount(player) if not isGuestAccount(account) and getElementModel(player) == 0 and clothesType then for i, data in ipairs(playerDataTable) do local tex, mod = getPedClothes(player, clothesType) if tex and mod then setAccountData(account, data, tex..",".. mod .. "," .. clothesType) --outputChatBox("saved #"..i..": "..getAccountData(account, data[1])) else outputChatBox("no tex and mod") end end end end addCommandHandler("s", saveSkin) /s 0 function loadSkin(player) local account = getPlayerAccount(player) if not isGuestAccount(account) and getElementModel(player) == 0 then for i, data in ipairs(playerDataTable) do local clothing = getAccountData(account, data) if clothing then local table = split(clothing,",") if table then outputChatBox(tostring(table[1]) .. " " .. tostring(table[2]) .. " " .. tostring(table[3])) addPedClothes (player,table[1] , table[2],tonumber(table[3])) end end --outputChatBox("saved #"..i..": "..getAccountData(account, data[1])) end end end addCommandHandler("x", loadSkin) Well debug it. Sorry (can't use tabs because I am running mac at the moment)
  10. Your skin is 0 ? (because it is only working with cj.
  11. ok, sorry, my bad. Did my changes made progress?
  12. It is useless to index a table inside a table with just 1 item and that multiply by all items. So yes, you better rewrite the table. Next to that you must know what you are doing. But it seems you are only editing other people their property. Sorry, but I am not going to edit other players their scripts without permission of the owner...........
  13. local playerDataTable = { {"torso"} } --too: local playerDataTable = { "torso"--, --"stuff" } setAccountData(account, data[1], "\""..tex.."\",\""..mod.."\"") --Too: setAccountData(account, data, tex..",".. mod .. "," .. clothesType) addPedClothes (player, getAccountData(account, data[1]), 0) --Too: local clothing = getAccountData(account, data) if clothing and getElementModel(player) == 0 then local table = split(clothing,",") addPedClothes (player,table[1] , table[2],tonumber(table[3])) end And don't forget this function: isGuestAccount
  14. Works wonderful against lagg. (especially disable haze heat) setBlurLevel(0) setHeatHaze (0) Your problem > Edit the shader.....
  15. this is removing it: testtable[name.. index]=nil table.remove Removes the variable from the array position, so the array stays clean from empty places. myTestTable={"a","b","c","d"} --is the same as: myTestTable={ [1]="a", [2]="b", [3]="c", [4]="d"} myTestTable={ [1]="a",-- [1] array location 1 [2]="b", [3]="c", [4]="d"}-- [4] array location 4 table.remove(myTestTable,2) --result: myTestTable={ [1]="a", [2]="c", [3]="d"} Since you don't have a clear array based on numbers, you can't use table.remove. Or you have to do it like this: function RemoveFromTable( name ) if testtable[name] then testtable[name] = nil end end function RemoveVariableFromTable( name,variable ) local table = testtable[name] if table then for i=1,#table do if table[i]== variable then table.remove(table,i) break end end end end function ADDtoTable( name,variable ) local table = testtable[name] if table then table[#table+1]=variable else testtable[name] = { variable } end end
  16. I don't know why sometimes the ped collisions are still active when they are already dead. But you can try this to prevent the wall... client https://wiki.multitheftauto.com/wiki/On ... eCollision server setElementVelocity and find a paid scripter.......
  17. https://wiki.multitheftauto.com/wiki/CreateProjectile Read the page careful, especially the sync part.
  18. wrong section, that is scripting related.
  19. You mean removing it? local index = 1 while true do if testtable[name.. index] then testtable[name.. index]=nil else break end end Same way. But this is better and faster. function RemoveFromTable( name ) if testtable[name] then testtable[name] = nil end end function RemoveVariableFromTable( name,variable ) local table = testtable[name] if table then for i=1,#table do if table[i]== variable then table.remove(table,i) break end end end end function ADDtoTable( name,variable ) local table = testtable[name] if table then table[#table+1]=variable else testtable[name] = { variable } end end
  20. local index = 1 while true do if not testtable[name.. index] then testtable[name.. index]=variable break end end
  21. by toggle the control state to false after firing.
  22. This one can: 0x000400 - fires every frame within loop (ie paint spray) Except it also brings some problems with it. Good luck!
  23. Well you need to know those arguments, before you can show anything. > title, logo, content That will be send from serverside. (this is clientside)
  24. indeed Tables are the most secure way to save your data. Also if you stop sharing elementdata, (by put the last argument on false) cheaters won't know the elementdata key's.
  25. Because only the server knows what the parameters are: title, logo,content. Btw did you asked the owner if you are allow to edit his script? @Anubhav First read the code careful and then your conclusion. > guiCreateStaticImage, this is a gui image.
×
×
  • Create New...