Jump to content

-.Paradox.-

Members
  • Posts

    1,239
  • Joined

  • Last visited

Everything posted by -.Paradox.-

  1. Thanks for you're help...but still same error, help please.
  2. Hello, its me again, i have this script exports.scoreboard:addScoreboardColumn('Rank',getRootElement(),1,40,' ') function scoreLevel () local account = getPlayerAccount(source) local Level = getAccountData(account, "LV") if isGuestAccount ( account ) then setElementData(source, "Rank",":experience\\ranks\\lvl_0.png") else setElementData(source, "Rank", tostring(":experience\\ranks\\lvl_"..Level..".png" )) end end addEventHandler("onPlayerSpawn", getRootElement(), scoreLevel) addEventHandler("onResourceStart",getResourceRootElement(getThisResource()),function() call(getResourceFromName("scoreboard"),"addScoreboardColumn","Rank", getRootElement(), 1, 40) end ) & im trying to add a dxImage to the screen but wont work if Level and fileExists ( ":experience\\ranks\\lvl_"..Level..".png" ) then size = dxGetFontHeight((0.7/1366)*sWidth, "bankgothic") dxDrawImage((557/1024)*sWidth, (666/768)*sHeight, size, size, ":experience\\ranks\\lvl_"..Level..".png") end When i do /debugscript 3 it show this error ERROR: newhud/hud.lua:59: attempt to concatenate local 'Level' (a boolean value) Can somebody tell me what i have to do?
  3. ..... dxDrawImage in Nametag.lua not the server side script.
  4. Not working please help
  5. Still can't understand ._. can you show me a lua example?
  6. Can't understand, can you explain to me more?
  7. Like that? addEventHandler("onPlayerLogin", root, function ( thePlayer ) local accName = getAccountName ( getPlayerAccount ( source ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then setElementData(source, "Classicon", tostring(":experience\class\classicon_admin.png" )) end if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Moderator" ) ) then setElementData(source, "Classicon", tostring(":experience\class\classicon_mod.png" )) end if isGuestAccount ( account ) then setElementData(source, "Classicon",":experience\class\classicon_player.png") end end And thank you
  8. I tryed to make it but i guess there is something missing, here is the code addEventHandler("onPlayerLogin", root, function ( thePlayer ) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then setElementData(source, "Classicon", tostring(":experience\Class\Classicon_admin.png" )) end if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Moderator" ) ) then setElementData(source, "Classicon", tostring(":experience\Class\Classicon_mod.png" )) end if isGuestAccount ( account ) then setElementData(source, "Classicon",":experience\Class\Classicon_player.png") end end
  9. replace this ['حيآكم'] = 'سبحان الله', ['gay' = ['insult not allowed.' with ['حيآكم'] = ['سبحان الله'], ['gay'] = ['insult not allowed.']
  10. I'm not using a client side script.
  11. Play sound not working..
  12. Open admin> resources tab> scoreboard> settings> Allow colorcoded names> set it to true.
  13. Not working, i tried making it myself but it show an error here is the code local levels = {[100] = 1, [300] = 2, [500] = 3, [700] = 4, [1000] = 5, [1800] = 6, [2900] = 7, [5000] = 8, [9999] = 9, [20000] = 10} function win(ammo, killer, weapon, bodypart) if (killer and killer ~= source) then local H = getElementData(killer, "XP") local S = getElementData(killer, "Level") local killer1 = getPlayerName(killer) local noob = getPlayerName(source) setElementData(killer, "XP", tonumber(H)+math.random ( 5, 35 ) ) if levels[tonumber(H)] then setElementData(killer, "Level", "Lvl ".. tostring(levels[tonumber(H)]) .." !") triggerClientEvent ( killer, "playSound", killer ) end end end addEventHandler( "onPlayerWasted", getRootElement(), win) function onLogin (_,account) setElementData(source, "Level", getAccountData(account, "LV") or "0") setElementData(source, "XP", getAccountData(account, "EXP") or "0") end addEventHandler ("onPlayerLogin", root, onLogin) function onJoin (_,account) if isGuestAccount ( account ) then setElementData(source, "Level","0") setElementData(source, "XP","0") end end addEventHandler ("onPlayerJoin", root, onJoin) function saveData(thePlayer, theAccount) if (theAccount and not isGuestAccount(theAccount)) then setAccountData (theAccount, "LV", getElementData(thePlayer, "Level")) setAccountData (theAccount, "EXP", getElementData(thePlayer, "XP")) end end addEventHandler ("onPlayerQuit", root, function () saveData(source, getPlayerAccount(source)) end) addEventHandler ("onPlayerLogout", root, function (prev) saveData(source, prev) end) thats the error experience/server.lua:25:Bad argument @ 'isGuestAccount' [Expected account at argument 1,got nil]
  14. Can somebody help me 
  15. Hello, can somebody help me here, if player is guest and not logged in his XP must be 0 And play sound when level up thanks for helping here is the script. Server.lua exports.scoreboard:scoreboardAddColumn("XP") exports.scoreboard:scoreboardAddColumn("Level") local levels = {[100] = 1, [300] = 2, [500] = 3, [700] = 4, [1000] = 5, [1800] = 6, [2900] = 7, [5000] = 8, [9999] = 9, [20000] = 10} function win(ammo, killer, weapon, bodypart) if (killer and killer ~= source) then local H = getElementData(killer, "XP") local S = getElementData(killer, "Level") local killer1 = getPlayerName(killer) local noob = getPlayerName(source) setElementData(killer, "XP", tonumber(H)+math.random ( 5, 35 ) ) if levels[tonumber(H)] then setElementData(killer, "Level", "Lvl ".. tostring(levels[tonumber(H)]) .." !") triggerClientEvent ( killer, "playSound", killer ) end end end addEventHandler( "onPlayerWasted", getRootElement(), win) function onLogin (_,account) setElementData(source, "Level", getAccountData(account, "LV") or "0 ") setElementData(source, "XP", getAccountData(account, "EXP") or "0") end addEventHandler ("onPlayerLogin", root, onLogin) function saveData(thePlayer, theAccount) if (theAccount and not isGuestAccount(theAccount)) then setAccountData (theAccount, "LV", getElementData(thePlayer, "Level")) setAccountData (theAccount, "EXP", getElementData(thePlayer, "XP")) end end addEventHandler ("onPlayerQuit", root, function () saveData(source, getPlayerAccount(source)) end) addEventHandler ("onPlayerLogout", root, function (prev) saveData(source, prev) end)
  16. Ok, i sent my script in pm, check it if there is an error tell me.
  17. -.Paradox.-

    Money

    He is right, try this one server.lua local killerMoney = 1000 --Amount of money when you kill somebody. local deadPlayerMoney = 1000 --Amount of money you lose when you die. local joinMoney = 1000 --Amount of money you earn when you join the server. function spawnOnJoin() givePlayerMoney(source, joinMoney) end function spawnOnDead(ammo, killer, weapon, bodypart) takePlayerMoney(source, deadPlayerMoney) if (killer) and (killer ~= source) then givePlayerMoney(killer, killerMoney) end end addEventHandler("onPlayerJoin", getRootElement(), spawnOnJoin) addEventHandler("onPlayerWasted", getRootElement(), spawnOnDead)
  18. Post level script or send me in skype.
  19. -.Paradox.-

    Blip

    local blip = { } addEvent ( "onPlayerTeamChanged", true ) addEventHandler ( "onPlayerTeamChanged", root, function ( theTeam ) if ( not theTeam ) then return end if ( not isElement ( blip [ source ] ) ) then blip [ source ] = createBlipAttachedTo ( source ) end local r, g, b = getTeamColor ( theTeam ) setPlayerNametagColor ( source, r, g, b ) setBlipColor ( blip [ source ], r, g, b, 255 ) end ) addEventHandler ( "onPlayerQuit", root, function ( ) if isElement ( blip [ source ] ) then destroyElement ( blip [ source ] ) end end )
×
×
  • Create New...