Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. for i,car in ipairs(State_Troopers) do setElementData(car,"Team","State Troopers") setVehicleColor ( car, 255, 0, 0 ) end
  2. You're welcome.
  3. exports [ "scoreboard" ]:scoreboardRemoveColumn ( "Column Name Here" )
  4. These functions can be used for both: SQLite and MySQL.
  5. Where are all these variables defined: sec, min, hour? Also: onPlayerLogin does nothing, it just obtains saved data.
  6. Select the table and edit it.
  7. You could use the account data functions, which would be the easiest way. setAccountData getAccountData
  8. As I told you, it was not saving the drugs at all. To edit the database where this is saved, you must download "SQLitebrowser" ( google it ), and open "internal.db" at your server folder.
  9. Use this command to check if you have drugs or not: addCommandHandler ( "checkdrugs", function ( thePlayer ) local playeraccount = getPlayerAccount ( thePlayer ) if ( playeraccount ) then local amountCannabis = getAccountData ( playeraccount, "amountCannabis" ) local amountHeroin = getAccountData ( playeraccount, "amountHeroin" ) local amountCocaine = getAccountData ( playeraccount, "amountCocaine" ) local amountLSDS = getAccountData ( playeraccount, "amountLSDS" ) local amountEcstasy = getAccountData ( playeraccount, "amountEcstasy" ) local amountOpium = getAccountData ( playeraccount, "amountOpium" ) outputChatBox ( "Cannabis: ".. tostring ( amountCannabis ), thePlayer ) outputChatBox ( "Heroin: ".. tostring ( amountHeroin ), thePlayer ) outputChatBox ( "Cocaine: ".. tostring ( amountCocaine ), thePlayer ) outputChatBox ( "LSD: ".. tostring ( amountLSDS ), thePlayer ) outputChatBox ( "Ecstasy: ".. tostring ( amountEcstasy ), thePlayer ) outputChatBox ( "Opium: ".. tostring ( amountOpium ), thePlayer ) end end ) Tell me what does it output.
  10. function getTextQuit ( ) triggerClientEvent ( source,"getDrugAmount", source ) end addEventHandler ( "onPlayerQuit", root, getTextQuit ) addEvent ( "saveDrugAmount", true ) addEventHandler ( "saveDrugAmount", root, function ( player, amountCannabisS, amountHeroinS, amountCocaineS, amountLSDS, amountEcstasyS, amountOpiumS ) local playeraccount = getPlayerAccount ( player ) if ( playeraccount ) then setAccountData ( playeraccount, "amountCannabis", tonumber ( amountCannabisS ) ) setAccountData ( playeraccount, "amountHeroin", tonumber ( amountHeroinS ) ) setAccountData ( playeraccount, "amountCocaine", tonumber ( amountCocaineS ) ) setAccountData ( playeraccount, "amountLSDS", tonumber ( amountLSDS ) ) setAccountData ( playeraccount, "amountEcstasy", tonumber ( amountEcstasyS ) ) setAccountData ( playeraccount, "amountOpium", tonumber ( amountOpiumS ) ) end end ) function loadDrugAmount ( _, playeraccount ) if ( playeraccount ) then local amountCannabis2 = getAccountData ( playeraccount, "amountCannabis" ) local amountHeroin2 = getAccountData ( playeraccount, "amountHeroin" ) local amountCocaine2 = getAccountData ( playeraccount, "amountCocaine" ) local amountLSD2 = getAccountData ( playeraccount, "amountLSDS" ) local amountEcstasy2 = getAccountData ( playeraccount, "amountEcstasy" ) local amountOpium2 = getAccountData ( playeraccount, "amountOpium" ) triggerClientEvent ( source, "outputDrug2", source, amountCannabis2, amountHeroin2, amountCocaine2, amountLSD2, amountEcstasy2, amountOpium2 ) else triggerClientEvent ( source, "firstTime", source ) end end addEventHandler ( "onPlayerLogin", root, loadDrugAmount ) Not sure if that'll fix it, but try it anyway. If it still doesn't work, then it may be that you are not saving any drug amount at all.
  11. You're welcome.
  12. Yes, it's working on current release version.
  13. That's because you used negative values for the radar area size.
  14. addCommandHandler ( "destroyblip", function ( thePlayer ) for index, element in ipairs ( getAttachedElements ( thePlayer ) ) do if ( getElementType ( element ) == "blip" ) then destroyElement ( element ) end end end ) That'll destroy ANY blip attached to the player who uses the /destroyblip command.
  15. I was talking about the errors, not the script lines.
  16. Mind posting them here?
  17. Ese codigo no tiene sentido. El argumento: 'victima' no es un jugador, es un string. El argumento: 'tiempo' es un string, no un numero. dxDrawText es una funcion client side, pero el syntax que usaste para el comando es server side. Ademas de que todas las funciones DirectX ( DX ) se usan con el evento: onClientRender o onClientHUDRender.
  18. Any errors at the debugscript?
  19. La mayoria de los mods no permiten que les pongas upgrades.
  20. It doesn't do anything because you are not hitting the markers, they are too low.
  21. What is this: It has missing all arguments.
  22. You can use the "bone attachments": https://community.multitheftauto.com/ind ... ls&id=2540
  23. Eso no tiene el menor sentido, aprende el syntax de Lua y luego empeza con esto.
  24. Si no sos scripter, entonces te recomiendo empezar a aprender si queres hacer las "puertas automaticas".
  25. createObject moveObject
×
×
  • Create New...