Jump to content

AfuSensi

User Guide Contributor
  • Posts

    59
  • Joined

  • Last visited

  • Days Won

    1

AfuSensi last won the day on July 18 2019

AfuSensi had the most liked content!

3 Followers

About AfuSensi

  • Birthday August 11

Member Title

  • User Guide Contributor

Details

  • Gang
    Mr. Green Gaming
  • Location
    The Netherlands
  • Occupation
    Internet Gangster
  • Interests
    MTA, Programming, Music Production

Recent Profile Visitors

1,492 profile views

AfuSensi's Achievements

Snitch

Snitch (10/54)

14

Reputation

  1. Are you trying to find the vehicle name by vehicle ID or are you trying to get the table index by vehicle name? Your table's syntax is invalid, as you have an empty key [], but i'm not sure what you intended.
  2. Congrats to the MTA community and thanks to the contributors and staff.
  3. To draw the text, you need to put it in an onClientRender event, because you need to draw it at every frame. Then you need to add an "onClientRender" event handler to draw your text. You can then use a timer to remove the event handler, so that the text disappears after the timer executes. Example: -- Create a function that draws your text. function drawWarning() dxDrawText("Do not try to camp!", 0, 0, x, y, tocolor(255, 0, 0), 2, "pricedown", "center", "center") end addEventHandler("onClientVehicleCollision", getRootElement(), function(hitElement) if source ~= getPedOccupiedVehicle(localPlayer) then return end if getElementType(hitElement) == "object" and getElementModel(hitElement) == 6959 then -- Show text (handle "onClientRender" event) addEventHandler("onClientRender", root, drawWarning) -- Create a timer that makes sure the "onClientRender" handler gets removed when it expires. setTimer(removeEventHandler, 5000, 1, "onClientRender", root, drawWarning) blowVehicle(source) end end)
  4. AfuSensi

    Hi

    Never send your passwords to anyone. If anyone asks you for a password, you can count on it being a scam.
  5. You need a server that can run Node.js The repository also includes a readme that explains how you run it on your server. It's pretty straight-forward so try to follow it. If you have any questions, feel free to ask.
  6. Did you put # aa0000 or #aa0000? It should not include a space.
  7. If you follow the call chain, you will see a lot more vehicle dependencies. That's just the first place it checks for a vehicle.
  8. If you just want a cooldown you dont really need a timer for this. You can use getTickCount to keep track of time. (which does not create unnecessary timers) For example: local cooldownTime = 3 * 60 * 1000 -- Cooldown time in ms local lastHit -- Last time we hit the marker while out of cooldown function markerHitHandler() local currentTick = getTickCount() -- Check if the time between the current and last tick is smaller than our cooldown if lastHit and currentTick - lastHit <= cooldownTime then -- We are still on a cooldown so we stop the function execution outputChatBox("Still on cooldown") return else -- If we are not in cooldown, assign the current tick so that we can compare it in the future. lastHit = currentTick end openGUI() end addEventHandler("onClientMarkerHit", marker, markerHitHandler)
  9. I might be wrong but doesnt adding the color code render the color in the scoreboard? If so, just replace Admin with #aa0000Admin Just a tip though, this does not need to be on a timer. You can use event such as onPlayerLogin , onPlayerLogout and onPlayerJoin to set a player's Rank. This will prevent your server from running the same checks every 500 ms while also keeping it updated.
  10. Here's where it's defined: https://github.com/multitheftauto/mtasa-resources/blob/master/[gamemodes]/[race]/race/race_client.lua#L26 You can change the font by replacing `bankgothic` with another font name.
  11. I'm not sure how well this would work because the race resource is specifically built assuming players are in vehicles. This is where race handles checkpoint hits: https://github.com/multitheftauto/mtasa-resources/blob/master/[gamemodes]/[race]/race/race_client.lua#L700-L746 As you can see, it assumes a vehicle, and will return at if elem ~= g_Vehicle or isVehicleBlown(g_Vehicle) or getElementHealth(g_Me) == 0 or Spectate.active then return end
  12. Can you rephrase your question, i think the translator messed up.
  13. Truth - MTA Wiki Discord Bot Since i was in need for a wiki discord bot on a discord server, I decided to make one. I have also created a dashboard to manage the bot's setting on your guild. This bot is open source so feel free to submit PR's or issues. There is a new wiki coming soon(?), so i am planning to convert this bot to use the new version once it releases if there's no official wiki bot available at that time. I hope this bot can be of use to you. Features Wiki article fetching like on MTA's official discord Wiki article searching Function/Event examples Customizable bot output set via dashboard (hide syntax, hide description etc) Links https://truth.afusensi.xyz/ https://github.com/AfuSensi/truth-mta-wiki-bot
  14. AfuSensi

    Help script

    Try this: function rewardTimer(player) local player = source or player setTimer ( rewardOnRun, 10000, 1,player ) givePlayerMoney ( player, 3000 ) end addEventHandler ( "onPlayerSpawn", getRootElement(), rewardTimer ) function rewardOnRun(player) givePlayerMoney ( player, 3000 ) setTimer ( rewardTimer, 10000, 1,player ) end You did not give any argument to the rewardOnRun() function. This would make it work, although i am not sure what you are trying to do with the code.
×
×
  • Create New...