Jump to content

Chaos

Members
  • Posts

    300
  • Joined

  • Last visited

Everything posted by Chaos

  1. it's said nemesi bot is not in a team.
  2. what is the point of that function ? i don't know how to use it
  3. they still don't get in team
  4. i tired that but it's not worked
  5. Team = createTeam('Test',255,0,0) function boss ( ) nemesi = exports [ "slothBot" ]:spawnBot ( 1193.314453125, -2038.7626953125, 69.0, 90, 1, 0, 0, Nemesis, 38, "hunting", true ) nemesi1 = exports [ "slothBot" ]:spawnBot ( 1174.3984375, -2045.65234375, 69.0, 90, 1, 0, 0, Nemesis, 38, "hunting", true ) nemesi2 = exports [ "slothBot" ]:spawnBot ( 1155.3125, -2021.0068359375, 69.0, 90, 1, 0, 0, Nemesis, 38, "hunting", true ) nemesi3 = exports [ "slothBot" ]:spawnBot ( 1137.0380859375, -2037.9990234375, 69.0, 90, 1, 0, 0, Nemesis, 38, "hunting", true ) setBotTeam ( nemesi ,Team ) setBotTeam ( nemesi1,Team ) setBotTeam ( nemesi2 ,Team ) setBotTeam ( nemesi3 ,Team ) end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), boss ) is that correct ?
  6. hi there when i create 4 bots and set them mode hunting they will kill each others i don't want to kill each others is that possible??
  7. ah i just restarted my server and it's worked thanks TAPL
  8. no my name Chaos with out hex color
  9. i just added full name /ac Chaos and it's not worked
  10. [2013-08-27 07:16:40] WARNING: account\s.lua:4: Bad argument @ 'getPlayerAccount' [Expected element at argument 1, got boolean] [2013-08-27 07:16:40] WARNING: account\s.lua:4: Bad argument @ 'getAccountName' [Expected account at argument 1, got boolean] [2013-08-27 07:16:40] WARNING: account\s.lua:5: Bad argument @ 'triggerClientEvent' [Expected string at argument 1, got nil] [2013-08-27 07:16:40] WARNING: account\s.lua:4: Bad argument @ 'getPlayerAccount' [Expected element at argument 1, got boolean] [2013-08-27 07:16:40] WARNING: account\s.lua:4: Bad argument @ 'getAccountName' [Expected account at argument 1, got boolean] [2013-08-27 07:16:40] WARNING: account\s.lua:5: Bad argument @ 'triggerClientEvent' [Expected string at argument 1, got nil] Server side: function showaccountname (player, cmd, target) local target = getPlayerFromNamePart(target) local accName = getAccountName ( getPlayerAccount ( target ) ) outputChatBox ("Name: "..getPlayerName(target).. " , Account Name: "..accName,player,255, 255, 0 ) triggerClientEvent(player, "copytoclipboard", player, accName) end addCommandHandler ( "ac", showaccountname ) function getPlayerFromNamePart(name) if name then for i, player in ipairs(getElementsByType("player")) do if string.find(getPlayerName(player):lower(), tostring(name):lower(), 1, true) then return player end end end return false end Client side: addEvent("copytoclipboard", true) addEventHandler("copytoclipboard", root, function (accName) setClipboard (accName) end)
  11. is that correct? Server side: function showaccountname (player, cmd, target) local target = getPlayerFromNamePart(target) local accName = getAccountName ( getPlayerAccount ( target ) ) outputChatBox ("Name: "..getPlayerName(target).. " , Account Name: "..accName,player,255, 255, 0 ) triggerClientEvent(player, "copytoclipboard", player) end addCommandHandler ( "ac", showaccountname ) Client side: addEvent("copytoclipboard", true) addEventHandler("copytoclipboard", root, function () setClipboard (accName) end)
  12. hi, how can i add this function setClipboard ? function showaccountname (player, cmd, target) local target = getPlayerFromNamePart(target) local accName = getAccountName ( getPlayerAccount ( target ) ) outputChatBox ("Name: "..getPlayerName(target).. " , Account Name: "..accName,player,255, 255, 0 ) end addCommandHandler ( "ac", showaccountname ) function getPlayerFromNamePart(name) if name then for i, player in ipairs(getElementsByType("player")) do if string.find(getPlayerName(player):lower(), tostring(name):lower(), 1, true) then return player end end end return false end
  13. Chaos

    help

    well i did fixed it i just changed the http port thanks solid.
  14. thank you very much it's worked finally
  15. what should i put with quotes?
  16. local mutedSerials = { } function muteSomeone ( player, cmd, target, reason, time ) if ( target and reason and time ) then local target = getPlayerNameFromNamePart("target") if ( not isElement ( target ) ) then outputChatBox ( "There is no player with this name", player, 255, 255, 0 ) return end local time = tonumber ( time ) if ( time and time >= 1 and not isPlayerMuted ( target ) ) then local milliseconds = math.floor ( time * 60000 ) outputChatBox ( getPlayerName ( target ) .." has been muted for ".. tostring ( time ) .." minutes (".. reason ..") .", root, 255, 0, 0 ) setPlayerMuted ( target, true ) setTimer ( setPlayerMuted, milliseconds, 1, target, false ) mutedSerials [ getPlayerSerial ( target ) ] = milliseconds else outputChatBox ( "Syntax: /mmute player reason time and player cannot be muted", player, 255, 255, 0 ) end end end addCommandHandler ( "mmute", muteSomeone ) function getPlayerFromNamePart(name) if name then for i, player in ipairs(getElementsByType("player")) do if string.find(getPlayerName(player):lower(), tostring(name):lower(), 1, true) then return player end end end return false end true ?
  17. i can't really understand how to put it is that true ? function muteSomeone ( player, cmd, target, reason, time ) if ( target and reason and time ) then if target then for i, player in ipairs(getElementsByType("player")) do if string.find(getPlayerName(player):lower(), tostring(name):lower(), 1, true) then return player local target = getPlayerFromName ( target ) if ( not isElement ( target ) ) then outputChatBox ( "There is no player with this name", player, 255, 255, 0 ) return end end end end return false end local time = tonumber ( time ) if ( time and time >= 1 and not isPlayerMuted ( target ) ) then local milliseconds = math.floor ( time * 60000 ) outputChatBox ( getPlayerName ( target ) .." has been muted for ".. tostring ( time ) .." minutes (".. reason ..") .", root, 255, 0, 0 ) setPlayerMuted ( target, true ) setTimer ( setPlayerMuted, milliseconds, 1, target, false ) mutedSerials [ getPlayerSerial ( target ) ] = milliseconds else outputChatBox ( "Syntax: /mmute player reason time and player cannot be muted", player, 255, 255, 0 ) end end end addCommandHandler ( "mmute", muteSomeone )
  18. thank you soildsnake14 but i have last question how to mute a player with just part of his name example : /mmute Ch insult 1 Instead of /mmute Chaos insult 1 like admin panel with kick
  19. local mutedSerials = { } function muteSomeone ( player, cmd, target, reason, time ) if ( target and reason and time ) then local target = getPlayerFromName ( target ) if ( not isElement ( target ) ) then outputChatBox ( "There is no player with this name", player, 255, 255, 0 ) return end local time = tonumber ( time ) if ( time and time >= 1 and not isPlayerMuted ( target ) ) then local milliseconds = math.floor ( time * 60000 ) outputChatBox ( getPlayerName ( target ) .." has been muted for ".. tostring ( time ) .." minutes (".. reason ..") .", root, 255, 0, 0 ) setPlayerMuted ( target, true ) setTimer ( setPlayerMuted, milliseconds, 1, target, false ) mutedSerials [ getPlayerSerial ( target ) ] = milliseconds else outputChatBox ( "Syntax: /mmute player reason time and player cannot be muted", player, 255, 255, 0 ) end end end addCommandHandler ( "mmute", muteSomeone ) function afterreconnect () local milliseconds = mutedSerials [ getPlayerSerial ( source ) ] if ( milliseconds ) then setTimer ( setPlayerMuted, milliseconds, 1, source, false )] end end addEventHandler ( "onPlayerJoin", getRootElement(), afterreconnect ) true ?
  20. thanks it's working but when i reconnect the mute will still forever
×
×
  • Create New...