-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
for i,car in ipairs(State_Troopers) do setElementData(car,"Team","State Troopers") setVehicleColor ( car, 255, 0, 0 ) end
-
You're welcome.
-
exports [ "scoreboard" ]:scoreboardRemoveColumn ( "Column Name Here" )
-
These functions can be used for both: SQLite and MySQL.
-
Where are all these variables defined: sec, min, hour? Also: onPlayerLogin does nothing, it just obtains saved data.
-
Select the table and edit it.
-
You could use the account data functions, which would be the easiest way. setAccountData getAccountData
-
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.
-
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.
-
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.
-
Yes, it's working on current release version.
-
That's because you used negative values for the radar area size.
-
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.
-
I was talking about the errors, not the script lines.
-
Mind posting them here?
-
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.
-
Any errors at the debugscript?
-
Problema Con Mi Mta Sa(Crash)
Castillo replied to maauroo's topic in Ayuda relacionada al cliente/servidor
La mayoria de los mods no permiten que les pongas upgrades. -
It doesn't do anything because you are not hitting the markers, they are too low.
-
What is this: It has missing all arguments.
-
You can use the "bone attachments": https://community.multitheftauto.com/ind ... ls&id=2540
-
Eso no tiene el menor sentido, aprende el syntax de Lua y luego empeza con esto.
-
Si no sos scripter, entonces te recomiendo empezar a aprender si queres hacer las "puertas automaticas".
-
createObject moveObject