Jump to content

Razerclaus

Members
  • Posts

    48
  • Joined

  • Last visited

Everything posted by Razerclaus

  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.
  11. Razerclaus

    Delete

    New update: Background in space won't be following your screen.
  12. Razerclaus

    Delete

    Haha Thank you snaky
  13. Razerclaus

    Delete

    And that member gave you the idea? oh god.. Okay then... Prob is, he gave it to us too.
  14. Okay... This server admins/owners have been messing with every servers that is better then them... They told me to keep my server down to avoid being hacked and stuff like that, they fucked up the other server when I merged with another community... I mean, is it "legal" to threaten to hack me if I don't keep my server down? And they actually said they had a virus on "idle" on my PC.
  15. Lol, I want to fix it ^^ Can anyone help me? Im ready to pay for it....
  16. Hi, I got some bugs in my scripts... Vehicles are randomly exploding... And if anyone knows what the problem is, please tell me
  17. I added "protected = 1" in the server config... Now i got another issue... [15:02:47] ERROR: Couldn't find meta.xml file for resource 'zombies' [15:02:47] Loading of resource 'zombies' failed [15:02:47] Resources: 112 loaded, 1 failed bind(...) failed:Error code - 10048 N[15:02:47] ERROR: Could not bind the server on interface '' and port '22003'! [15:02:47] Server stopped! [15:02:47] Stopping resources... [15:02:47] Closing SQLite3 database [15:02:47] Closing SQLite3 database Press Q to shut down the server!
  18. So... I tried to start the mysql resource for my server now... But I get an error... [14:49:15] ERROR: call: Failed, the resource mysql isn't running [string "?"] [14:50:15] ERROR: call: Failed, the resource mysql isn't running [string "?"] [14:51:15] ERROR: call: Failed, the resource mysql isn't running [string "?"] start mysql [14:51:27] start: Requested by Console [14:51:27] Starting mysql [14:56:27] ERROR: Unable to connect to mysql: (2013) Lost connection to MySQL srver at 'reading initial communication packet', system error: 0 [14:56:27] Start up of resource mysql cancelled by script [14:56:27] Stopping mysql [14:56:27] start: Resource 'mysql' start was requested [14:56:27] ERROR: call: Failed, the resource mysql isn't running [string "?"] [14:57:27] ERROR: call: Failed, the resource mysql isn't running [string "?"] [14:58:27] ERROR: call: Failed, the resource mysql isn't running [string "?"] Anyone got an idea what may stop it?
×
×
  • Create New...