Jump to content

Search the Community

Showing results for tags 'name'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

Found 9 results

  1. local tag = -1 addEventHandler('onPlayerJoin', root, local tag = tag + 1 function(oldNick, newNick) name = getPlayerName(source) setPlayerName ( source, "Guest_".. tag ) end ) addEventHandler('onPlayerLogin', root, function () setPlayerName ( source, name ) end ) any idea how to make this work , i want to change the player name into guest_*** if he or she hasnt logged in , and when logged in i want the name to be changed back to name they joined from
  2. Hello guys, lemme explain about my problem.. I bought a new laptop, and when I installed MTA all worked fine, but when I join in a server I can't see players name.. I only see life bar and ''TAG'' like ''Admin'' or ''Police Officer'' it's a RPG server, but I can't see the name of those players.. PLEASE HELP ME GUYS :c I'm using Windows 10 and settings of Radeon in a laptop.. Thanks all
  3. I added this: to the nametag script.. but with 1-2 player working fine, and with more players, always show the chaticon.. How to fix this?
  4. ..this is not the full code from my nametag: when i press 'T', the chaticon appear on everybody.. how to fix this? i want, when a player, or me press 'T', the ballon show just on the player, or on me, not on everyplayers... sorry for my terrible english .. :c
  5. Hello I have a nametag script. And i have a chat-icon script too. But i want add the chat-icon thing to nametag script, above the player nametag. And do not appear for me, just another players. This is possible? If yes, how? Sorry for my bad english..
  6. Hello, i was making a blip event system, where the staff give a /eventoblip command, then a blip will be created above him on the MAP (F11), and when anonyone kills him it returns a message, then show the killer name for everyone in the server by outputchatbox, and give the killer items... I'm currently using mta dayz gamemode, the most part of the script is working perfectly fine, my error is: The script identify if the admin killed himself or if anyone killed the admin, but it doesn't identify the killer's name / account... It doesn't give the killer items and doesn't give the killer's name... The script: --function blip has paremeter: theplayer function blip (thePlayer) --variable accountname receive the value of the getaccountname of the player, to see the player login accountname = getAccountName(getPlayerAccount(thePlayer)) --if the player who triggered the blip function is a supermoderator or an admin then if isObjectInACLGroup("user." .. accountname, aclGetGroup("SuperModerator")) or isObjectInACLGroup("user." .. accountname, aclGetGroup("Admin")) then --output the message "special event - kill the adm identified as a $ on the map, the winner will get random items" outputChatBox ('#00BFFF==============================================================',getRootElement(),255,255,255,true) outputChatBox ('#00BFFF【 EVENTO ESPECIAL! 】#FFFFFF Mate o ADM identificado com o #098700cifrão ($) verde no mapa',getRootElement(),255,255,255,true) outputChatBox ('#FFFFFFO vencedor ganhará itens aleátorios!',getRootElement(),255,255,255,true) outputChatBox ('#00BFFF==============================================================',getRootElement(),255,255,255,true) --attach a "$" blip to the admin or supermod who started the event blip = createBlipAttachedTo (thePlayer,52,10) --set the admin data blood to 100 setElementData(thePlayer, "blood",100) --set the admin data blip event to true setElementData(thePlayer, "eventoblip",true) --set the max slots of the admin backpack to 350 setElementData(thePlayer, "MAX_Slots",350) end end --add the command /eventoblip that triggers the function blip addCommandHandler("eventoblip", blip) --table that determine what items the player will be given local itens = { {"Banana"}, {"Kiwi"}, {"Pizza"} } --function that calculates the size of the table itens above function tamanho( tabela ) local count = 0 for a in pairs( tabela ) do count = count + 1 end return count end -- function endevent has parameters: ammo, attacker, weapon, bodypart function fimdoevento(ammo, killer, weapon, bodypart) local getData = getElementData ( source, "eventoblip" ) -- quando o cara morrer , se o cara for o que tiver iniciado o evento, e o evento ainda tiver rolando if getData then -- se tiver um assassino entao if killer then local item = itens[math.random(tamanho(itens))][1] local quantidade = 1 destroyElement(blip) setElementData(source, "eventoblip",false) setElementData(killer, item , quantidade) setElementData(source, item, quantidade) outputChatBox ('#00a5ff==============================================================',getRootElement(),255,255,255,true) outputChatBox ('#00a5ff GETDATA TRUE',getRootElement(),255,255,255,true) outputChatBox ("#00a5ff Parabéns [#FF0000" .. getPlayerName(killer) .. "#00a5ff] matou o Staff e ganhou [#ff0000 "..quantidade.."x "..item.."#00a5ff]!",getRootElement(),255,255,255,true) outputChatBox ('#00a5ff==============================================================',getRootElement(),255,255,255,true) else destroyElement(blip) setElementData(source, "eventoblip",false) outputChatBox ('#00a5ff==============================================================',getRootElement(),255,255,255,true) outputChatBox ('#00a5ff O Staff #FF0000' .. getPlayerName(source) .. ' #00a5ff se matou, o evento irá reiniciar',getRootElement(),255,255,255,true) outputChatBox ('#00a5ff==============================================================',getRootElement(),255,255,255,true) end end end --add an event handler of type onplayerwasted, that triggers the fimdoevento (translating: endevent) function addEventHandler("onPlayerWasted", getRootElement(), fimdoevento) function finalizarevento(thePlayer) local pegaData = getElementData ( thePlayer, "eventoblip" ) accountname = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup("user." .. accountname, aclGetGroup("SuperModerator")) or isObjectInACLGroup("user." .. accountname, aclGetGroup("Admin")) then if pegaData then destroyElement(blip) setElementData(thePlayer, "eventoblip",false) removeElementData(thePlayer,"eventoblip") outputChatBox ('#00BFFF==============================================================',getRootElement(),255,255,255,true) outputChatBox ('#FF0000【 ATENÇÃO! 】#FFFFFF O Staff finalizou o evento.',getRootElement(),255,255,255,true) outputChatBox ('#FFFFFFO ele explicará o motivo em breve!',getRootElement(),255,255,255,true) outputChatBox ('#00BFFF==============================================================',getRootElement(),255,255,255,true) setElementData(thePlayer, "blood",12000) setElementData(thePlayer, "MAX_Slots",350) else outputChatBox ('#FFFFFFO Evento não está acontecendo !!!',thePlayer,255,255,255,true) end end end addCommandHandler("finalizareventoblip", finalizarevento) The meta.xml: <meta> <info author="Gabriel Bigardi" version="1.0" type="script" name="BLIP event"/> <script src="blip.lua" type="server" /> </meta> Thanks !!!
  7. i added this to a nametag script: dxDrawColorText (getElementHealth(player).."%", sx-w- (offset*-10), sy - (offset*5), sx, sy - (offset*-15), tocolor(255,255,255,255), textscale*NAMETAG_TEXTSIZE or (textscale*NAMETAG_TEXTSIZE)/1.5, srfont2, "center", "center", false, false, false ) and for example when long the playername, the "100%" move to left direction. How to fix this? sorry for my very-very bad English:c
  8. i have a plugin which makes the nametag appear above the player and the own player and everyone too should be able to see it but it wont work heres the code addEventHandler("onClientRender",getRootElement(), function() local px,py,pz,tx,ty,tz,dist px,py,pz = getCameraMatrix() for k,v in ipairs(getElementsByType("player")) do if (v~=getLocalPlayer()) then tx,ty,tz = getElementPosition(v) dist = math.sqrt((px-tx)^2 + (py-ty)^2 + (pz-tz)^2) if dist < 30.0 then if isLineOfSightClear(px,py,pz,tx,ty,tz,true,false,false,true,false,false,getLocalPlayer()) then local sx,sy,sz = getPedBonePosition(v,5) local x,y = getScreenFromWorldPosition(sx,sy,sz+0.3) if x then dxDrawText(getPlayerName(v),x,y,x,y,tocolor(150,50,0),0.85+(15-dist)*0.02,"bankgothic") end end end end end end )addEventHandler("onClientRender",getRootElement(), function() local px,py,pz,tx,ty,tz,dist px,py,pz = getCameraMatrix() for k,v in ipairs(getElementsByType("player")) do tx,ty,tz = getElementPosition(v) dist = math.sqrt((px-tx)^2 + (py-ty)^2 + (pz-tz)^2) if dist < 30.0 then if isLineOfSightClear(px,py,pz,tx,ty,tz,true,false,false,true,false,false,getLocalPlayer()) then local sx,sy,sz = getPedBonePosition(v,5) local x,y = getScreenFromWorldPosition(sx,sy,sz+0.3) if x then dxDrawText(getPlayerName(v),x,y,x,y,tocolor(150,50,0),0.85+(15-dist)*0.02,"bankgothic") end end end end end )
  9. Hi. I'm trying to create script which doing outputChatBox when GUY from name/serial will say smth on chat box. My code: serialhaza = { ["2B2BEE3C8B7C95BA25F714E7867557F2"] = true } function nahaza(thePlayer) local hazik = string.find(getPlayerName(thePlayer), "Haze", 1, true) if hazik or serialhaza[getPlayerSerial(thePlayer)]then outputChatBox("haz ciapaty pedal",thePlayer) end end addEventHandler("onPlayerChat",root,nahaza)
×
×
  • Create New...