Jump to content

IIYAMA

Moderators
  • Posts

    6,062
  • Joined

  • Last visited

  • Days Won

    208

Everything posted by IIYAMA

  1. I won't recommend Element data, it is laggy. I only use it for slow data.
  2. How do you set a table like that? denny199 0 to 10 = 0 10 to 20 = 1 11 to 15 = 0 etc. etc. I get errors if I call a weapon/number, that does not exist in the table it self. Sample: I ask for 3, but the table is: omfg = {1=[1],2=[2]} -- 3 isn't inside. myonlake Perhaps don't make a table for all weapons if you don't want to change them from zero to anything. Only make a table for the weapons you want to change. How can I check with nil if the number isn't inside? Renkon You can use 'nil', unless I'm wrong
  3. Hello guys, I have a very large table, but the problem is that 70% is "0" WeaponRecoil = {[0]=0,[1]=0,[2]=0,[3]=0,[4]=0,[5]=0..................ETC How can I make sure the table will be small. The numbers that will be something in the table is 0 t/m 47. (btw in some of my tables does have a "0", for sample you have explosion = 0 or unarmed = 0) A guy told me once, that I have to use "var" (remi-x) What is the best way to make a good table?
  4. When I run this resource for real(not start and stop) It will calculate the distance between bullet inpacts that hits cars or ped/players.(only when they hit) The x y z coordinations + attacker + timestamps + mathfloor x y coordinations of the attacker.
  5. How much lagg will a started and stopped resource cause with more than 1400 lines? Because on my pc I have an overkill on (32gb ram), the server does only have 1 gb ram.
  6. Hey I got a question. A friend told me onces that if you start a resource, the code(+ everything else) will be loaded in the RAM memory and it will be out of the RAM untill you stop the whole server? Is this True or False?
  7. Heh? You sure that won't give trouble? People will have to download client and server scripts, don't they? The client script does already have arround 800 lines, the server is 2 times more.
  8. I don't get it, sebbe. >--server export end Let me try. Working 100% thx solidsnake
  9. Almost: --client triggerServerEvent ( "gasmaskexport", player ) outputChatBox(player)-- user data visible --server addEvent ("gasmaskexport", true ) function gasmaskexporter (player) exports.syncro_fixing:gasmaskon(player) end addEventHandler ("gasmaskexport", getRootElement(), gasmaskexporter) Error: --server export end function gasmaskon (player) aPlayerCheck[player]["gasmask"]=true; end ERROR: [ouder_server]\syncro_fixing\syncro_server.lua:1250: attempt to index field '?' ( a nil value) ERROR: call: failed to call 'syncro_fixing:gasmaskon' [string "?"]
  10. I mean: --client triggerServerEvent ( string event, element theElement, [arguments...] ) --1 --server addEvent... --2 addEventHandler etc.. Function .. () exports.syncro_fixing:gasmaskon(player) --3 end --export function
  11. So I have to trigger first the server function in the same folder. then export?
  12. client: exports.syncro_fixing:gasmaskon(player) server: function gasmaskon (player) aPlayerCheck[player]["gasmask"]=true; end
  13. Export from Stealth: (player does exist) exports.syncro_fixing:gasmaskon(player) Other script: <export function="gasmaskon" type="server"/> function gasmaskon (player) aPlayerCheck[player]["gasmask"]=true; end Error: ERROR: call: failed to call 'syncro_fixing:gasmaskon' [string "?"] (both are running/no other errors)
  14. btw what would be better if I do or don't use weapons like 41 or 42? this way: if weapon == 41 or weapon == 42 then tick = getTickCount() if tick - lastShot> 20/getGameSpeed() then lastShot = tick return; end onClientPlayerWeaponFireFunc_CallBack(source, weapon, hitX, hitY, hitZ, hitElement ); else -- now he does not have to calcullate tickcount, but he do have another 2 lines. onClientPlayerWeaponFireFunc_CallBack(source, weapon, hitX, hitY, hitZ, hitElement ); end or if weapon == 41 or weapon == 42 then tick = getTickCount() if tick - lastShot> 20/getGameSpeed() then lastShot = tick return; end end onClientPlayerWeaponFireFunc_CallBack(source, weapon, hitX, hitY, hitZ, hitElement );
  15. like this one? function weaponfire(weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement ) tick = getTickCount() if tick - lastshot > 50/getGameSpeed() then outputChatBox("lol") lastshot = tick return end outputChatBox("works") end addEventHandler ( "onClientPlayerWeaponFire", getLocalPlayer(), weaponfire ) or can it be smaller? Thx for the help
  16. I like to know how to make a script execute with a limit at speed rate. (Best way) See script> Script sample: function weaponfire(weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement ) outputChatBox("etc.") end addEventHandler ( "onClientPlayerWeaponFire", getLocalPlayer(), weaponfire ) If I use a shotgun the outputchatbox does have low speed rate. A spraycan does have a speed rate at client render. See weapon flag 0x000400 - fires every frame within loop (ie paint spray) . How can I make a limit at execute a script? (like a timer etc (lagg)) Thx
  17. IIYAMA

    player syncs

    Hello, I got a question. Distance: This is within 140 units for vehicles and 100 units for peds. I am running a stealth server, but when are player syncs true? A player dies(non spectate): true/false A player dies (spectate others): true/false https://wiki.multitheftauto.com/wiki/SetElementSyncer
  18. Like to know the default? use: https://wiki.multitheftauto.com/wiki/GetWeaponProperty (will change afther set the settings)
  19. 1:Folder check(LOCATION) 2:Meta check 3:map check 4:gamemode check else Map or meta filebroken, when incorrect saving or using bugged gamemode objects. Also older servers can't support new .map. You have to fix it by, fix it in the script it self.
  20. ye, but I did not find the right corner sellection for the... thx
  21. I am not able to report bugs on bugtracker, I am only able to view. So if you are interested or able to test it. When you use the script: setVehicleDamageProof At the moment when you fall with a boat out of the sky on land, your vehicle still got damage. The vehicle wont explode, but the damage is still strange. https://wiki.multitheftauto.com/wiki/Set ... amageProof As far I know this bug isn't reported on bugtracker, I can't find it at all. Also onClientVehicleCollision does not seems to work for boats. I am the only person with this problem? Is this the right place to post this topic, if it isn't I am very sorry. It is a suggestion for a fix.
  22. is this on the bug tracker? or is it impossible to fix? As far I can see it isn't, that probally means it can't be fixed.
  23. nothing is impossible, the frame rate is optimal. Very high and stable fps, but the laggs has nothing to do with my settings. The lagg is a kind of stopmotion effect once in the 10 sec. But the fps does not drop a thing and I am long not the only men on earth who has this. Also fucked up shadows sometimes. see this sample: http://www.tomshardware.co.uk/forum/114 ... -quad-core and much more... Just bad ported that's it and I hope it will be fixed in 5.
  24. you can try this: function texto(texto) outputChatBox ( "Aviso: " .. texto ) end setTimer(texto,3600000,0,"Tienes hambre, come un poco") function startResource() for k,player in ipairs(getAlivePlayers()) local nivel = getElementData (player, "nivel") if nivel == 1 then setElementHealth ( player, getElementHealth ( player ) - 70 ) end setTimer(startResource, 3600000, 1, true) end end addEventHandler("onResourceStart", getResourceRootElement(), startResource) I don't think this is going to work because.... I am to tired to rebuild it
×
×
  • Create New...