-
Posts
6,062 -
Joined
-
Last visited
-
Days Won
208
Everything posted by IIYAMA
-
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()
-
function onClientResourceStart ( resource ) if ( guiFPSLabel == nil ) 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 ) else guiSetText ( guiFPSLabel, nil ) destroyElement(guiFPSLabel) guiFPSLabel = nil --? removeEventHandler ( "onClientRender", root, onClientRender ) -- you have to remove it before you can handle it again. end end addCommandHandler("myfps", onClientResourceStart)
-
Even when you use this: setSkyGradient ( 255, 255 ,255, 255, 255 ,255 ) (/start runcode) /run setSkyGradient ( 255, 255 ,255, 255, 255 ,255 ) ?
-
ok, well I set the teargas animations now on server side. I am using at the moment something else: getElementsWithinColShape (colshape,"player") after that I start checking the distance of the true elements. I am not sure if this is a better way. I even prefer to share it with you, your idea's gave me a reason to design a deathmatch gamemode. Without that script, I would not even started to build it. https://www.youtube.com/watch?v=IKXARD3__4s&feature=youtu.be Do you have an email I can sent it to? (pm me) I also added something interesting for manage the projectile's syncs.
-
the numbers are from 0 t/m 255 10 = almost black. try: addEventHandler ( "onResourceStart", resourceRoot, function ( ) local weather = getWeather ( ) if weather == 9 then -- you don't have to use "()" when they aren't needed. setSkyGradient ( 0, 0 ,0, 200, 200 ,200 ) else resetSkyGradient ( ) end end) --You need to use " ()" at moments like this: 100*(100+1) = A -- 100+1 = 101 *100 = 10100 -- When you write it without "()" 100*100+1 = A --100*100 =10000 + 1 = 10001 () is always the first thing you do.
-
Well it is still unclear as hell for me.... What must happen? What must be Prevented? 1. 2. 3.
-
Well first check which value gives this boolean(true/false).... I can't help you, if I can't even see the line that went wrong. After that you should trace this value and find the creation of it.
-
You can see this error as: if 1 == true then -- error Probably one of your export data isn't a number. Maybe: --local weapon = false local weapon = 0 --? As far the syntax, when you don't fill in, it starts at 0. element spawnBot ( float x, float y, float z, int rotation = 0, [ int skinID = 0, int interior = 0, int dimension = 0, team theTeam = nil, int weapon = 0, string theMode = "hunting", element theModesubject = nil ] )
-
I don't get it. State? You mean they get forced to stand still and they aren't on the ground when you kill them? or you mean stop the kill when they kill each other and only the one who dies as last won't die? Well spawn the player instead of reset the health. (spawnPlayer)
-
What will happen when you spawn him and set him to another dimension? Well then you should try camera matrix, and that also means you have to create your own camera system. Btw: if --[[getElementHealth ( killer ) < 200 and]] getElementHealth ( killer ) > 1 then -- why check a player health a both the 200? max is 200, can't be higher.
-
Prevent: syntax server: setCameraTarget ( player thePlayer [, element target = nil ] ) setCameraTarget (source) (source is player that died) You should read the wiki page better. https://wiki.multitheftauto.com/wiki/OnPlayerWasted