Jump to content

-.Paradox.-

Members
  • Posts

    1,239
  • Joined

  • Last visited

Everything posted by -.Paradox.-

  1. This one but i don't want to create a gang for each gang chat, only when i invite player, automatically add me and him to the gang chat without creating a gang or something like that, thanks for help!
  2. Sorry, one thing, is there a way to make this? When i invite a player to gang Chat it automatically add me and him in the chat, thanks.
  3. Not working, when i kill somebody my rep is still the same (normal) and i still got 0, i got no errors in debugscript 3
  4. okay i will try it, and sorry i was busy this day, because it's my birthday and i'm planning for a party
  5. -.Paradox.-

    Reasons

    viewtopic.php?f=148&t=65664
  6. Thanks man its working
  7. I want make it like a group pm if you know what i mean
  8. I have a problem, when i invite a player, i can't use gangChat but he can use them, i want to both can talk in the gang chat, like a pm chat box
  9. Okay thanks gonna try
  10. Does this depend many gang chats? I mean if i have a gang chat with player 1 then player2 and player3 can have their own gang chat too like example
  11. But how to check if the player is invited or not? If the player is invited he can use the chat, if not he cant use the chat or see the chat.
  12. Thanks working, but is there a way to lt only people who get invited can talk in gang chat? like example /invite randomplayer then we are the only players who can talk in gang chat and other people can't see I edited the code to keep showing player name addEventHandler ( "onResourceStart", resourceRoot, function ( ) for _, player in ipairs ( getElementsByType ( "player" ) ) do -- Loop all the players. bindKey ( player, "U", "down", "chatbox", "gangChat" ) -- Bind the key "U" to the "GangChat" command. end end ) addEventHandler ( "onPlayerJoin", root, function ( ) bindKey ( source, "U", "down", "chatbox", "gangChat" ) -- Bind the key "U" to the "GangChat" command. end ) function gangChat ( thePlayer, _, ... ) local text = table.concat ( { ... }, " " ) if ( #text > 0 ) then outputChatBox ("#FF32AA (GANG) "..getPlayerName(thePlayer)..": #FFFFFF" ..text, thePlayer, 255, 255, 255, true ) end end addCommandHandler ( "gangChat", gangChat )
  13. No, you don't understand, I want to create a new chat like team chat. I will name it gang chat. I need just functions to create it, or an example...
  14. creating a new chat system
  15. -.Paradox.-

    New Chat

    Hello guys, does anybody know how to create a new chat? or edit the old chats? Like example Gang chat, thanks for help.
  16. textures = { ["name"] = id, ["name"] = id, ["name"] = id, } function replaceClothes() for cloth, id in pairs(textures) do local txd = engineLoadTXD (cloth..".txd") engineImportTXD(txd, id) end end addEventHandler ("onClientResourceStart", resourceRoot, replaceClothes) https://wiki.multitheftauto.com/wiki/Cl ... ponent_IDs Every clothing component has an id next to it.
  17. Thanks @WhoAmI i didn't think about you're solution, Here are some pics And @WASSIm. My code has no errors and working fine, i won't use you're script.
  18. My XP/Level script is working fine.
  19. Exactly, that's what i want, let me try it
  20. -.Paradox.-

    dxDraw

    Hey guys, i made a XP/Level System, and i want to make an image for every level, like example if player is Level 1 then draw "lvl_1.png" image near the XP/Level hud text, i know how to use dxDrawImage, but the problem is the rank icon, my Level system is based on setElementData("Level"), setElementData("XP"), setAccountData(theAccount, "LV", getElementData(thePlayer, "Level")), setAccountData (theAccount, "EXP", getElementData(thePlayer, "XP")) And maybe an image would help, Thanks for help have a great day Those are my codes; That's my XP/Level script function win(killer, weapon, bodypart) if (killer and getElementType(killer) == "player" and killer ~= source) then local H = getElementData(killer, "XP") or 0 local S = getElementData(killer, "Level") local killer1 = getPlayerName(killer) local noob = getPlayerName(source) local X = 5 setElementData(killer, "XP", tonumber(H)+X) local H = tonumber(H) + X if tonumber(H) == 100 then setElementData(killer, "Level", "LV 1") elseif tonumber(H) == 400 then setElementData(killer, "Level", "LV 2") elseif tonumber(H) == 600 then setElementData(killer, "Level", "LV 3") elseif tonumber(H) == 800 then setElementData(killer, "Level", "LV 4") elseif tonumber(H) == 1000 then setElementData(killer, "Level", "LV 5") elseif tonumber(H) == 1200 then setElementData(killer, "Level", "LV 6") elseif tonumber(H) == 1400 then setElementData(killer, "Level", "LV 7") elseif tonumber(H) == 1600 then setElementData(killer, "Level", "LV 8") elseif tonumber(H) == 1800 then setElementData(killer, "Level", "LV 9") elseif tonumber(H) == 2000 then setElementData(killer, "Level", "LV 10") end end end addEventHandler( "onZombieWasted", getRootElement(), win) function onLogin (_,account) setElementData(source, "Level", getAccountData(account, "LV") or "LV 0") setElementData(source, "XP", getAccountData(account, "EXP") or "0") end addEventHandler ("onPlayerLogin", root, onLogin) function saveData(thePlayer, theAccount) local theAccount = getPlayerAccount(source) 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) addCommandHandler ( "setxp", function ( thePlayer, _, who, XP ) local XP = tonumber ( XP ) or 0 local ThePlayer = getPlayerFromName ( who ) if ( ThePlayer ) then setElementData( ThePlayer,"XP",XP ) end end ) That's what i tried to draw a rank icon CLIENT: addEventHandler ( "onClientRender", root, function ( ) local Rankicon = getElementData ( localPlayer, "rank.icon" ) if ( Rankicon and fileExists ( rank ) ) then dxDrawImage(1173, 265, 36, 41, Rankicon, 0, 0, 0, tocolor(255, 255, 255, 255), true) end end ) SERVER: addEventHandler ( "onPlayerJoin", root, function ( ) setElementData ( source, "rank.icon",":Ranks\\rank\\rank_0.png" ) end ) addEventHandler ( "onPlayerLogin", root, function ( _, acc ) local accName = getAccountName ( acc ) local LV = getAccountData(acc, "LV") if (LV == 0) then setElementData ( source, "rank.icon", ":Ranks\\rank\\rank_0.png" ) elseif (LV == 1) then setElementData ( source, "rank.icon", ":Ranks\\rank\\rank_1.png" ) elseif (LV == 2) then setElementData ( source, "rank.icon", ":Ranks\\rank\\rank_2.png" ) elseif (LV == 3) then setElementData ( source, "rank.icon", ":Ranks\\rank\\rank_3.png" ) elseif (LV == 4) then setElementData ( source, "rank.icon", ":Ranks\\rank\\rank_4.png" ) elseif (LV == 5) then setElementData ( source, "rank.icon", ":Ranks\\rank\\rank_5.png" ) elseif (LV == 6) then setElementData ( source, "rank.icon", ":Ranks\\rank\\rank_6.png" ) elseif (LV == 7) then setElementData ( source, "rank.icon", ":Ranks\\rank\\rank_7.png" ) elseif (LV == 8 ) then setElementData ( source, "rank.icon", ":Ranks\\rank\\rank_8.png" ) elseif (LV == 9) then setElementData ( source, "rank.icon", ":Ranks\\rank\\rank_9.png" ) elseif (LV == 10) then setElementData ( source, "rank.icon", ":Ranks\\rank\\rank_10.png" ) else setElementData ( source, "rank.icon", ":Ranks\\rank\\rank_0.png" ) end end )
×
×
  • Create New...