Jump to content

AMARANT

Members
  • Posts

    748
  • Joined

  • Last visited

Everything posted by AMARANT

  1. В какой "тием"? В какой команде ты умер в такой и заспавнишься. Команда меняется только если ты ее меняешь скриптово или отключаешь ресурс где создавались эти команды.
  2. AMARANT

    ¿im good? V

    function sod ( ) spawnPlayer ( source, 1200, -1400, 13) outputChatBox ( "Welcome to M.F.A", source, 255, 0, 0 ) end addEventHandler ( "onPlayerWasted", getRootElement(), sod )
  3. AMARANT

    Streaming

    Request it on the bugtracker and make a donation and maybe in the future this fearure will be added But I think it's not a priority for MTA and actually not a good thing for servers because of high traffic and system requirements.
  4. He probably wants the example right here on this topic.
  5. debugscript is a good thing
  6. createTeam is server-side function only.
  7. local myMarker=createMarker(1200,-1400,13,"cylinder",3,255,0,0,125) function VehicleHit(hitElement,matchingDimension) if getElementType(hitElement)=="vehicle" then outputChatBox(getVehicleName(hitElement).." hit my marker!",getRootElement(),255,0,0) end end addEventHandler("onMarkerHit",myMarker,VehicleHit)
  8. guiSetProperty ( bEditChar, "NormalTextColour", "FF00FF00" ) -- Normal state guiSetProperty ( bEditChar, "PushedTextColour", "FF00FF00" ) -- Pushed guiSetProperty ( bEditChar, "DisabledTextColour", "FF00FF00" ) -- Disabled guiSetProperty ( bEditChar, "HoverTextColour", "FF00FF00" ) -- Hovered
  9. https://wiki.multitheftauto.com/wiki/GuiLabelSetColor https://wiki.multitheftauto.com/wiki/GuiSetProperty
  10. You was given the code example and there is a resource that has a feature you want. Don't be lazy and do something with it instead of waiting for someone who makes the whole script for you.
  11. This script is exactly the thing you need. You can check the code especially as because it has lines with comments.
  12. function mrkMakeDrug(hitElement,matchingDimension) if getElementType(hitElement)=="player" and matchingDimension then triggerClientEvent("mrkMakeDrugC",hitElement) end end addEventHandler("onMarkerHit", mrkMakeDrug1, mrkMakeDrug)
  13. There's a nice script which can help you in the beginning until you learn how to make your own. https://community.multitheftauto.com/index.php?p=resources&s=details&id=292
  14. Where is your GUI element 'guiMakingDrugs' created? And again any errors in the console, debugscript 3?
  15. Are you trying to create ped in bar or where? To create it in some interior you have to set it for element with function: setElementInterior
  16. Maybe it's because of wrong dimension or unspecified interior?
  17. That means that you are not admin and have no right for this command. But anyway debugscript won't help you because your code is not client-side. I suppose you can't get a result in your function because of connection value returns false. In order to open a query to database you have to start a connection with it.
  18. setTimer(myFunction,1000,0) function myFunction() outputChatBox("!") end
  19. Just save your drugs data via setElementData function and set it into account with onPlayerQuit server-side event.
  20. Now I've finally noticed what is your problem. "onClientPlayerQuit" doesn't pass the data to the server because the local player is already went offline. I don't recommend using this function. You have to find another way to save your data or use server-side analog of this function.
  21. Ohh and change 'player' value in that function to 'source'. I marked it with a comment in the post above.
  22. Your data wasn't saved. Have you done what I told you in my previous posts? I mean removing unnecessary getLocalPlayer() from client-side trigger event? If you have then try to check what data passes to the server by another debug message: addEvent("saveDrugAmount",true) addEventHandler("saveDrugAmount",getRootElement(), function(amountCannabisS,amountHeroinS,amountCocaineS,amountLSDS,amountEcstasyS,amountOpiumS) -- Removed 'player' from arguments playeraccount = getPlayerAccount(source) -- Here was '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)) outputChatBox(tostring(amountCannabisS)..", "..tostring(amountHeroinS)..", "..tostring(amountCocaineS)..", "..tostring(amountLSDS)..", "..tostring(amountEcstasyS)..", "..tostring(amountOpiumS)) end end)
  23. In-game by debug messages or check internal.db by opening it and see for yourself the data. Try to put debug message in this part of the code: amountCannabis2 = getAccountData(playeraccount,"amountCannabis") amountHeroin2 = getAccountData(playeraccount,"amountHeroin") amountCocaine2 = getAccountData(playeraccount,"amountCocaine") amountLSD2 = getAccountData(playeraccount,"amountLSDS") amountEcstasy2 = getAccountData(playeraccount,"amountEcstasy") amountOpium2 = getAccountData(playeraccount,"amountOpium") outputChatBox(tostring(amountCannabis2)..", "..tostring(amountHeroin2)..", "..tostring(amountCocaine2)..", "..tostring(amountLSD2)..", "..tostring(amountEcstasy2)..", "..tostring(amountOpium2))
×
×
  • Create New...