Jump to content

turbodymacz1337

Members
  • Posts

    11
  • Joined

  • Last visited

Recent Profile Visitors

428 profile views

turbodymacz1337's Achievements

Square

Square (6/54)

0

Reputation

  1. I do not know if this is the right section that I have to post this, but if moderators find that it isn't the right section, move it to the right one. So, I have used compressed GTA:SA which is likely 500mb, I would like to know where can I find a clear and full GTA:SA for free. Post links in commends if you have any. Thanks in advance!
  2. Hello, I would like to ask how to make this code below saving a player mute after reconnect. function getPlayerFromPartialName(name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end function mmute ( message, messageType ) if ( getElementData ( source, "isPlayerMuted" ) ) == true then if (messageType == 0) or (messageType == 1) then cancelEvent() end end end -- attach it as a handler to onPlayerChat addEventHandler( "onPlayerChat", getRootElement(), mmute ) function muteCommand ( thePlayer , command , source ) local mutedPlayer = getPlayerFromPartialName ( source ) local source = mutedPlayer local muteData = getElementData( source, "isPlayerMuted" ) if ( hasObjectPermissionTo ( thePlayer, "function.setPlayerMuted", true ) ) then if ( mutedPlayer ) then if ( muteData == false ) then if getElementType ( mutedPlayer ) == "player" then setElementData ( source, "isPlayerMuted", true ) outputChatBox ( getPlayerName(source).. "#ff0000 has been mainchat muted by " .. getPlayerName(thePlayer) , root, 255, 0, 0, true ) end else outputChatBox ( "Player is already muted!", thePlayer, 255, 0, 0, true ) end elseif not mutedPlayer then outputChatBox ( "Mute a player from main chat by writing /mmute [part of the player name]", thePlayer, 255, 0, 0 ) -- Tell the player the proper syntax end else outputChatBox ( "You can't do that!", thePlayer, 255, 0, 0, true ) end end addCommandHandler ( "mmute" , muteCommand ) function unmuteCommand ( thePlayer, command, source ) local mutedPlayer = getPlayerFromPartialName ( source ) local source = mutedPlayer local muteData = getElementData( source, "isPlayerMuted" ) if ( hasObjectPermissionTo ( thePlayer, "function.setPlayerMuted", true ) ) then if ( mutedPlayer ) then if ( muteData == true ) then if getElementType ( mutedPlayer ) == "player" then setElementData ( source, "isPlayerMuted", false ) outputChatBox ( getPlayerName(source).. "#00ff00 has been mainchat unmuted by " .. getPlayerName(thePlayer) , root, 0, 255, 0, true ) end else outputChatBox ( "Player is not muted!", thePlayer, 255, 0, 0, true ) end elseif not mutedPlayer then outputChatBox ( "Unmute a player from main chat by typing /unmmute [part of the player name]", thePlayer, 255, 0, 0 ) -- Tell the player the proper syntax end else outputChatBox ( "You can't do that!", thePlayer, 255, 0, 0, true ) end end addCommandHandler ("unmmute" , unmuteCommand )
  3. I got a code that mutes main chat for all players in server, I want to make it using a command and mute a player from using main chat, not all players.. local chat = true function chatDis(thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then outputChatBox("#ff0000Main chat has been disabled by "..getPlayerName(thePlayer)..".",root,255, 255, 255, true) chat = false end end addCommandHandler("chatoff", chatDis) function chatEn(thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then outputChatBox("#ff0000Main chat has been enabled by "..getPlayerName(thePlayer)..".",root,255, 255, 255, true) chat = true end end addCommandHandler("chaton", chatEn) function onChat ( _, messageType ) if ( messageType == 0 and not chat ) then cancelEvent ( ) end end addEventHandler ( "onPlayerChat", root, onChat )
  4. I would like to ask for a help about mute system that uses command to mute a player in local chat only. Plenty of clanwar servers are using it, I will give you an example of the script. It works like normal mute system but you do it like; /lmute <playername> This command disable local chat for you and you will be able to use ONLY teamchat.
  5. Hello everybody! I will mainly talk about createTrayNotification. My idea is creating notification when your game is minimized and round starts, the aim of this script would be reminding you that round starts when you have MTA:SA minimized. As I am very new of scripting stuff, I would like to give me some tips or something more than tips so I can accomplish that script. Thanks in advance!
  6. Where do I find (TEAM) script, I want to change some colors but couldn't find where is team chat script located.
  7. Hello community,I would like to ask you about issue that I have never experienced before;ERROR: Loading script failed: [xx]\xx\cxxxxxe.lua:1: malformed number near '0local'Any suggestions? Any solutions?
  8. Hello everybody! A friend of mine told me of existing another kind of protection related to meta.xml file. Basic job of this protection is based on author="turbodymacz" attribute.. using a lua code that detects if author is turbodymacz, if author field contains my name then script is starting normally, but if somebody tries to steal my script and trying to change the author to his name then script doesn't start. Can somebody at least explain me what functions/events should I use to form such script, or at least write the code if that's possible & faster.
×
×
  • Create New...