Jump to content

JR10

Retired Staff
  • Posts

    2,947
  • Joined

  • Last visited

Everything posted by JR10

  1. No, this way you will add it on every kill. Add it on resource start.
  2. When you spectate, you don't see any names, unless there is a script for it. And why when you die, unless you are talking about the race, which is exactly what Actiano said.
  3. client: addEvent ( "playSound" , true ) addEventHandler ( "playSound" , root , function() playSound ( "levelup.mp3" , false ) end) server: function rewardOnWasted ( killer ) local exp = getElementData(killer,"exp") if exp then setElementData(killer,"exp",tonumber(getElementData(killer,"exp"))+5) outputChatBox("Experience gained +5! total ".. tonumber(exp)+5,killer,0,255,0) triggerClientEvent ( killer , "playSound" , killer ) else setElementData(killer,"exp",5) triggerClientEvent ( killer , "playSound" , killer ) end end addEventHandler ( "onPlayerWasted", getRootElement(), rewardOnWasted ) Can't you try something yourself first? And why are you adding onPlayerWasted. It exists already.
  4. Read the topic again, the problem is applying it to one vehicle. Which I think is not possible.
  5. JR10

    Smoothly

    onClientRender.
  6. JR10

    Smoothly

    fadeInTimer = setTimer(function () if barX ~= -180 then barX = barX - 1 end end, 50, 180)
  7. Then it should be: SecondsToMS And setTimer is still wrong. should be: function SecondsToMS( Seconds ) local MS = tonumber ( Seconds ) * 1000 return MS end setTimer( function ( ) outputChatBox("test") end, SecondsToMS( 5) , 1 )
  8. Wrong calculation, and setTimer arguments are wrong.
  9. function convertMSToSeconds ( MS ) local seconds = tonumber ( MS ) / 1000 return seconds end What you did is correct too.
  10. Dude, I said divide it. Milliseconds / 1000
  11. What? Just divide the milliseconds. milliseconds / 1000
  12. It works, I tested it. You probably did something wrong, post the meta.
  13. I bet he doesn't know a "thing" about scripting.
  14. Best what? Seriously? Why don't you prove it, and post something you made.
  15. Ehmm, Umm, can you post something you made, well you just made an account, don't proove that you are "A Very Experienced Scripter"
  16. Use /debugscript 3. EDIT: I tested it and figured out the problem. addEventHandler ( "onClientRender" , root , function ( ) local pX , pY , pZ = getPedBonePosition ( localPlayer , 8 ) local pname = getPlayerName ( localPlayer ) if pname:find ( "#%x%x%x%x%x%x" ) then local hexColor = pname:match ( "#%x%x%x%x%x%x" ) pname = pname:gsub ( "#%x%x%x%x%x%x" , "" ) local r , g , b = getColorFromString ( hexColor ) local x , y = getScreenFromWorldPosition ( pX , pY , pZ + 0.5 ) dxDrawText ( pname , x , y , x , y , tocolor ( r , g , b , 255 ) , 2 , "default" , "center" , "center" ) else local r , g , b = getPlayerNametagColor ( localPlayer ) local x , y = getScreenFromWorldPosition ( pX , pY , pZ + 0.5 ) dxDrawText ( pname , x , y , x , y , tocolor ( r , g , b , 255 ) , 2 , "default" , "center" , "center" ) end end) function getColorFromString(hex) hex = hex:gsub("#","") return tonumber("0x"..hex:sub(1,2)), tonumber("0x"..hex:sub(3,4)), tonumber("0x"..hex:sub(5,6)) end
  17. In a client side script.
  18. JR10

    Saving Teams?

    bandi, his problem isn't that, he already did this, and the code he posted is just the functions he used. As he said. I faced problems before with saving the team, but when I used names, it got solved.
  19. MOJRM, his English is better than yours will ever will be.
  20. JR10

    Saving Teams?

    local team = getAccountData (theCurrentAccount, "team") if (team) then setPlayerTeam(source, getTeamFromName ( team )) --and local team = getPlayerTeam(source) if (team) then setAccountData(account, "team", getTeamName ( team ))
×
×
  • Create New...