-
Posts
6,097 -
Joined
-
Last visited
-
Days Won
218
Everything posted by IIYAMA
-
It does not wrap to a new line =( local message = "bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla" dxDrawText(message, screenx/2, screeny/2, 300, 300, tocolor(50, 50, 50, 255), 0.5, smallarial, "left", "top", false, true, false) I had the same problem in one of my scripts. It seems it doesn't work afaik.
-
ah, thank you very much again.
-
Thank you very much, I am not very good with string formats.
-
local theString = tostring(2) if string.len(theString) == 1 then theString = 0 .. theString end print(theString) Does anybody knows how to do this shorter? So if there is one character, it will have a zero at front. So: 01 02 03 04 05 06 07 08 09 10-- 2 characters. 11 12 etc.
-
Yup/(correct), The variable "Timer" received it's value after the setTimer function has returned it's result. Which means the code inside of the function has been loaded before the returning and the Timer variable doesn't exist till then.
-
Just don't give (compiled) scripts admin, then you will be save for your own admin powers. Only when you trust them for 100%.
-
Hij wil het ook niet, dit is alleen maar bedelen.
-
You sure it is a player and not a ped?
-
Probably because code doesn't get executed or you empty the combobox directy. Must be working otherwise.
-
Try this: local messageData local infoboxHandler = false local infobox = function () dxDrawRectangle(0, 0, 1366, 145, tocolor(0, 0, 0, 119), true) dxDrawText("It says:"..messageData["text"].."", 0, 0, 1366, 145, tocolor(messageData["R"], messageData["G"], messageData["B"], 255), messageData["size"], "bankgothic", "left", "top", false, false, true, false, false) end local destroyInfobox = function () removeEventHandler("onClientRender",root,infobox) infoboxHandler = false end addEvent("infobox",true) addEventHandler("infobox",root, function ( messageData2) messageData = messageData2 if not infoboxHandler then addEventHandler("onClientRender",root,infobox) setTimer(destroyInfobox,3000,1) infoboxHandler = true end end) local messageData = { ["text"]="Hey there!", ["R"]=150, ["G"]=150, ["B"]=150, ["size"]=2 } triggerClientEvent(source,"infobox",root,messageData)
-
start playing = spawn? -- onClientPlayerSpawn or start playing = download is done? -- onClientResourceStart You aren't very clear. addEventHandler("onClientRender",root, functionName) removeEventHandler("onClientRender",root, functionName)
-
why don't you show the login later? Or are you talking about the moment they are downloading the code?
-
Joins the server? Your solution. addEventHandler("onClientResourceStart",resourceRoot, function() -- do your gui stuff. end)
-
It doesn't work, because it doesn't exist, as simple as that. There is only onPlayerLogin at serverside. And why there is no "onClientPlayerLogin" event, that is because registrations will only be done at a place where a database is located. (a place where you save user-names and passwords) All client events: https://wiki.multitheftauto.com/wiki/Cl ... _Functions All server events: https://wiki.multitheftauto.com/wiki/Se ... _Functions
-
ah you are further then I thought, GOOD Check this out man: https://wiki.multitheftauto.com/wiki/Ge ... ldPosition World positions aren't the same as the screen resolution, this function will convert that. This function can also return false(when the x,y,z aren't on screen), keep that in mind. Check the returned values.
-
https://wiki.multitheftauto.com/wiki/OnClientRender and learn lua... or you come nowhere. http://www.lua.org/manual/5.2/
-
No, there are always people who are able to do the impossible. But it is a very safe way. Not much people know how to packet sniffing the network. (getting the data from the network before it is in the ram) So +compile your scripts too, before sending it to your vps, not only players are interested in your scripts. Also your staff or friends may are too, which have access to your scripts as well.(I am not going to tell you how, but it is possible)
-
https://wiki.multitheftauto.com/wiki/DxDrawText [b]FROM VERSION 1.3.5 r6054 ONWARDS[/b] fRotation: Rotation fRotationCenterX: Rotation Origin X fRotationCenterY: Rotation Origin Y
-
This is exactly the worse thing you can do. So you can just post somebody his code, here on the forum without asking? He(owner) is probably not really happy about it, also the scripters who edited the code, will not be happy when they noticed that they are illegally editing others people their code on a community forum. You should always write down the owner of the code down, so the people will know from who they are editing the code. The best you can do is contact the owner it self and ask him if you have rights for that. You have much to learn about copy right ⓒ.
-
All scripts will be saved in your ram, but also write down to your hard-drive so you don't have to download it again. When you take the second one away, it is still in your ram which is required for using it. ram = your memory, those sticks in your motherboard.
-
I don't believe this is your code because: - You don't use lua tags. (scripters would use it) - You don't show us the exact error. (line number, from this code) - It looks like you don't know what this error means. - And you don't debug your code, which is the worse.
-
Your code is serverside right? MIKI785 is talking about this. For addCommandHandler: Server player playerSource, string commandName, [string arg1, string arg2, ...] Client string commandName, [string arg1, string arg2, ...] Make sure your code is serverside in the meta.
-
The math is correct, the ratio isn't, which will be fixed with this function.
