Jump to content

DiSaMe

Helpers
  • Posts

    1,461
  • Joined

  • Last visited

  • Days Won

    34

Everything posted by DiSaMe

  1. DiSaMe

    Why dont work?

    It may look as if you got trolled here, but you see, this is MTA forum. We don't provide support for other multiplayer mods. Anyway, why would anyone want to convert the map from MTA to SA-MP? What's the point of using the worse mod to play the map after putting some work into it?
  2. Does it work fine when you get the same weapons in other servers?
  3. DiSaMe

    Get points

    Because 'acc' is account of 'source' and 'source' is the player who was wasted. Instead, you need to get account of 'player' whom you get from 'alive' table.
  4. Maybe your game is modded or you use the scripts to replace models or something like that? AFAIK, errors in the Lua scripts should never cause MTA to crash, so there must be a problem somewhere else.
  5. Does this happen with any weapon or only with some specific ID?
  6. Because you make the giveMoney function create an infinite timer which calls giveMoney itself. That means, every time a new timer is created. If only want one repeating cycle, either create the timer in another function and attach that function to "onPlayerSpawn" event or simple change the third setTimer argument to 1.
  7. I've thought of making some recording/replaying scripts recently and maybe I will try to make something, but I'm not sure how they will affect memory and CPU usage.
  8. local x1, y1, z = getElementPosition(localPlayer) local r = math.rad(getPedRotation(localPlayer)) local x2, y2 = x1+math.sin(r)*2, y1+math.cos(r)*2 Now x1, y1, z will be player's position and x2, y2, z will be position in front by 2 distance units. You can change the distance by multiplying sin and cos by something else than 2 in line 3. Also, you may need to make r negative (use -r instead of r) to get the correct position.
  9. I don't think it's a good idea to rely on camera to do something like this. Better use: getElementPosition to get player's position and then: getPedRotation math.sin math.cos to get position in front. Then check collision between player and front position.
  10. Usage of root makes the script unfreeze everyone who respawns.
  11. Mainly those, but of course, you can use some others if you want to make it more accurate, such as getPedControlState setPedControlState What's so unclear about those functions?
  12. processLineOfSight isLineOfSightClear
  13. 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
  14. Localhost does exist in Linux. I write 'ping localhost' in the terminal and it works as if I wrote 'ping 127.0.0.1'.
  15. 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.
  16. DiSaMe

    Help

    Any more information? /debugscript? Full code?
  17. DiSaMe

    How ?

    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.
  18. DiSaMe

    Help

    Then remove the window creation part from createModeratorGUI, what's the problem?
  19. DiSaMe

    Help

    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.
  20. 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.
  21. 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.
  22. Remote MySQL connections in 000webhost are disabled for free accounts.
×
×
  • Create New...