-
Posts
1,449 -
Joined
-
Last visited
-
Days Won
32
Everything posted by DiSaMe
-
processLineOfSight isLineOfSightClear
-
What ? really ? via scripting or something, if via scripting then which functions should we use ? setElementDimension createPed createVehicle warpPedIntoVehicle getElementPosition getElementRotation getElementVelocity getVehicleTurnVelocity setElementPosition setElementRotation setElementVelocity setVehicleTurnVelocity
-
Localhost does exist in Linux. I write 'ping localhost' in the terminal and it works as if I wrote 'ping 127.0.0.1'.
-
It's a low LOD model which is visible when the one with a higher detail isn't. You need to remove that one too. The model name will probably be "LODprtwlkto1_LAS", but i'm not sure. If it isn't, you could get it using GTA map editor, MEd.
-
getResources getResourceInfo triggerClientEvent addEvent addEventHandler guiGridListAddRow guiGridListSetItemText Get all resources with getResources, cycle through all of them and use getResourceInfo to check if "type" attribute is "map" and "gamemodes" attribute is "race", and if they are, then also get "name" attribute and put it into a table. So you have a table with the names of all race maps. Make an event client-side and trigger it from server with map names list as an argument. On the client side, loop through that table and use guiGridListAddRow and guiGridListSetItemText to add the map names to the grid list.
-
You need the server to tell the client if he/she has access to the window and the client should do the rest of the job. Something like this: Server: function letUseTheGUIIfModerator(player) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("Moderator")) then triggerClientEvent(player, "letUseTheGUI", root) end end Client: function createModeratorGUI() Wnd = guiCreateWindow(100, 100, 100, 100, "SomeWindow", false) --do everything else what you need in that window bindKey("p", "down", function() local show = not guiGetVisible(Wnd) guiSetVisible(Wnd, show) showCursor(show) end ) end addEvent("letUseTheGUI", true) addEventHandler("letUseTheGUI", root, createModeratorGUI) You will need to call letUseTheGUIIfModerator from the server-side script (make sure the client will have downloaded the script when you do so). This function checks if the player is a moderator, and if so, then tells the client to create the window by triggering "letUseTheGUI" event. On the client, this causes createModeratorGUI to be called and this function creates the window and binds the key P to toggle the visibility of that window.
-
If you don't want to use it on the player element, then don't. I never told you to use it on players. There are other elements, such as root, resourceRoot. You can also create your own abstract element using createElement function and then store the data to that element.
-
If you create a variable in the server, it won't be synced unless you script the syncing yourself. If you want an easy way to sync the data, use these functions: setElementData getElementData You can set the data of some element from the server or any client and that data will be synced for everyone.
-
Remote MySQL connections in 000webhost are disabled for free accounts.
-
I think he talks about breakable objects. I don't know how much MTA is aware of objects being broken. Maybe you can check if it's broken using this function: getElementHealth If it doesn't help, then try something with one of these: isLineOfSightClear processLineOfSight If the object is broken, it won't block the line of sight, so if the sight becomes clear, that means the object has been broken. Then destroy the element and create it again.
-
If you had read the script documentation or posts of this topic, you would know it's possible to change traffic density. About stealing, no. Inability to pull NPCs out of the cars is a limitation of MTA. Even though it's possible to remake vehicle enter/exit system using animations and attachments, I don't think it's worth the effort, as peds are going to be improved in MTA SA 1.3.2, according to roadmap.
-
Fixed it for you baby. Haha, nice one
-
Do you mean I'm not the only one whose computer slows down? Nice... NPC HLC and NPC HLC traffic pages in my website have documentation pages where you can find information about traffic density and update intervals.
-
2. Use these functions: setTimer outputChatBox 3. Stop helpmanager resource.
-
Entity, your script is incorrect.
-
First, the line with "local randomveh" is incorrect. If you want to get a random value from multiple possible values, the easiest way would be this: local randomveh = ({411, 602, 496, 491})[math.random(4)] A table gets created, a random index from 1 to 4 is chosen and value under that index is taken from the table. Second, you call createVehicle incorrectly. It must have position arguments specified. I guess you need it to be created in the same position as the ped, so it should look like this: local RaceVehicle = createVehicle (randomveh, 0, 0, 3) And third, thePlayer parameter of getCar function is actually an X position where player spawns. Instead, player element is stored in 'source' variable.
-
some_timer = setTimer(someFunction, 10000, 1) And later: killTimer(some_timer)
-
Maybe not by looping through all timers, but by storing the value returned by setTimer into a variable and later using it in killTimer?
-
In case someone hasn't noticed yet, I want to say it's released now.
-
Oh, yeah, there's something wrong, I will try to fix that. Edit: should work now. By the way, I just released the NPC high-level control, NPC traffic and a few other related scripts