- 
                Posts1,390
- 
                Joined
- 
                Last visited
- 
                Days Won1
Everything posted by Et-win
- 
	local functionToDo = 1 function theFunction() if (functionToDo == 1) then functionToDo = 2 --Do stuff elseif (functionToDo == 2) then functionToDo = 1 --Do stuff end end bindKey("F6", "down", theFunction) Just use some variables.
- 
	Oops, I never remember them (English )
- 
	math.floor --Highest math.ceil --Lowest
- 
	I think that is because of 'setVehicleLocked'. Try this: function onEnter(thePlayer) if (getElementModel(thePlayer) ~= 29) then cancelEvent() outputChatBox("Test1", thePlayer) end end addEventHandler("onVehicleStartEnter", getRootElement(), onEnter)
- 
	Yup. function cars () c1 = createVehicle ( 602, 2284.399, -1114.599, 37.700, 0, 0, 90 ) end addEventHandler ( "onResourceStart", resourceRoot, cars ) function lock () if getElementModel ( source ) == 29 then setVehicleLocked ( c1, false ) else setVehicleLocked ( c1, true ) removePedFromVehicle ( source ) outputChatBox ("This vehicle is locked on team: Avenged Sevenfold!", source) end end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), lock) You had 'thePlayer' here, while it had to be 'source': if getElementModel ( thePlayer ) == 29 then
- 
	It's "font.ttf" not "font.tff"
- 
	function getTable() local theTable = { [1]=getElementData(player, "Bungee"), [2]=getPlayerMoney(player), [3]=getElementDimension(player), -- ... } return theTable end local gTable = getTable() for k=1, #gTable do setAccountData(account, "data."..tostring(k), gTable[k]) end --Or: for tableIndex, tableValue in pairs(getTable()) do setAccountData(account, "data."..tostring(tableIndex), tableValue) end
- 
	Why don't you just do: local theCuboid = createColCuboid( fx, fy, fz, 5, 1, 1 ) ?
- 
	local theCuboid = createColCuboid( x, y, z, 5, 1, 1 ) Did this not return 'false'?
- 
	Don't give the function/table the same name as the table/function. Also, did you trigger the table to client?
- 
	I always use debugscript 3, there were no bugs, nor my script was wrong. And if you say it was, what will explain it worked after only adding 'outputChatBox' and also 3 others confirmed this in the start of the topic?
- 
	I was either changing or adding stuff to my Clan War System. (Just changing the current script, not adding or removing, just editing.) 'outputChatBox' has indeed nothing to do with this, but I restarted my script 2 times when it didn't do it's job because I was sure it should work. Then I added 'outputChatBox' to see where it stopped working, and suddently it did work after the restart. Everything before the little change did work, but my changed thing didn't, only after what I just said. This is why I think that it doesn't always refresh the script when restarting it. I'm using my local server and never had problems with this before. About /refreshall: It takes too long to constantly do this when you are just adding like 1~5 lines and have to test or it works. Currently using what Bonsai says: /stop and /start (On a bind, just like /restart). I will move on to and try /refreshall if I don't had any problems tomorrow.
- 
	I can't specific tell you when it happens. It happens randomly. It can't be my script(s), because like I said in my first post, I only added 'outputChatBox' to the script, restarted it again and suddently it worked. I never had this though on earlier versions.
- 
	In MTA 1.0.5 and up until MTA 1.4, /restart did restart + refresh the resource. And also now it does, but very sometimes, it doesn't. I'm talking about a resource where I'm currently scripting in, not adding a new resource.
- 
	Using those two commands on binds now atm, didn't see anything yet but it only happens rarely. Still, I reported this because it's not very normal.
- 
	local peds = getElementHealth (ped1)
- 
	Happened server-side to me. And if you mean Streaming memory: is min.
- 
	Add the resource to the Admin group, or only give it 'addAccount' rights. (function.addAccount)
- 
	Change event 'onMarkerHit' to 'onPlayerMarkerHit'. Then, change all 'thePlayer''s to 'source'.
- 
	Hello people, I just have a question. Do you guys have the same problem as me, that if you are scripting and your script just is correct, but it doesn't work and after changing 1 thing in the script (e.g: Putting outputChatBox in the script to check where the script stops) and that it suddently works after that, while you didn't change anything? (And yes, I did refresh and restart the script(s)) I had this several times, but I don't know or it's MTA 1.4 or just my laptop (Since I had more problems with it, lol.)?
- 
	In Notepad++ the numbers are blue, which I already thought it was strange. Maybe it's reserved for XML, but I'm totally not sure.

 
        