Jump to content

Paper

Members
  • Posts

    127
  • Joined

  • Last visited

Everything posted by Paper

  1. E' semplice, nel file race_client c'è la riga 26: mapdisplay = dxText:create('Map: none', 2, screenHeight - dxGetFontHeight(0.7, 'bankgothic')/2, false, 'bankgothic', 0.7, 'left') questa riga crea il testo "Map: asdasdad" di default nella race, poi nel corso del file utilizza il nome "mapdisplay" per settare la scritta, voi dovete fare copia e incolla con questa riga però modificando le coordinate e il testo e copia e incolla anche con le altre righe per settare il testo, non è difficile
  2. provalo come cartella normale e non come zip...
  3. Oh, i understand... if 50p will make something like in VS this editor will be very cool
  4. You inserted wrong path for libreadline.so.5 file or it doesn't exists , and the deathmatch.so file is corrupted, get another one and repleace it ^^
  5. Paper

    Stats

    function DestructionWin( ) local alivePlayers = getAlivePlayers( ) if #alivePlayers == 1 then local account = getPlayerAccount( alivePlayers[1] ) local wins = getAccountData( account,"Race Wins" ) or 0 if account then if isGuestAccount( account ) then return end setAccountData( account,"Race Wins", wins + 1 ) end local playername = getPlayerName( alivePlayers[1] ) outputChatBox ( "#FFA824The player " .. playername .. " won!", root, 255, 255, 255, true ) end end addEventHandler( "onPlayerWasted", root, function( ) local account = getPlayerAccount( source ) local loses = getAccountData( account,"Race Loses" ) or 0 if account then if isGuestAccount( account ) then return end setAccountData( account,"Race Loses", loses + 1 ) end end ) function updateRatio (thePlayer) local account = getPlayerAccount( theplayer ) if account then if isGuestAccount( account ) then return end local wins = getAccountData( account, "Race Wins" ) or 0 local loses = getAccountData( account, "Race Loses" ) or 0 if loses == 0 then setAccountData(account, "ratio", "-") else local kdr = round( wins / loses, 2) setAccountData(account, "ratio", kdr) end end end function publicstatsinfo( ) if isElement( source ) then local account = getPlayerAccount( source ) if account then if isGuestAccount( account ) then return end local askdname = getPlayerName( source ) local wins = getAccountData( account, "Race Wins" ) or 0 local loses = getAccountData( account, "Race Loses" ) or 0 local ratio = getAccountData( account, "Ratio" ) or N/A if loses and wins then outputChatBox("#FFA824*" .. askdname .. " won " .. tostring( wins ) .. " times and he lost " ..tostring( loses ).. " times, his ratio is " .. tostring( ratio ) .. "%", root, 255, 12, 15, true) else outputChatBox("#FFA824*" .. askdname .. " doesen't losed or won " , root, 255, 12, 15, true) end end else outputChatBox( "Error source is not player" ) end end addEvent( "stats", true ) addEventHandler( "stats", root, publicstatsinfo ) function checkCommand( message, messageType ) if messageType == 0 then if message == "!stats" then triggerEvent( "stats", source ) elseif message == "!st" then triggerEvent( "stats", source ) cancelEvent( ) end end end addEventHandler( "onPlayerChat", root, checkCommand ) function getPlayerFromNamePart(Name) local thePlayer = getPlayerFromName(thePlayerName) if thePlayer then return thePlayer end for _,thePlayer in ipairs(getElementsByType("player")) do if string.find(string.gsub(getPlayerName(thePlayer):lower(),"#%x%x%x%x%x%x", ""), thePlayerName:lower(), 1, true) then return thePlayer end end return false end restriction = {} addCommandHandler("stats", function (thePlayer, cmd, whoToCheck) local playerName = getPlayerName(thePlayer) if restriction[playerName] then outputChatBox("#FFA824You have to wait 30 seconds", thePlayer, 255, 0, 0, true) else restriction[playerName] = true setTimer(restrictionEnd, 30000, 1, playerName) local player = getPlayerFromNamePart( whoToCheck ) if (player) then local account = getPlayerAccount( player ) if account then if isGuestAccount( account ) then return end local wins = getAccountData( account, "Race Wins" ) or 0 local loses = getAccountData( account, "Race Loses" ) or 0 ratio = (tonumber(wins)/tonumber(loses))*10 or N/A outputChatBox("#FFA824*[sTATS] Player's "..tostring(player).." stats : " , root, 255, 12, 15, true) if wins then outputChatBox("#FFA824*Wins: "..tostring(wins).."!", root, 255, 12, 15, true) else outputChatBox("#FFA824*Wins: 0 !" , root, 255, 12, 15, true) end if loses then outputChatBox("#FFA824*Loses: "..tostring(loses).."!", root, 255, 12, 15, true) else outputChatBox("#FFA824*Loses: 0 !", root, 255, 12, 15, true) end if ratio then outputChatBox("#FFA824*Ratio: "..tostring(ratio).."% !", root, 255, 12, 15, true) else outputChatBox("#FFA824*Ratio: - %", root, 255, 12, 15, true) end end else outputChatBox( "Player not found!" ) end end end) function restrictionEnd(playerName) restriction[playerName] = nil end I've changed your getPlayerFromNamePart whit another one better ^^
  6. Paper

    Stats

    For calculate the ratio you can use this function(need the round function): function calcRatio(val1, val2) if (val1) and (val2) then local val1= tonumber(val1) local val2 = tonumber(val2) if (val1) and (val2) then if not (val1 == 0) and not (val2 == 0) then if (val1 >= val2) then return 100 end local ratio = round(((val1/val2)*100)) return ratio else return 0 end else return false end else return false end end
  7. Maybe you mean that some functions doesn't work?
  8. post your code ._. Do you see any error in /debugscript 3?
  9. Paper

    Nitrobar

    that was my idea ^^
  10. Paper

    Sounds.

    no... i saw just the BASS ERROR 2 in the console... and not the error in the debug script
  11. Paper

    Sounds.

    But i should see an error in the debug script saying the path is not correct
  12. Paper

    Sounds.

    Oh... my bad, thanks D:
  13. Paper

    Sounds.

    <meta> <info author="Paper" description="" name="asd" version="1.0" type="script" /> <file src="sounds/misc/heart_beat.wav" type="client" /> <script src="core.lua" /> </meta>
  14. Paper

    Sounds.

    I'm not afraid to post it lol function checkLowHP() if getElementHealth(getLocalPlayer()) <= 20 then playSound("misc/heart_beat.wav") end end setTimer(checkLowHP, 1000, 0)
  15. Paper

    Sounds.

    The meta is correct and the script is a simple playSound functions T_T
  16. Paper

    Sounds.

    Yes, i'm doing so D:
  17. Paper

    Sounds.

    in the /debugscript 3 nothing, but i see this in the console:
  18. Paper

    Sounds.

    of course T_T
  19. Paper

    Sounds.

    I've the same problem of #DaMiAnO
  20. Paper

    Nitrobar

    He can use timers, nitro durations i definied, but i don't remember it
  21. Paper

    Sounds.

    I have this problem too, have you solved it?
  22. I... love... you *-*
  23. Paper

    Nitrobar

    you must modify the race scripts for make the bar relative to the nitro and if you want you can change the image ^^
  24. Paper

    Help ..

    I don't understand your problem... explain it better, please ^^
  25. Paper

    Teleports

    Have you inserted the xml file in the meta? And this: setElementPosition(getLocalPlayer(),tostring(poX),tostring(poY),tostring(poZ)) should be like this: setElementPosition(getLocalPlayer(),tonumber(poX),tonumber(poY),tonumber(poZ)) Look @ line 19 put this: if (guiGetVisible(GUIEditor_Window[1])) then
×
×
  • Create New...