Jump to content

Ab-47

Members
  • Posts

    367
  • Joined

  • Last visited

Everything posted by Ab-47

  1. You're welcome just try and learn from that and it'll help you in many cases working with allot of resources. Best of luck!
  2. Ab-47

    ERROR

    Either your server-side script has failed to load due to an error in the code or the event you're trying to call is not added. Also, you're in the wrong section, this is a client board for issues regarding the MTA:SA client not the actual scripting part of it. The correct board is "Scripting", https://forum.multitheftauto.com/forum/71-scripting/
  3. Ab-47

    mta timed out

    it could be that the server you're connecting to has either host issues or inefficient scripts using up too much of the servers CPU, if you're not experiencing the same issues on other servers, then it's not you. The best thing you could do is talk to the developers/staff of that server and let them know of the issue.
  4. I know it's a pretty simple answer but have you tried reinstalling GTA and MTA? Sometimes doing that works and fixes the issue(s).
  5. There were ways around this, normally you could request the file(s) that you're getting a mismatch in from the server owner / developer and manually place it in your MTA > mods > deathmatch > resources (resource download directory) and paste it there, that way you wouldn't need to download the file through MTA's downloader.
  6. I've never used latent events, but I'm pretty sure it doesn't get triggerServerEvent/triggerClientEvent details. That's why I said to try triggerLatentServerEvent/client instead. However I think you may find this bit of information useful: Give it a try but I do recommend IIYAMA's suggestion or something similar. Or even try this if it helps:
  7. Bro, it's not the script, the engine turns of completely fine as-well as the lights working. You must have another script interfering with the running of engines, try your local server rather than your main server if you're using that. Otherwise in your local server, just make sure no other script is running apart from that one script you're using this code in. Then let us know what happens.
  8. Your title does say "getTickCount" so I'm just gonna throw this in there even though setTimer works too.. For client you can use variables rather than tables so name your variables: local limit_armor, limit_health Then apply them to the code elseif source == can then if getPlayerMoney() >= 5000 then if getElementHealth(localPlayer) ~= 100 then if (limit_health) and (getTickCount()-limit_health < 300000) then outputChatBox("You need to wait 5 minutes before using this again...", 255, 0, 0) return end limit_health = getTickCount() setElementHealth(localPlayer,100) triggerServerEvent("TakeMoney",localPlayer) outputChatBox("#888888 5000$ #FFFFFFkarşılığında canın dolduruldu!",0,255,0,true) else outputChatBox("Canın zaten dolu!",255,0,0,true) end else outputChatBox("Paran yetmiyor!",255,0,0,true) end setTimer(guiSetPosition,50,5,canimg,g-132,2,false) setTimer(guiSetPosition,60,5,canimg,g-128,1,false) elseif source == zirh then if getPlayerMoney() >= 5000 then if getPedArmor(localPlayer) ~= 100 then if (limit_armor) and (getTickCount()-limit_armor < 300000) then outputChatBox("You need to wait 5 minutes before using this again...", 255, 0, 0) return end limit_armor = getTickCount() triggerServerEvent("setPlayerArmor",localPlayer) outputChatBox("#888888 5000$ #FFFFFFkarşılığında çelik yelek giydin!",0,255,0,true) else outputChatBox("Çelik yeleğin zaten sağlam!",255,0,0,true) end else outputChatBox("Paran yetmiyor!",255,0,0,true) end setTimer(guiSetPosition,50,5,zirhimg,g-132,2,false) setTimer(guiSetPosition,60,5,zirhimg,g-128,1,false) If you need to use the same technique server sided, you'll need tables, which would look like this: local limit = { armor = {}, health = {}, } if (limit.armor[thePlayer]) and (getTickCount()-limit.armor[thePlayer] < 300000) then outputChatBox("You need to wait 5 minutes before using this again...", thePlayer, 255, 0, 0) return end limit.armor[thePlayer] = getTickCount() if (limit.health[thePlayer]) and (getTickCount()-limit.health[thePlayer] < 300000) then outputChatBox("You need to wait 5 minutes before using this again...", thePlayer, 255, 0, 0) return end limit.health[thePlayer] = getTickCount()
  9. I just tested the script in my local server, it works perfectly lol. I feel he may have duplicated his resource by accidently leaving the old one running... What file type have you saved it under? Have you made sure it's under type server side?
  10. Maybe getLatentEventStatus Could work whilst using triggerLatentServer/ClientEvent as the function returns tick start, tick end, size and percentage complete..
  11. Just figure out a structure, You want a GUI to handle the inventory, do you want it triggered by a marker or command handler? You want the system to hold the data, you could use SQL (executeSQLQuery) to add items for specific users into a table such as "inventory". You want to remove players weapons/drugs/money or whatever, search wiki.multitheftauto.com > client / server functions. - For weapons use https://wiki.multitheftauto.com/wiki/TakeWeapon or https://wiki.multitheftauto.com/wiki/SetWeaponAmmo - For drugs (if you have a system) you would need to find out how your system is being used, element data? SQL? File? - - For element data, setElementData(thePlayer, "drugsData", "newData" or num [or currentDrugs - inventoryInputDrugs]) - - For SQL, use executeSQLQuery. Example: executeSQLQuery("UPDATE inventory SET drugs=?, money=? WHERE playerName=?", currentDrugs-insertDrugs, oldMoney-insertMoney, getPlayerName(player)) You would then want to add all the data upon retrieval, just do the opposite of what I mentioned above. You gotta start somewhere, follow up on your progress and if you need any assistance, you could just reply here and I'm sure allot of us are happy to help. Goodluck.
  12. I'm not entirely sure but try this: setPedVoice(thePed, "PED_TYPE_DISABLED") As voices are embedded into GTA files, I wouldn't have thought you could "remove" or turn them off without modifying the files, but changing it to something silent which I guess ^ that does should work. If not, you could have a look through all the other voices that are available to use. https://wiki.multitheftauto.com/wiki/Ped_voices Sorry if I couldn't help, I've not worked on ped voices before. Goodluck
  13. I think you wanted something a bit more basic. What you've done is overlapped the same element transfering the variable to a new object where the previous object is left undefined. In order to have multiple objects, you must have multiple variables or use an iterating table. In the most basic cases you can use variables: wind1 = createObject() wind2 = createObject() wind3 = createObject() and so on... For tables, you have a few options but the best scenario would be to add all the data into a table and unpack or use a loop to retrieve the data. Just an example of sorts, haven't tested this and am very sleepy cause it's 8am and haven't slept but have a look below you should get the idea of what you could do, especially by naming the objects according to the iterating index: local windTable = { {3892,-2072.5,285.5,34.3, 0,0,0}, {3895,-2035.6,263.39999,34.3, 0,0,0}, {3896,-2096.5,146.5,34.3, 0,0,0}, {3897,-2056.1001,214.8,34.3, 0,0,0}, } local wind = {} function loadWind() if timehour <= 19 and timehour >= 6 then for i=1, #wind or 1 do if wind[i] and isElement(wind[i]) then destroyElement(wind[i]) outputChatBox ("Object destroyed") elseif not wind[i] or not isElement(wind[i]) then for k, v in pairs(windTable) do wind[k] = createObject(v[1], v[2], v[3], v[4], v[5], v[6], v[7]) end break end end end end
  14. executeSQLQuery -- Use this to create your database / update the table you've created to add the modifications for your player. You can use INSERT, UPDATE and SELECT, if you check the examples they give a good demonstration of everything you need.
  15. Ab-47

    admin php

    No one would request a script and then wait months for it to be developed and then pay you money. Best bet is to create the script, release a few spoilers to catch their attention and you'll be bound to get some offers. All the best.
  16. What message do you get? Connection Timed Out? Or does MTA crash?
  17. Ab-47

    [HELP]

    Try this, not entirely sure what your issue is but from what I gathered, maybe the level variable was getting set constantly with the loop by all players so pack them in a table and maybe it would give an individual value. level = {} function evade(player) for theKey,thePlayer in ipairs(getElementsByType("player")) do level[thePlayer] = getPlayerWantedLevel ( thePlayer ) if ( level[thePlayer] > 1 ) then triggerClientEvent(thePlayer,"StartEvadeTimer",thePlayer) end end end setTimer(evade,1000,1)
  18. Do you experience any lag? And is there anything cancelling the rendering in your script? Best way we could help is if you posted a bit of the code which renders the display.
  19. Ab-47

    The last reply

    Really think you won? Think again.. ?
  20. Try this: https://wiki.multitheftauto.com/wiki/CreateEffect To enable/disable just create the effect and destroyElement I guess. Try come up with a code and see if there's any issues, if there is you can post it here and I'll try help you out.
  21. Great work guys, finally you got a new theme and it looks way more modern than the old 19th century style Other than the fact that I have to login again and again, everything's great, gotta get used to allot now :3
  22. Ab-47

    NFS:SA

    A thread on CIT forums has just what you need. https://cit2.net/index.php?topic=130604.0
  23. Can you be more precise, I'm sorry but I merely understand your situation. Do you mean a players IP is output when they join? If so, check for the root directory of your gamemode and find the script that functions the onPlayerLogin to output.
  24. It still don`t work ... Maybe there are some another errors? Can you paste your client sided code please.
  25. If the name of your team in your script is something other than "Axis" then change "Axis" to whatever the team is called.
×
×
  • Create New...