aaron001

Members
  • Content Count

    16
  • Joined

  • Last visited

Community Reputation

0 Neutral

About aaron001

  • Rank
    Square

Details

  • Gang
    Gang
  1. aaron001

    Need Scripters

    I need Scripters i have server but i need scripters
  2. My announce script: Lua; addCommandHandler("ann", function(player, cmd, ...) local accName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "LWS" )) then local message = table.concat({...}, " ") if #message > 0 then sendClientMessage (message, getRootElement(), 255,0,0) end end end) Meta: "UnKnown" type="script" version="0.1"/> TOPBARCHAT SCRIPT: c.Lua: ------------------------------------------ -- TopBarChat -- ------------------------------------------ -- Developer: Braydon Davis -- -- File: c.lua -- -- Copyright 2013 (C) Braydon Davis -- -- All rights reserved. -- ------------------------------------------ -- Script Version: 1.4 -- ------------------------------------------ local maxMessages = 5; -- The max messages that will show (on each bar) local DefaultTime = 8; -- The max time each message will show if time isn't defined. ------------------------------------------ -- For scripters only -- ------------------------------------------ local sx_, sy_ = guiGetScreenSize ( ) local sx, sy = sx_/1280, sy_/720 -- you got xXMADEXx's resolution :3 plz no hak mi local DefaultPos = true; local messages_top = { } local messages_btm = { } function sendClientMessage ( msg, r, g, b, pos, time ) -- Msg: String -- R: Int (0-255) -- G: Int (0-255) -- B: Int (0-255) -- Pos: Boolean -- Time: Int if ( not msg ) then return false end if ( pos == nil ) then pos = DefaultPos end local r, g, b = r or 255, g or 255, b or 255 local time = tonumber ( time ) or DefaultTime local data = { message = msg, r = r, g = g, b = b, alpha=0, locked=true, rTick = getTickCount ( ) + (time*1000) } --> Scripters note: --> The remove and intro fades are handled in the render event if ( pos == true or pos == "top" ) then table.insert ( messages_top, data ) return true elseif ( pos == false or pos == "bottom" ) then table.insert ( messages_btm, data ) return true end return false end addEvent ( getResourceName ( getThisResource ( ) )..":sendClientMessage", true ) addEventHandler ( getResourceName ( getThisResource ( ) )..":sendClientMessage", root, sendClientMessage ) function dxDrawNotificationBar ( ) local doRemove = { top = { }, bottom = { } } -- This is used so it prevents the next message from flashing -- Top Message Bar for i, v in pairs ( messages_top ) do local i = i - 1 if ( not v.locked ) then v.alpha = v.alpha - 3 if ( v.alpha <= 20 ) then table.insert ( doRemove.top, i+1 ) end messages_top[i+1].alpha = v.alpha else if ( v.alpha < 160 ) then v.alpha = v.alpha + 1 messages_top[i+1].alpha = v.alpha end if ( v.rTick <= getTickCount ( ) ) then v.locked = false messages_top[i+1].locked=false end end dxDrawRectangle ( (sx_/2-530/2), i*25, 530, 25, tocolor ( 0, 0, 0, v.alpha ) ) dxDrawText ( tostring ( v.message ), 0, i*25, sx_, (i+1)*25, tocolor ( v.r, v.g, v.b, v.alpha*1.59375 ), sy*1, "default-bold", "center", "center") end if ( #messages_top > maxMessages and messages_top[1].locked ) then messages_top[1].locked = false end -- Bottom Message Bar for i, v in pairs ( messages_btm ) do if ( not v.locked ) then v.alpha = v.alpha - 3 if ( v.alpha <= 20 ) then table.insert ( doRemove.bottom, i ) end messages_btm[i].alpha = v.alpha else if ( v.alpha < 160 ) then v.alpha = v.alpha + 1 messages_btm[i].alpha = v.alpha end if ( v.rTick <= getTickCount ( ) ) then v.locked = false messages_btm[i].locked=false end end dxDrawRectangle ( (sx_/2-530/2), sy_-(i*25), 530, 25, tocolor ( 0, 0, 0, v.alpha ) ) dxDrawText ( tostring ( v.message ), 0, sy_-(i*25), sx_, sy_-((i-1)*25), tocolor ( v.r, v.g, v.b, v.alpha*1.59375 ), sy*1, "default-bold", "center", "center") end if ( #messages_btm > maxMessages and messages_btm[1].locked ) then messages_btm[1].locked = false end -- handle message removes if ( #doRemove.top > 0 )then for i, v in pairs ( doRemove.top ) do table.remove ( messages_top, v ) end end if ( #doRemove.bottom > 0 ) then for i, v in pairs ( doRemove.bottom ) do table.remove ( messages_btm, v ) end end end addEventHandler ( "onClientRender", root, dxDrawNotificationBar ) ------------------------------ -- For development -- ------------------------------ addCommandHandler ( 'rt', function ( ) for i=1, 5 do sendClientMessage ( "Testing - Index ".. tostring ( i ), 255, 255, 255, false ) sendClientMessage ( "Testing - Index ".. tostring ( i ), 255, 255, 255, true ) end end ) S.Lua: ------------------------------------------ -- TopBarChat -- ------------------------------------------ -- Developer: Braydon Davis -- -- File: s.lua -- -- Copyright 2013 (C) Braydon Davis -- -- All rights reserved. -- ------------------------------------------ local rName = getResourceName ( getThisResource ( ) ) function sendClientMessage ( msg, who, r, g, b, pos, time ) if ( msg and who ) then if ( isElement ( who ) ) then triggerClientEvent ( who, rName..":sendClientMessage", who, msg, r, g, b, pos, time ) return true else return false end else return false end end addEventHandler ( "onPlayerJoin", root, function ( ) sendClientMessage ( '* '..getPlayerName ( source )..' has joined!', root, 255, 100, 100, false ) end ) addEventHandler ( 'onPlayerQuit', root, function ( tp, reason, respons ) if ( tp == 'Kicked' or tp == 'Banned' ) then msg = '['..tp..' - '..respons..'] ('..reason..')' else msg = '['..tp..']' end sendClientMessage ( "* "..getPlayerName ( source ).." has quit. "..msg, root, 255, 100, 100, false ) end ) Meta: "xXMADEXx" name="Top Chat" type="script" version="1.4.1" />
  3. i dont want them in main chat i want them in that topbarchat i have an script for it but it wont work out
  4. Thats all i have those 2 and i have an topbarchat script
  5. well it doesnt do anything Lua: addCommandHandler("ann", function(player, cmd, ...) local accName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "LWS" )) then local message = table.concat({...}, " ") if #message > 0 then sendClientMessage (message, getRootElement(), 255,0,0) end end end) meta: "UnKnown" type="script" version="0.1"/>
  6. i want to create an announce system like when i do /ann text it displays in topbarchat but it doesnt work out for me ye i am an noob scipter addCommandHandler("ann", function(player, cmd, ...) local accName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "LWS" )) then local message = table.concat({...}, " ") if #message > 0 then bool sendClientMessage ( string message, player thePlayer [, int r=255, int g=255, int b=255, bool topBar=true, int time=8 ] ) end end end)
  7. aaron001

    Server error

    What is the problem?
  8. aaron001

    Server error

    But it is added STILL DOESNT WORK
  9. i cant do anyhting with amdin panel, i cant start stop maps or even resources XML
  10. aaron001

    Server error

    i got an server and i am admin i start a resource and i got this code: WARNING: [admin]/admin/server/admin_server.lua:1174: Access denied @ 'startResource' : shows up in my console
  11. Maybe the wrong place but i dont find where to put it, i search a scripter for my freeroam server to help us and late rwe go to rpg and if you do good work i will pay ya thanks
  12. If a player join the Team1(color:Red) that the name color auto changes to the team color ? i dont find it. and If you set anybody in a team like amdins and he relog he auto puts him in amdins team Thanks.
  13. My problem is i want it to an acl group not an team group but i dont find how. function adminLogo() local players = getPlayersInTeam(getTeamFromName("Moderator")) for i,player in ipairs(players) do if player ~= localPlayer then local cX, cY, cZ = getCameraMatrix() local hX, hY, hZ = getPedBonePosition(player, hZ = hZ + 0.5 local pX,pY,pZ = getPedBonePosition(localPlayer, pZ = pZ + 0.5 if getScreenFromWorldPosition(hX, hY, hZ) and isLineOfSightClear(cX,cY,cZ, pX,pY,pZ) then local sX, sY, sD = getScreenFromWorldPosition(hX, hY, hZ) local relative = (50 - sD) / 50 if relative > 0 then local iW = imgW * relative local iH = imgH * relative local iX = sX - (iW / 2) local iY = sY - (iH / 2) dxDrawImage(iX, iY, iW, iH, "admin.png") end end end end end addEventHandler("onClientRender", root, adminLogo)