Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. That script will never work, reasons: 1: You are using the event: "onResourceStart" on a client side script, should be: "onClientResourceStart". 2: You are adding the event handlers BEFORE you create the functions.
  2. If you are new to scripting, then I don't recommend trying to do such thing just yet.
  3. Store the vehicle elements on a table, and use the player element as index, then when he's going to spawn a vehicle, check if he has a car spawned and if so, destroy it.
  4. No, that won't work, because of the following problems: 1: You are trying to get an account name from a string, not an account element. 2: Your SQL functions are all wrongly used. addEventHandler ( "onResourceStart", resourceRoot, function ( ) exports.scoreboard:addScoreboardColumn ( "VIP", 3 ) executeSQLCreateTable ( "VIP", "account TEXT" ) end ) addCommandHandler ( "addVIP", function ( player, cmd, account ) if ( getElementData ( player, "thePlayerStaffLevel" ) == 5 ) then executeSQLInsert ( "VIP", "'".. account .."'" ) exports.DxChat:sayServerMessage ( player, "You have succefully added ".. account .." as VIP", 0, 255, 0 ) else exports.DxChat:sayServerMessage ( player, "You don't have sufficient rights", 0, 255, 0 ) end end ) addCommandHandler ( "delVIP", function ( player, cmd, account ) if ( getElementData ( player, "thePlayerStaffLevel" ) == 5 ) then executeSQLDelete ( "VIP", "account = '".. account .."'" ) exports.DxChat:sayServerMessage ( player, "You have succefully deleted ".. account .." and he is no longer a VIP", 0, 255, 0 ) else exports.DxChat:sayServerMessage ( player, "You don't have sufficient rights", 0, 255, 0 ) end end ) addEventHandler ( "onPlayerLogin", root, function ( _, account ) local result = executeSQLSelect ( "VIP", "account", "account = '".. getAccountName ( account ) .."'" ) if ( type ( result ) == "table" and #result == 1 ) then setElementData ( source, "VIP", "Yes" ) else setElementData ( source, "VIP", "No" ) end end )
  5. If you replace them on your GTA only, then others won't be able to see them.
  6. Castillo

    Create Model

    You can't add new model ID's.
  7. Why don't you TRY to do it, if you fail, post it here so we can find out what went wrong.
  8. Castillo

    GUI help

    Currently, that script works with element data, and you need to use getPlayerTeam + getTeamName. This line is all what you have to change: if (getElementData(player, dataToFindPlayersJob) == role or role == "ALL") then
  9. To do that, you'll need the following functions: createMarker setTimer isTimer killTimer And the event: onMarkerHit onMarkerLeave
  10. Tried contacting your host company?
  11. By import you mean replace? if so, you can use the engine functions to replace them.
  12. spawnPlayer tiene un argumento para el skin, tenes que poner el que tenia antes ( usa: getElementModel para obtenerlo ).
  13. Make sure the server ports are open.
  14. En el mismo topic, pusieron el link en la pagina 2.
  15. Crea un script para guardar el team al morir, y al spawnear, se lo devolves.
  16. Proba este: viewtopic.php?f=108&t=57877
  17. This feature is already possible, map editor has option to remove world objects.
  18. You aren't explaining him what is his problem. Problems found: 1: You wrote "showcursor" lowercase "C", but should have been uppercase. 2: showCursor client side doesn't have a player argument.
  19. Podrias usar mi gang system ( no usa teams ): https://community.multitheftauto.com/in ... ls&id=1514
  20. No te aconsejo usar timers, no son muy eficientes, usa getTickCount.
  21. I once had the same idea of making a Mario mini game for MTA, but then I abandoned it. Anyway, good luck.
  22. Prove that you got permission to use that panel, until then, we can't help you. P.S: I've removed the link until you show us proof.
  23. What do you mean by "table theme"? you are talking about the GUI theme? if so, then they created own GUI system with DX.
  24. Tenes mal el evento: "onClientGUIClcik".
×
×
  • Create New...