-
Posts
6,063 -
Joined
-
Last visited
-
Days Won
209
Everything posted by IIYAMA
-
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.
-
addCommandHandler('csw', function (player,CMD,Weather) Weather = tonumber(Weather) if Weather then setWeather(Weather) --local Weather = getWeather () outputChatBox("The weather is currently: "..Weather, player) end end)
-
Are you color blind? Because wiki says the color is orange. While you turned in to red.
-
loss == 50 loss Those are parameters of the event, you can't change values of parameters inside the ( ). You have to do that after that. local playerDamage_text = function ( attacker, weapon, bodypart, loss ) if bodypart == 9 then local health = getElementHealth(source)+loss-- get the health of the past. local newHealth = health - 50--get the new health if newHealth > 0 then setElementHealth(source,newHealth) else killPed(source, attacker, weapon, bodypart) end outputChatBox ( "Headshot!", source, 255, 170, 0 ) end end addEventHandler ( "onPlayerDamage", root, playerDamage_text )
-
Enable this: https://wiki.multitheftauto.com/wiki/Dx ... entEnabled In the dxDrawPartialCircle function block.
-
by spread over more files. Or check this out: https://wiki.multitheftauto.com/wiki/SaveMapData
-
YOU ARE BAD, HA! @spAik cheers for 1.4 when it comes out! local Files = { ":admin3R/client/images/warning.png",--1 ":admin3R/client/images/error.png",--2 ":admin3R/client/images/question.png",--3 ":admin3R/client/images/info.png",--4.... ":admin3R/client/images/dot.png", ":admin3R/client/images/search.png", ":admin3R/client/images/dropdown.png", ":admin3R/client/images/colorscheme.png", ":admin3R/client/images/empty.png", ":admin3R/client/colorpicker/sv.png", ":admin3R/client/colorpicker/cursor.png", ":admin3R/client/colorpicker/blank.png", ":admin3R/client/colorpicker/h.png" } local downloadIndex = 1 local downloadTimer local downLoadFilesInTime = function() local result = false repeat local file = Files[downloadIndex] if file and not fileExists(file) then result = downloadFile(file) -- downloading ? true/false end downloadIndex = downloadIndex+1 -- count up 1,2,3,4..... until result or downloadIndex > #Files -- if those conditions are true, it will stop looping. if downloadIndex > #Files and isTimer(downloadTimer) then killTimer(downloadTimer) end end local downloadFiles = function () downloadTimer = setTimer(downLoadFilesInTime,1000,#Files)-- a timer for downloading end addEventHandler("onClientResourceStart", root, downloadFiles) addEventHandler("onClientFileDownloadComplete", root, downloadFiles)
-
Don't be sad. They just gave you everything you need and it is still not good enough for you, what a shame. Anyway there is copyright on that script, you should not post copyright scripts on this forum. Or didn't you noticed that?
-
2 days have past, not a week, stupid the drama. If nothing happens then you did it incorrect. An infinity loop can't be infinity when you break it, by putting a statement on it. Also heard of the isElement function? If you like warnings/errors, then use it not. https://wiki.multitheftauto.com/wiki/IsElement