DeadthStrock

Members
  • Content Count

    209
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by DeadthStrock

  1. Did you run that function on client side and command as for example /createEffect 3 ?? [ createEffect not createeffect , with capital E ? ]
  2. Hello dear ! I'm trying to play some musics with the function 'playSound3D'. The sound URLs are provided to the function [ not files ]. So, that this musics are started to play according to the internet speed of the client. Some will start earlier than others. My problem is in stopping the sound. When current music ends, the next one should play. For that I need to know how long that the current sound will play. Therefore, how to return the left playtime of the sound?
  3. Hello @Burak5312 ! First, I thing it should better if you add following ped into a table giving unique variable as that ped created on server side. if boomer = your following ped, then if I command to spawn a follower, then 'boomer' refers to my follower. Not yours from then. so, it may get confused to the follower !! So, I suggest you to create a table and get the nick name / account name of the command user and store it in a table. Then under that account name variable, create the follower. [ These are told according to my opinion. ]
  4. function DeleteVIP (command, accountName) local result = dbQuery(database,"SELECT * FROM vip") local poll = dbPoll(result, -1) for i,v in ipairs(poll) do local time = getRealTime() if (tonumber(v["viptime"]) < tonumber(time.timestamp)) and (tonumber(v["viptime"]) > 0) then dbExec(database, "DELETE FROM vip WHERE id = ?", tonumber(v["id"])) local account = getAccount(accountName) if getAccountPlayer(account) == tostring(v["acc"]) then local player = getAccountPlayer(account) outputChatBox("VIP: " .. accountName .. " ", player, 255, 255, 255, true) end end end dbFree(result) end setTimer(DeleteVIP, 6000000, 0) In line 8 you had to define the 'accountName' variable. Got it ?
  5. Can you please tell me, what happens every 1 minute when running this DeleteVIP function ?
  6. If that peace of code run according to the timer, you can't add accountName as a handler function argument of DeleteVIP. You had to discover accountName variable before started running the line 8.
  7. can you test below peace of code separately from your resource ? and tell what you think about it related to your code ? after command as /walk function checkPlayerMovementStyle() setTimer( function () value = {} value[1] = true value[2] = false setTimer(setPedControlState,50,2,getLocalPlayer(), "walk", value[1]) toggleControl("walk", value[2]) toggleControl("sprint", value[2]) toggleControl("jump", value[2]) end,500,1) end addCommandHandler("walk",checkPlayerMovementStyle)
  8. First, I think you have missed some details on 'addCommandHandler' page. Go and read that page completely one more time. https://wiki.multitheftauto.com/wiki/AddCommandHandler In server side, there are some parameters on handler function. 1. Player who command 2.The Command 3.Arguments [ from the command ] *Your handler function does not configured correctly.
  9. Seems this code is toggling player's sprint and jump every 300 miliseconds. But when you toggle the control one time... it will last longer until you enable it. Is't it ?
  10. DeadthStrock

    Map

    Yeah ! Press numberpad 1 key.
  11. Try this out : function SETVIP (source, command, accountName) local account1 = getAccountName(getPlayerAccount(source)) local serial = serial local nick = nick local time = time local time2 = time2 local VIP = vip local account = getAccount(accountName) if getAccountPlayer(account) then local player = getAccountPlayer(account) givePlayerMoney(player, 500000) outputChatBox("VIP: " .. accountName, player, 255, 255, 255, true) end end addCommandHandler("setvip", SETVIP)
  12. @IIYAMA That's cool Thank You as well ... !!
  13. According to the way I think, that errors looks not received from the function that I gave you. check that carefully
  14. In 'addEventHandler' on line 24 [ or 25 :3 ] of that code, change argument 2 from 'resourceRoot' to 'getRootElement()'. And try some edits like below to the function; function createVehicleForPlayer(player, command, model) if model then local x, y, z = getElementPosition(player) outputChatBox(model,player) y = y + 5 outputChatBox("Ola2",player) local veiculoCriado = createVehicle(tonumber(model), x, y, z) local nomeVeiculo = getVehicleName(veiculoCriado) if veiculoCriado then outputChatBox(horaJ.. "Criaste um " ..corVeiculo.. nomeVeiculo.. corMJ.. " (modelo: "..corVeiculo.. model.. corMJ.. ") com sucesso.", player, isR, isG, isB, true) else outputChatBox(horaE.. corErro.. "Uso: /cv [" ..corVeiculo.. "400" ..corErro.. "-" ..corVeiculo.. "611" ..corErro.. "].", player, isR, isG, isB, true) end else triggerClientEvent(player, "veiculoJanela", player) outputChatBox("Feito") end end addEventHandler("onVehicleExplode", getRootElement(), notifyAboutExplosion)
  15. exactly that is ! But the problem is I want to get the resource names currently running on the server to add there...
  16. Nothing ! I mean to save the time that had to spend when searching and starting the stopped resource when restarting the server.
  17. Hello ! Actually the problem is, I had to restart the server. And there are number of resources running on the server now. After restarting the server, I had to start them one by one to come into the previous position Are there any scripting solution [ or another method ] that I can obtain as a solution in this occasion ?
  18. Hello again ! Actually below code is also not working. Client Side :- addCommandHandler("setvoice", function (command,sound1,sound2) if sound1 and sound2 then outputChatBox("playing") setPedVoice(getLocalPlayer(), sound1, sound2) end end ) Accordingly, this outputs "playing" but the player does not talking at least a word. What may be the problem here ?
  19. Hello ! I suggest you to download the default admin resource and replace it with current one if you done anything to resource. And make sure to add your account name in Admin group of acl.xml [ <object name="user.account_name"></object>]. Then try it again.
  20. Hello dear ! Following function does not working with some reason that I can't investigate. It outputs "playing" but there's no sound generating ! addCommandHandler("play", function (command,number1,number2) if number1 and number2 and tonumber(number1) <= 44 then outputChatBox("playing") setWorldSoundEnabled(tonumber(number1),tonumber(number2),true) end end ) How to fix this ??
  21. I guess ; setPedControlState(thePlayer, "enter_exit", true) for local players.
  22. Sorry, but I didn't got your question ! For a example ?
  23. DeadthStrock

    Effect name

    You want to create effects like shown on images ?
  24. DeadthStrock

    [HelpP]

    No, that function isn't true since it doesn't fix errors. And you should define whom is 'player' variable. function test ( ) if getElementData(player, "Job") == "CIA" then if getElementData(player, "Clan") == "BBY" then outputChatBox("You can't get this job ",player) end end end
  25. And what's between <voice_quality> tag ?