Jump to content

AMARANT

Members
  • Posts

    748
  • Joined

  • Last visited

Everything posted by AMARANT

  1. That's what I told you. You passed to the function where you store drugs data that 'player' element and server was trying to convert it to number and of course it eventually returned false. And then when you login into the game, the server retrieves account data and it again returns false meaning that it's empty there. So you have to save data in account correctly.
  2. You passed to the server function saveDrugAmount unnecessary player element and tried to save it in account data as drug amount. Maybe it's your mistake. Correct this: triggerServerEvent("saveDrugAmount",getLocalPlayer(),getLocalPlayer(),amountCannabis,amountHeroin,amountCocaine,amountLSD,amountEcstasy,amountOpium) To this: triggerServerEvent("saveDrugAmount",getLocalPlayer(),amountCannabis,amountHeroin,amountCocaine,amountLSD,amountEcstasy,amountOpium)
  3. setAccountData puts data into that database. What exactly doesn't work?
  4. You have to open a connection with your database in order to start a query. https://wiki.multitheftauto.com/wiki/DbConnect
  5. These functions might be useful for you: https://wiki.multitheftauto.com/wiki/DbQuery https://wiki.multitheftauto.com/wiki/DbPoll
  6. Can you post here warnings/errors from server log or debugscript?
  7. AMARANT

    ¿im good? IV

    Of course you're not. You can't use client-side function server-side.
  8. Just put it where you need specifying required arguments. function pedcreation(player) local x,y,z = getElementPosition(player) local xr,xy,xz = getElementRotation(player) peds = createPed(288,x,y,z-1,xr,xy,xz) setElementRotation(peds, xr,xy,xz) setPedSkin(peds,50) -- This sets ped skin to 50 (mechanic skin) end addCommandHandler("piepie",pedcreation)
  9. setPedSkin(player,skinid)
  10. Your code is absolutely wrong! Tell us what are you trying to do in order to get some help.
  11. The data you want to retrieve from the database to compare with "zombiekills" value shouldn't be false. To avoid it you have to set it once in your script. You can do it like this: addEventHandler("onPlayerSpawn",root, function() local account = getPlayerAccount(source) local idiotkills = getAccountData(account,"Zombie kills") if not idiotkills then setAccountData(account,"Zombie kills",0) idiotkills = 0 end if (idiotkills >= 0) and (zombiekills <= 4) then setAccountData ( account, "Lygis", "Asshol" ) elseif (idiotkills >= 5) and (idiotkills <= 29) then setAccountData ( account, "Lygis", "Moran" ) elseif (idiotkills >= 30) and (idiotkills <= 79) then end end ) ) )
  12. Your account data returns false. So you're trying to compare some numbers with false.
  13. https://forum.multitheftauto.com/viewtopic.php?f=91&t=45322
  14. Any errors? Debugscript? And are you sure that your player spawns being already in a vehicle?
  15. Try this random: local randomindex = math.random(1,#vehicles) local vehicleid = vehicles[randomindex]
  16. Hello there How can I create 5 random coordinates from my table of 100 different ones so that they don't be repeated? I mean it might be a mess if a random coordinate turns out 17 and then it turns out 17 again.
  17. Кому надо на это заморачиваться вначале? Тем более автору темы. И без того вполне сносная система аккаунтов и ACL. По поводу админки просто зависит от гейм-мода. Мне например тоже ее нужно переделывать из-за специфики сервера, ну а так она и в обычном виде вполне подходит всем.
  18. These functions might be useful for you: getPlayerAccount setAccountData getAccountData All data goes to "internal.db" SQL database.
  19. Подождите, так вроде ж там есть русские описания функций? Или просто там не все переведено?
  20. You mean just creating some stuff in Map Editor?
  21. I'd like to know how can I create a custom interior? Can you explain to me where I need to start? Thanks in advance
  22. Kernell спасибо за исчерпывающий ответ)
  23. Server-side: ---------------------------------------------------------------------------------------------------------------------------------- --CREATE Tug GUI ---------------------------------------------------------------------------------------------------------------------------------- function tugCreateTugGUI(hitElement) if source == tug_marker_request then setElementFrozen(hitElement,true) setTimer ( function(hitElement) setElementFrozen(hitElement,false) end, 3000, 1 ) triggerClientEvent (hitElement,"tugCreateTugGUI",getRootElement()) end end addEventHandler ("onMarkerHit",getRootElement(),tugCreateTugGUI) EDITED***
×
×
  • Create New...