Jump to content

Daniel123

Members
  • Posts

    10
  • Joined

  • Last visited

Details

  • Gang
    Against MTA HAcks

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Daniel123's Achievements

Member

Member (5/54)

0

Reputation

  1. LIke JR10 said please don't double post thank you
  2. Ok for some reaosn it isint showing errors can anybody stil help me fix this?
  3. Ok i will post it when the server is online soon.
  4. Hmm i don't know best wait for somebody else then Tank
  5. Try and replace the command with this -- /ReconnectLG function forceReconnect(thePlayer, commandName, targetPlayer) local port = getServerPort() local password = getServerPassword() redirectPlayer(targetPlayer, "69.245.157.67", port, password) getPlayerName(thePlayer) .." reconnected ".. targetPlayerName , 4) end end end end end addCommandHandler("logout", forceReconnect, false, false)
  6. Here try this -- /ReconnectLG function ReconnectLG(thePlayer, commandName, targetPlayer) local port = getServerPort() local password = getServerPassword() redirectPlayer(targetPlayer, "69.245.157.67", port, password) getPlayerName(thePlayer) .." reconnected ".. targetPlayerName , 4) end end end end end addCommandHandler("reconnectLG", forceReconnect, false, false) This might work i havent tested it yet you use the command reconnectLG change it if it works.
  7. Ok so i get a error when i load my nametags it up shows this on the player ID (Don't show the ID or Player Name)But it shows the Health and Armor here the code Can anybody help? 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 distanceor 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
  8. Daniel123

    MTA Ports

    Ok when i try and open my mta ports its hard and i don't get it my Router is very diffrent from others i have TALK-TALK(UK)My friend said i have to have it wireless e.g you have ot have no cable connected you will need a wireles connected to your internet can anybody help me with this?
  9. It just make it so it just that the Msg has bean disabled i'm trying to make a /msg but its got that msg thing on it is there any other way?
  10. Nice work JR10 Mabe i might make my trailor for my MTA Server
×
×
  • Create New...