Jump to content

Razerclaus

Members
  • Posts

    48
  • Joined

  • Last visited

Details

  • Gang
    SGC

Razerclaus's Achievements

Rat

Rat (9/54)

0

Reputation

  1. Code is stable and working perfectly. Thank you. And also, we know that a live support thingy isn't unique, never said that. We made it to be able to create the best player environment possible on our server. @seb, police system is already done, we're only tweaking the server to make it fit all players.
  2. Wait... I'm ruining my own topic? Oh wow... Again, who said it was special? Just wanted some feedback, thats all...
  3. How cool? Who said it was special? Just posted it here to get some feedback. Btw keep your dog Dwayne in leash, he's got a heavy ban foot and a childish reason.
  4. Okay so, our lovely scripter just made a Live Support system... Reply and tell me what you think! Link to bigger image: http://puu.sh/vvbr
  5. Razerclaus

    Delete

    I am sorry to inform you that the project has stopped for now. We will continue as soon as possible.
  6. Because its a RP server and I need the helmet/tint stuff on it... Like if you wear a helmet it doesn't show your name, just shows like: Helmet
  7. Hi, I got some problems with my nametag system... The problem is that health and armor is being showed, but not name and ID... could anyone try to help me, please? local localPlayer = getLocalPlayer() local show = true function startRes() for key, value in ipairs(getElementsByType("player")) do setPlayerNametagShowing(value, false) end end addEventHandler("onClientResourceStart", getResourceRootElement(), startRes) local playerhp = { } local lasthp = { } local playerarmor = { } local lastarmor = { } function playerQuit() if (getElementType(source)=="player") then playerhp[source] = nil lasthp[source] = nil playerarmor[source] = nil lastarmor[source] = nil end end addEventHandler("onClientElementStreamOut", getRootElement(), playerQuit) addEventHandler("onClientPlayerQuit", getRootElement(), playerQuit) function setNametagOnJoin() setPlayerNametagShowing(source, false) end addEventHandler("onClientPlayerJoin", getRootElement(), setNametagOnJoin) function streamIn() if (getElementType(source)=="player") then playerhp[source] = getElementHealth(source) lasthp[source] = playerhp[source] playerarmor[source] = getPedArmor(source) lastarmor[source] = playerarmor[source] end end addEventHandler("onClientElementStreamIn", getRootElement(), streamIn) function isPlayerMoving(player) return (not isPedInVehicle(player) and (getPedControlState(player, "forwards") or getPedControlState(player, "backwards") or getPedControlState(player, "left") or getPedControlState(player, "right") or getPedControlState(player, "accelerate") or getPedControlState(player, "brake_reverse") or getPedControlState(player, "enter_exit") or getPedControlState(player, "enter_passenger"))) end local lastrot = nil function aimsSniper() return getPedControlState(localPlayer, "aim_weapon") and getPedWeapon(localPlayer) == 34 end function aimsAt(player) return getPedTarget(localPlayer) == player and aimsSniper() end function renderNametags() if (show) then local players = { } local distances = { } local lx, ly, lz = getCameraMatrix() for key, player in ipairs(getElementsByType("player")) do if (isElement(player)) and isElementStreamedIn(player) then local logged = getElementData(player, "loggedin") if (logged == 1) then local lx, ly, lz = getElementPosition(localPlayer) local rx, ry, rz = getElementPosition(player) local distance = getDistanceBetweenPoints3D(lx, ly, lz, rx, ry, rz) local limitdistance = 20 local reconx = getElementData(localPlayer, "reconx") -- smoothing playerhp[player] = getElementHealth(player) if (lasthp[player] == nil) then lasthp[player] = playerhp[player] end playerarmor[player] = getPedArmor(player) if (lastarmor[player] == nil) then lastarmor[player] = playerarmor[player] end if (player~=localPlayer) and (isElementOnScreen(player)) and (aimsAt(player) or distance<limitdistance or reconx) then if not getElementData(player, "reconx") and not getElementData(player, "freecam:state") then --local lx, ly, lz = getPedBonePosition(localPlayer, 7) local lx, ly, lz = getCameraMatrix() local vehicle = getPedOccupiedVehicle(player) local collision, cx, cy, cz, element = processLineOfSight(lx, ly, lz, rx, ry, rz+1, true, true, true, true, false, false, true, false, vehicle) if not (collision) or aimsSniper() or (reconx) then local x, y, z = getElementPosition(player) if not (isPedDucked(player)) then z = z + 1 else z = z + 0.5 end local sx, sy = getScreenFromWorldPosition(x, y, z+0.45, 100, false) local oldsy = nil -- HP if (sx) and (sy) then local health = math.ceil(lasthp[player]) if ( math.ceil(playerhp[player]) < health ) then health = health - 1 lasthp[player] = health elseif ( math.ceil(playerhp[player]) > health ) then health = health + 1 lasthp[player] = health end if (health>0) then distance = distance / 5 if (reconx or aimsAt(player)) then distance = 1 elseif (distance<1) then distance = 1 elseif (distance>2) then distance = 2 end local offset = 45 / distance -- DRAW BG dxDrawRectangle(sx-offset-5, sy, 95 / distance, 20 / distance, tocolor(0, 0, 0, 100), false) oldsy = sy -- DRAW HEALTH local width = 85 local hpsize = (width / 100) * health local barsize = (width / 100) * (100-health) local color if (health>70) then color = tocolor(0, 255, 0, 130) elseif (health>35 and health<=70) then color = tocolor(255, 255, 0, 130) else color = tocolor(255, 0, 0, 130) end if (distance<1.2) then dxDrawRectangle(sx-offset, sy+5, hpsize/distance, 10 / distance, color, false) dxDrawRectangle((sx-offset)+(hpsize/distance), sy+5, barsize/distance, 10 / distance, tocolor(162, 162, 162, 100), false) else dxDrawRectangle(sx-offset, sy+5, hpsize/distance-5, 10 / distance-3, color, false) dxDrawRectangle((sx-offset)+(hpsize/distance-5), sy+5, barsize/distance-2, 10 / distance-3, tocolor(162, 162, 162, 100), false) end end end -- ARMOR --sx, sy2 = getScreenFromWorldPosition(x, y, z+0.25, 100, false) if (sx) and (sy) then if (distance<=2) then sy = math.ceil( sy + ( 2 - distance ) * 20 ) end sy = sy + 10 if (sx) and (sy) then local armor = math.ceil(lastarmor[player]) if ( math.ceil(playerarmor[player]) < armor ) then armor = armor - 1 lastarmor[player] = armor elseif ( math.ceil(playerhp[player]) > armor ) then armor = armor + 1 lastarmor[player] = armor end if (armor>5) then local offset = 45 / distance -- DRAW BG dxDrawRectangle(sx-offset-5, sy, 95 / distance, 20 / distance, tocolor(0, 0, 0, 100), false) -- DRAW HEALTH local width = 85 local armorsize = (width / 100) * armor local barsize = (width / 100) * (100-armor) if (distance<1.2) then dxDrawRectangle(sx-offset, sy+5, armorsize/distance, 10 / distance, tocolor(197, 197, 197, 130), false) dxDrawRectangle((sx-offset)+(armorsize/distance), sy+5, barsize/distance, 10 / distance, tocolor(162, 162, 162, 100), false) else dxDrawRectangle(sx-offset, sy+5, armorsize/distance-5, 10 / distance-3, tocolor(197, 197, 197, 130), false) dxDrawRectangle((sx-offset)+(armorsize/distance-5), sy+5, barsize/distance-2, 10 / distance-3, tocolor(162, 162, 162, 100), false) end end end -- NAME --sx, sy = getScreenFromWorldPosition(x, y, z+0.6, 100, false) --sy = sy - (60 - distance*10) if (distance<=2) then sy = math.ceil( sy - ( 2 - distance ) * 40 ) end sy = sy - 20 if (sx) and (sy) then if (distance < 1) then distance = 1 end if (distance > 2) then distance = 2 end local offset = 75 / distance local scale = 0.6 / distance local font = "bankgothic" local r, g, b = getPlayerNametagColor(player) dxDrawText(getPlayerNametagText(player), sx-offset+2, sy+2, (sx-offset)+130 / distance, sy+20 / distance, tocolor(0, 0, 0, 220), scale, font, "center", "middle", false, false, false) dxDrawText(getPlayerNametagText(player), sx-offset, sy, (sx-offset)+130 / distance, sy+20 / distance, tocolor(r, g, b, 220), scale, font, "center", "middle", false, false, false) -- DRAW ids local offset = 65 / distance local id = getElementData(player, "playerid") if (oldsy) and (id) then if (id<100 and id>9) then -- 2 digits dxDrawRectangle(sx-offset-15, oldsy, 30 / distance, 20 / distance, tocolor(0, 0, 0, 100), false) dxDrawText(tostring(id), sx-offset-22.5, oldsy, (sx-offset)+26 / distance, sy+20 / distance, tocolor(255, 255, 255, 220), scale, font, "center", "middle", false, false, false) elseif (id<=9) then -- 1 digit dxDrawRectangle(sx-offset-5, oldsy, 20 / distance, 20 / distance, tocolor(0, 0, 0, 100), false) dxDrawText(tostring(id), sx-offset-12.5, oldsy, (sx-offset)+26 / distance, sy+20 / distance, tocolor(255, 255, 255, 220), scale, font, "center", "middle", false, false, false) elseif (id>=100) then -- 3 digits dxDrawRectangle(sx-offset-25, oldsy, 40 / distance, 20 / distance, tocolor(0, 0, 0, 100), false) dxDrawText(tostring(id), sx-offset-32.5, oldsy, (sx-offset)+26 / distance, sy+20 / distance, tocolor(255, 255, 255, 220), scale, font, "center", "middle", false, false, false) end end end end end end end end end end end end addEventHandler("onClientRender", getRootElement(), renderNametags) function hideNametags() show = false end addEvent("hidenametags", true)
  8. Razerclaus

    Delete

    At the moment since I am too tired to fix anything for the server(untill tomorrow...) I just got bored and made some shitty flash/html project.... http://arc.freeiz.com/ There we go
  9. Razerclaus

    Delete

    Given then one of the people that's with this server has LulzSec in his gang, i'd say thats a clear wannabe 1337-haxx0r. another name would be more suited then this. Y'all don't know nuthin' bout' Anonymous and LulzSec. Anonymous is not a group, nor is it a hacker group. Everyone can be Anonymous. Even a mentally disordered person can. You don't have to be a 'hacker' or a 'wannabe 1337-haxx0r'. And for sake. Stop posting non-sense. Ya'll just jealous. [Gonna upload a pic here soon, gotta find a suitable one kids, else will x86 pm me again] Ohh, found one! Now fu: LOOOOOOOOOOOOL'ed
  10. Razerclaus

    Delete

    Thank you everyone, you are also welcome ingame when we launch it.
×
×
  • Create New...