-
Posts
6,097 -
Joined
-
Last visited
-
Days Won
218
Everything posted by IIYAMA
-
Your table is a little bit strange? is "Button" also a table? local Buttons = { Button[1],Button[2],Button[3],Button[4],Button[5] } for i=1, 5,1 do Buttons[i]= Button[i] end
-
RESOURCE Uitpakken met winrar en inpakken met winrar als zip. (ff in google opzoeken "winrar") heh? en anders pak die DayZ en superheroes eens uit?..... Geen idee wat spec is, waarschijnlijk gewoon een anderen resource. ACL
-
How to give a random camera when a player connect????
IIYAMA replied to Jorgito'Molina's topic in Scripting
@Markeloff Re: How to give a random camera when a player connect???? (title) Hey bro! @ixjf correct as you said you can also write it like this: setCameraMatrix( source,unpack(camera[math.random(#camera)])) -
How to give a random camera when a player connect????
IIYAMA replied to Jorgito'Molina's topic in Scripting
well if you go index a both this range, don't you get some warnings/errors? Ftable = { {1}, {2}, {3} } outputChatBox(Ftable[4]) -- warning/error -
How to give a random camera when a player connect????
IIYAMA replied to Jorgito'Molina's topic in Scripting
Just make it easy for your self. local camera = { {50, 1, 2538.47, 2074.72, 10.67, 1364.53, -1279.62, 13.54}, -- camera 1 {50, 10, 1967.71, 1342.9, 26.63, 2034.47, 1343.02, 20.01 } -- camera 2 } local indexCamera = #camera addEventHandler("onPlayerJoin",root, function () setTimer (function () if isElement (source) then setCameraMatrix( source,unpack(camera[math.random(indexCamera)])) fadeCamera(source, true)--fadecamera end end,3000,1) end) #camera -- table range. {} + {} = 2 math.random() -- can be number 1 t/m table range camera[]-- index the table. {}, {} unpack() -- unpack the data. >50, 1, 2538.47, 2074.72, 10.67, 1364.53, -1279.62, 13.54< -
By using factors, you have to keep in mind that there are differed aspect ratio's. (16:9)_(16:10)_(15:9)_(4:3) The best quality is making it at 1920x1080. But I will recommend to create the picture at 1024 x 768, to reduce the file size. local x,y = guiGetScreenSize () local factor = x / 1024 local newY = y*factor addEventHandler("onClientRender", getRootElement(), function () dxDrawImage ( 0, 0, x, newY, '___.png') end) The picture will be bigger then the screen, but it won't be pressed together. @EstrategiaGTA Froze me? (chaos.de)
-
O_O whops.... thank you, my fail
-
Even if I write it like this: local A= 0x000010 it will lose it's correct value.
-
I have a problem with manage flags. After I store them in a table they got changed to a number and I can't use them any more. Even if I change them to a string, I also have to change them back to a number to use them again. addEventHandler( "onResourceStart", resourceRoot, function () flagSetInData(33,1,0x000010) end) local flagState = {"pro","std","poor"} function flagSetInData(weapon,state,flag) setWeaponProperty(weapon,flagState[state],flag) end
-
server call(getResourceFromName("scoreboard"), "addScoreboardColumn", "hunters") Well as far I know(not sure) the scoreboard requires an element, like a player, team, car... https://wiki.multitheftauto.com/wiki/Element you have to use ElementData: (client or server) setElementData ( element, "hunters", hunters )
-
Well there is something called: https://wiki.multitheftauto.com/wiki/On ... odelChange server local hunters = 0 addEventHandler("onElementModelChange", root, function (old,newmodel) if newmodel == 425 then hunters = hunters +1 outputChatBox("There are: " .. hunters .. " active!") end end) NOTE: Source The source of this event is the element that changed its model
-
indeed, protected is working fine for me.
-
yes, it is very strange bug. I have that kind of problems all the time You add it like this: (I only know it works for windows servers ) I think when these other systems are up-todate they probably will work, but I haven't tried yet. More info: viewtopic.php?f=108&t=29990&start=30
-
For the race gamemode? as far I can see this leads to the race resource: race/race_server.lua and not to the statsdm resource.
-
There is no such thing, you are confusing with the server's configuration file. @ixjf ye? well it is already working for windows servers, I don't know how far it is with a Linux servers. If you don't believe me, go try it your self .... and ........! Script needs admins rights,
-
Are the client scripts protected in the meta? protect="true"
-
What is a "zone lua file"? You can just control c and control v from folder to folder. and edit the meta file so the file do exist in this new resource. (mind server and client)
-
Well it can have many reasons, but to find the right reason: - admin - /debugscript 3 - start source.....
-
as I said I don't know what is wrong with it, I can't test it at the moment... Tell me what the string out puts by the 3e time. local FPSLimit = 100 local FPSMax = 1 addCommandHandler("myfps", function ( ) if not guiFPSLabel then FPSLimit = 255 / FPSLimit guiFPSLabel = guiCreateLabel ( 0.03, 0.97, 0.1, 0.1, "FPS: 0", true ) FPSCalc = 0 FPSTime = getTickCount() + 1000 addEventHandler ( "onClientRender", root, onClientRender ) outputDebugString ("label created") else guiSetText ( guiFPSLabel, "" ) destroyElement(guiFPSLabel) guiFPSLabel = nil removeEventHandler ( "onClientRender", root, onClientRender ) outputDebugString ("label destroyed") end end) function onClientRender ( ) if ( getTickCount() < FPSTime ) then FPSCalc = FPSCalc + 1 else if ( FPSCalc > FPSMax ) then FPSLimit = 255 / FPSCalc FPSMax = FPSCalc end guiSetText ( guiFPSLabel, "FPS: "..FPSCalc.." Max: "..FPSMax ) guiLabelSetColor ( guiFPSLabel, 255 - math.ceil ( FPSCalc * FPSLimit ), math.ceil ( FPSCalc * FPSLimit ), 0 ) FPSCalc = 0 FPSTime = getTickCount() + 1000 end end Updated at 14:25. (germany/Netherlands timezone)
-
whops sorry, removeEventHandler ( "onClientRender", root, onClientRender )
-
1: login as admin 2: /debugscript 3 local A = 1 if A == 1 then outputDebugString ("A is 1") else outputDebugString ("A isn't 1") end This kind of string has been designed to output information, so your chat won't be spammed with debug information. This is how I check my scripts when they don't work and I can't find the problem. A == 1000 if A > 10 then outputDebugString ("A is higher then 10") if A > 100 then outputDebugString ("A is higher then 100") if A > 300 then outputDebugString ("A is higher then 300") if A > 1000 then outputDebugString ("A is higher then 1000") end end end end outputDebugString ("A is this value:" .. A ) -- check how big a value is.
-
I don't see the error or what might go wrong. Probably something in the calculation. You should start debug your script. outputDebugString()
