Jump to content

JR10

Retired Staff
  • Posts

    2,947
  • Joined

  • Last visited

Everything posted by JR10

  1. Are you using the default race game-mode? If so, there's an onPlayerFinish event. triggerEvent('onPlayerFinish', source, rank, time)
  2. JR10

    Question

    The simple answer, no, there's no difference in storing the marker in a table, variable or not storing it at all. createMarker returns the marker element created, you can choose to either store the marker element in a variable (or a table) or not store it. If you do store it, then you can manipulate it later, like set its position with setElementPosition, set its color, etc..
  3. Try this: function hello() setElementData(localPlayer,"wins", (getElementData(localPlayer,"wins") or 0) + 1) end addCommandHandler("givewins",hello)
  4. There's no point in sending the wins with triggerClientEvent, the client-side script is already using getElementData to get the wins. The problem is not in the script, the 'wins' element data is false, hence why the script needed a fault-safe value, which is zero in this case.
  5. My point is, instead of bumping into errors, warnings and logical faults, learning the basics and looking at examples can make it much easier.
  6. getElementData returns false, this means that the element data is not set. Try this: local Test = "MapsWin:"..(getElementData(getLocalPlayer(),"wins") or 0)
  7. It seems fine. Are you sure the player is in a team? You should check if getPlayerTeam returns false or else getTeamName will spit a warning.
  8. He's not using modules, he's using MTA's db* functions.
  9. It's weird that you have 2 rows for the same player, why not add a column for the ping? You can use guiGridListSetItemData
  10. Try debugging the dbConnect parameters. Try checking for problems from the MySQL server itself.
  11. It's kinda weird to name it OpenTeams when you're going to sell it.
  12. Setting the game type (game mode) is easy to add using setGameType. As for setting the server name, there's no function to set the server name, so there might be some restrictions regarding changing a running server's name.
  13. You probably messed up your acl.xml, the Console has its own acl group, you can also just add user.Console to the admin group (if it has access to everything).
  14. JR10

    Player Blips

    Because you should be using source, that's the player that quit.
  15. You need to specify a table for each milestone. On each kill, check the number of kills and give the bonus if the milestone exist in the table.
  16. guiGridListRemoveRow takes in the row id to remove. You need to loop through the rows and check which one has that player name and remove that row. for row = 0, guiGridListGetRowCount(gridplayers) - 1 do if (guiGridListGetItemText(gridplayers, row, 1) == getPlayerName(source)) then guiGridListRemoveRow(gridplayers, row) end end
  17. Your code is a total mess. Like I said, you should try to learn more. @line33 client is not defined, and you're sending the selected item but you're doing nothing with it server-side. I can't help you if none of your code make any sense.
  18. You're already doing that. Check /debugscript 3 for errors. Post the client side script and make sure that source is defined. I suggest you start learning more.
  19. This is different from your original code. Is 'source' defined in warpplayer? local px, py, pz = getElementPosition(client)
  20. JR10

    error

    We don't offer help with stolen/leaked scripts.
  21. JR10

    [Help]Hud

    Your custom hud doesn't have any code for showing ammo, you're showing the default one, yes, but in the screenshot your current weapon is the fist, which shouldn't show any ammo.
  22. JR10

    [Help]Hud

    Where's the problem exactly? You're hiding the weapon but showing the ammo?
  23. onResourceStart will be called for all resources, should be resourceRoot not root. And this will only trigger when the resource starts, what about when a player joins?
  24. Because you're always getting the position of the last busmarker created and setting it to the global variable 'markerpos'. The logic is not even close to being correct. You need to find the marker on warpplayer to get its position.
×
×
  • Create New...