![](https://forum.multitheftauto.com/uploads/set_resources_22/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
myonlake
Members-
Posts
2,312 -
Joined
-
Days Won
41
Everything posted by myonlake
-
Then you might want to give us the link to the PasteBin note with your MTADiag in it.
-
You're welcome, but next time use Google or just go to the GTA mod sites and search...
-
Took me 1 minute to find it via Google -.- http://www.gtagarage.com/mods/show.php?id=6342
-
I was thinking about objects created via createObject, but I don't think it will be functioning with the engine functions at this time. However, you can use the dx-shader functions. My friend made a shader function for his own car only in order to change the texture, all other cars remained original. I can't remember how its done, but hopefully someone has a solution. Edit: Almost as fast as IIYAMA
-
My old Windows Server 2008 R2 ran three servers more stable than it does on this Windows 7. Maybe you should put this to the Mantis Bug Tracker since there is no solution around (yet).
-
Please search before posting. viewtopic.php?f=104&t=31668
-
I made my own attachment script so, that when you drive a vehicle on a marker on a ship and type a command, it will be attached to the marker. The marker is attached to the ship. When you drive, the marker is attached to the ship and the car is still glued to the marker. It's simple.
-
@Shreddy: First of all, if your administrators are like so, I would kick them out the team right away. Secondly, you can make a script that disables banning of certain users, and you can even make it so that when a higher administrator is online, they can't ban anyone. I had that on my server once, but now I don't need it.
-
Does MTA have an automatic mysql_real_escape_string function when querying? Just would like to know.
-
I don't know what you actually want to do in the script, because first you say the command is just for testing, and now you use it - incorrectly. I have decided to make you an easier script. Now when the resource starts, it loads a random fire point. Every 10 seconds it repeats the createFire function, which will "synchronize" the fire to all clients (every 10 seconds). If you want to change the random fire point, you use the command "fire" if you have player model 277, 278 or 279. If you want to delete the existing fire point, type "extinguish" (it takes a minute or less to destroy the fire GTA-wise, so don't worry if it doesn't disappear when you type the command. It will just prevent it from creating them repeatedly). TL;DR: When the resource starts, it starts a random fire and keeps it synced every 10 seconds. When you type "fire" it stops the current fire and creates another one. When you type "extinguish" it stops the current fire but doesn't create a new one. Server-side local fireLocations = { {2016.54296875, -1641.65234375, 14.112878799438}, {2151.07421875, -1807.9921875, 13.54638671875}, {2500.5302734375, -1759.71484375, 13.546875}, {2480.876953125, -1536.6943359375, 24.189422607422}, {2434.80859375, -1289.4814453125, 25.347854614258}, {2407.958984375, -1106.970703125, 40.295722961426} } function unpackFires() return unpack(fireLocations[math.random(#fireLocations)]) end function createRandomFirePoint() local x, y, z = unpackFires() fireBlip = createBlip(x, y, z, 20) fireTimer = setTimer(function(x, y, z) triggerClientEvent(root, "syncFires", root, x, y, z) end, 10000, 0, x, y, z) end addEventHandler("onResourceStart", resourceRoot, createRandomFirePoint) addCommandHandler("fire", function(player, cmd) local playerSkin = getElementModel(root) if (playerSkin == 277 or playerSkin == 278 or playerSkin == 279) then if isTimer(fireTimer) then killTimer(fireTimer) end if isElement(fireBlip) then destroyElement(fireBlip) end createRandomFirePoint() end end ) addCommandHandler("extinguish", function(player, cmd) local playerSkin = getElementModel(root) if (playerSkin == 277 or playerSkin == 278 or playerSkin == 279) then if isTimer(fireTimer) then killTimer(fireTimer) end if isElement(fireBlip) then destroyElement(fireBlip) end end end )
-
What do you mean by that? Most computers are 64-bit nowadays and I don't see why mabako didn't have that. On my computer the module runs perfectly fine. Your sentence is invalid. It can be an issue with Windows 8/Windows Server 2012 in general. It's new and I am not sure if MTA has releasef full support to it yet.
-
Does GTA work for you? If not, please try to update the directory settings and set all privileges to your Windows account by right-clicking on the directory, opening the Properties-window, unticking read-only in the parameters and changing the security account privileges to everything on every account. If it does, please do the above thing to MTA as well. If that doesn't work out, re-install MTA to a new directory.
-
Yes, if you change "player" to "root".
-
Okay, let me explain what I actually did in your code. I put the setTimer inside the function, because otherwise the function would be executed without the parameters "player" and "cmd". These are critical in your script, and that is why I put it inside. So please use my code again and implement your version again. Do not remove the setTimer from the function, it won't work otherwise. Perhaps you could change the "player" to "root" as well, that shouldn't make any difference but I don't think that matters at this moment.
-
Make sure you have the MySQL library (libmysql.dll) in your MTA San Andreas 1.3/server -folder. You can find a copy in your deathmatch -folder. Just copy it and paste it in the server -folder. Perhaps this will help you.
-
You do not need a tonumber() function there, because it will always return a float anyways.
-
Perhaps... Server-side (rank) addEventHandler("onPlayerSpawn", root, function() local account = getPlayerAccount(source) if not isGuestAccount(account) then if not getAccountData(account, "Rank") or tonumber(getAccountData(account, "Rank")) == 0 then setElementData(source, "Rank", "level0.png") else setElementData(source, "Rank", "level" .. tonumber(getAccountData(account, "Rank")) .. ".png") end else setElementData(source, "Rank", "level0.png") end end ) Client-side (scoreboard) elseif column.name == "Rank" then if getElementData(localPlayer, "Rank") then dxDrawImage(topX+theX, y+s(1), 16, 11, getElementData(localPlayer, "Rank"), 0, 0, 0, cWhite, drawOverGUI) end end
-
You cannot create fire server-side, because it is a client-side function. All rendering is done client-side always, it's obvious. Server doesn't display anything on server's screen because it doesn't have one, simply put. Try this combination, not sure if it'll work but worth of trying. Server-side addCommandHandler("fire", function(player, cmd) local playerSkin = getElementModel(player) if (playerSkin == 277 or playerSkin == 278 or playerSkin == 279) then destroyElement(fireBlip) fireBlip = createBlipAttachedTo(fire, 20, 2, 0, 0, 0, 255, 0, 9999.0, player) setTimer(function(player) local x, y, z = unpackFires() triggerClientEvent(root, "syncFires", player, x, y, z) end, 180000, 0, player) end end ) Client-side addEvent("syncFires", true) addEventHandler("syncFires", root, function(x, y, z) fire = createFire(x, y, z, 20) end )
-
I am not here to argue, but if you know all those languages, you should know arrays very well. C++ arrays are almost the same. int example[5] = {0, 1, 2, 3, 4};
-
Nah, the reource would runs all the time, i want to open that resource then i click that button. What do you mean by "opening" the resource.
-
As far as I know, objects are not fire elements. You can't extinguish objects. That script creates an object, which has a fire on it, but it cannot be extinguished. The script requires the createFire function. If I was the one making the syncfire script, I'd make a continuous timer on createFire function so that it always re-creates it after some milliseconds. This also allows it to be extinguished.
-
A stickied topic regarding mapping and scripting tools and you don't even bother looking. viewtopic.php?f=91&t=31891 -- The fact that people are getting more blind every day just makes me crazy. People think everything is magically thrown towards them. Don't bother starting to program or script if you don't give a single duck about it.
-
...Makes no sense Don't even begin scripting or programming in general if you don't understand that - you need to have motivation and understanding. Arrays are important.
-
Disable the static image with guiSetEnabled. It should disable all events done to the element. Also, make sure you create the static image before any windows or so. Also, your alpha is wrong. The range is a float from 0.0 to 1.0.