Jump to content

MohammedX

Members
  • Posts

    13
  • Joined

  • Last visited

Recent Profile Visitors

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

MohammedX's Achievements

Square

Square (6/54)

1

Reputation

  1. hey i want animation of ped fix vehicle on hood while standing. Is there an animation for that? i tired searched in mta wiki and just found "fixn_car_loop"
  2. I have a question @IIYAMA do i have to work on resolution of 1920x1080? or on any resolution. cuz i prefer 1280x720 most of it and some people say that u should work on 1920x1080 resolution that is better? maybe my question is stupid....or idk i just asking
  3. Hi I would just like to change the size of an image with, dxDrawImage. and i use interpolatebetween when I put the value width,heigh of the image I feel it moves the value x,y too. I don't want the x,y value to move I want just image in the middle and move it width, high like zoom in and out.
  4. is my question difficult?
  5. مشكور علي ردك بس سويته ب طريق هاذي عشان يستفيد الي غيري
  6. آول شيئ السلام عليكم ورحمة لله وبركاته بدي اكواد كيف اصنعه حق ارتفاع مثل ب صوره بس ابغى اسويه عن طريق نص بس مبتدئ ب مجال برمجه ياليت مساعده
  7. hey community i want a little help here i have problem with state i want to take all the players team state and make them on the numbers like if the number 5 and someone died after 4 like this this is my attempt but the number still at the limit of 0 and I want it like what I said above i do not know what problem and when the count ends (3 2 1 go) the numbe zero turns into 1 homeName = "" function get_team_alive_players(enemy) local team_name = homeName if enemy then team_name = enemyName end local team = getTeamFromName(team_name) if team then local players = getPlayersInTeam(team) if type(players) == "table" and #players > 0 then local output = {} for i,player in pairs(players) do local alive = getElementData(player,"state") if alive ~= "alive" then alive = false end local t = {name = getPlayerName(player), alive = alive} do table.insert(output,t) end end return output end end return false end ---------- homeName = "" local homeTeam = getTeamFromName(homeName) --- aliveH = getElementData(homeTeam, "alive") or "none" do dxDrawText(aliveH,posX,posY,posX+sizeX+row_size+row_size-5,posY+row_size,tocolor(255,255,255,alpha),clanwar_data_fontSize*1.2,clanwar_data_font,"right","center",false,false,false) end SERVER team = {} addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), function(startedRes) if getResourceName(getThisResource()) == getResourceName(startedRes) then team[3] = createTeam ( "Spectators", 255, 255, 255 ) if homeColor == "Blue" then team[1] = createTeam ( homeName, 255,255,99 ) elseif homeColor == "Red" then team[1] = createTeam ( homeName, colour.r,colour.g,colour.b) end if enemyColor == "Blue" then team[2] = createTeam ( enemyName, 255,255,99 ) elseif enemyColor == "Red" then team[2] = createTeam ( enemyName, colour.r,colour.g,colour.b) end setElementData(team[1], "points", 0) setElementData(team[1], "alive", 0) setElementData(team[2], "points", 0) setElementData(team[2], "alive", 0) local totalRounds = tonumber(get("totalRounds")) or 20 setElementData(team[1] and team[2], "currentRound", 0) setElementData(team[1] and team[2], "totalRounds", totalRounds) setElementData(team[1] and team[2], "warState", "Waiting") --setElementData(team[1], "left", Maps) setElementData(team[1], "warState", "Waiting") --setGameType ( gameTypeName ) end end ) addEvent("onRaceStateChanging") addEventHandler("onRaceStateChanging",getRootElement(), function(old, new) if old == "Running" and new == "GridCountdown" then setElementData(team[1], "alive", countPlayersInTeam(team[1])) setElementData(team[2], "alive", countPlayersInTeam(team[2])) local players = getElementsByType("player") for k,v in ipairs(players) do local thePlayer = v local playerTeam = getPlayerTeam (thePlayer) if ( playerTeam ) then local teamName = getTeamName(playerTeam) -- Kill spectators if teamName == "Spectators" then setTimer( function() setElementHealth(thePlayer,0) end ,50, 1) end end end end end ) i hope one helpe me because i'm so confused why state not work quickly
  8. hello community , I'm a beginner and i trying to make dxDrawLine3D with vehicle + attack dxdrawtext but i got a problem (the line attack into sky) my trying function nametag() if not nametagsEnabled then return end for index, player in pairs(getElementsByType("player")) do if not nametags[player] then nametag.create(player) end end for player in pairs(nametags) do while true do if not player or not isElement(player) then nametag.destroy(player) end break end end local camX, camY, camZ = getCameraMatrix() for player in pairs(nametags) do while true do if player == localPlayer and not selftagEnabled then break end if getElementDimension(player) ~= getElementDimension(localPlayer) then break end if isPedDead(player) then break end setPlayerNametagShowing(player, false) local posX, posY, posZ = getPedBonePosition(player, 8) local offset = 0.25 local vehicle = getPedOccupiedVehicle(player) or false if vehicle and isElement(vehicle) then posX, posY, posZ = getElementPosition(vehicle) offset = 0.75 end local distance = getDistanceBetweenPoints3D(camX, camY, camZ, posX, posY, posZ) if distance > nametagDistance then break end if not isLineOfSightClear(camX, camY, camZ, posX, posY, posZ, true, false, false, false, false, false, false, nil) then break end local sX, sY = getScreenFromWorldPosition(posX, posY, posZ + offset) if not sX or not sY then break end dxDrawText(getPlayerName(player), sX, sY, sX, sY, tocolor(r, g, b, alpha), scale, "default-bold", "center", "center", false, false, false, true) dxDrawLine3D (posX, posY, posZ, camX, camY, posZ+1.1, tocolor ( 255, 255, 255, 255 ), 2) end addEventHandler("onClientRender", root, nametag) my try second dxDrawLine3D (posX, posY, posZ, sY, sX, sY, tocolor ( 255, 255, 255, 255 ), 2)
×
×
  • Create New...