Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 25/11/19 in all areas

  1. After a worrying discussion on Discord last night regarding password storage and remember me functionality I've decided to write a tutorial on how it should be done. This guide assumes you are not using MTA's built in account system, but a custom one. Any code shown in this tutorial is purely for illustrative purposes, and is not finished code, you should use it as a guideline, not a solution. The following topics will be discussed in this tutorial: How to hash and salt passwords (register) How to validate a hashed password (login) How to add "remember-me" functionali
    1 point
  2. You're setting the target's amount of money to the player's (who's using the command) money + amount. You should set the target's money to the money that he has + amount. Therefore.. Add: local penz2 = getElementData(name,"char:money") or 0 And change: setElementData(name,"char:money",atg+penz) To setElementData(name,"char:money",atg+penz2)
    1 point
  3. Não mano, isso só funciona server-side. Troque o script para o type server.
    1 point
  4. .. And that was the reply from MrGreenGaming's owner. I agree with him, appeal denied
    1 point
  5. Aleks you don't deserve an unban any time soon. You did contribute a lot to MTA and our community, but you wasted it all. I hope you get more mature in the future, but for the past couple of years you did more harm than good. Also in your last ban appeal: https://mrgreengaming.com/forums/topic/20836-alekscore/ You said it yourself that you don't regret anything you did. Which isn't good intentions. Our answer is simply a NO
    1 point
  6. function setBlipsToTeamColor() for _,player in ipairs(getElementsByType("player")) do for _,blip in ipairs(getElementsByType("blip")) do local team = getPlayerTeam(player) if (team and getElementAttachedTo(blip) == player) then -- only if this blip is attached to `player` local r,g,b = getTeamColor(team) setPlayerNametagColor(player,r,g,b) setBlipColor(blip,r,g,b,255) end end end end setTimer(setBlipsToTeamColor,500,0) Also I've renamed the function since you should avoid naming your function with the same name as existing hardcoded
    1 point
×
×
  • Create New...