Jump to content

manve1

Retired Staff
  • Posts

    1,283
  • Joined

  • Last visited

Everything posted by manve1

  1. What's the point of that? instead of copying it from somewhere else, you could have just fixed the code he was using. actually it's the one i prefer to use and i am guaranteed it does work ( as i just done a test ), and this post of your's wasn't needed.
  2. because your getting all of the markers, use this: textsToDraw = {} maxrange = 25 local Enter = createMarker(1555.1221923828,-1675.6265869141, 16.1953125, "corona", 1.5, 0, 0, 255, 255 ) addEventHandler("onClientRender",root, function() for a,b in pairs(textsToDraw) do x2,y2,z2 = b[1],b[2],b[3] px,py,pz = getElementPosition(getLocalPlayer()) scx,scy = getScreenFromWorldPosition (x2,y2,z2) camX,camY,camZ = getCameraMatrix() if scx and scy and getDistanceBetweenPoints3D(camX,camY,camZ,x2,y2,z2+5) <= maxrange and isLineOfSightClear(px,py,pz,x2,y2,z2,true,false,false,true,false,true,false,lp) then dxDrawFramedText(b[4],scx-0.5*dxGetTextWidth(b[4],0.30,"bankgothic"),scy+30-0.5*dxGetFontHeight(0.30,"bankgothic"),x, y+5,tocolor ( b[5], b[6], b[7], 255 ), 0.80,"bankgothic") end end end ) function add3DText(x,y,z,text,r,g,b) table.insert(textsToDraw,{x,y,z,text,r,g,b}) end function dxDrawFramedText ( message , left , top , width , height , color , scale , font , alignX , alignY , clip , wordBreak , postGUI , frameColor ) color = color or tocolor ( 255 , 255 , 255 , 255 ) frameColor = frameColor or tocolor ( 0 , 0 , 0 , 255 ) scale = scale or 1 alignX = alignX or "left" alignY = alignY or "top" clip = clip or false wordBreak = wordBreak or false postGUI = postGUI or false dxDrawText ( message , left , top , width , height , color , scale , font , alignX , alignY , clip , wordBreak , postGUI ) end local xxxm,yyym,zzzm = getElementPosition( Enter ) add3DText( xxxm-0.51,yyym+1.01,zzzm+1, "Police Station", 255, 255, 255 ) add3DText( xxxm-0.5,yyym+1,zzzm+1, "Police Station", 0, 0, 255 )
  3. Just so you know, some people only accept resources, not full gamemodes
  4. Use MTA's wiki, it's all explained in there ( not all at once, but it tells what main functions do ).
  5. There isn't a server like that, but to make one you will need knowledge of: LUA, MySql or SqLite. For a new map all you need to do is go to your MTA:SA and click on "Map Editor".
  6. hamburgerPositions = { {372.82,-65.68,1001.51,10}, {380.44,-8.65,1001.85,9}, {379.42,-119.65,1001.49,5} } -- The positions for the hamburger, in the style: x,y,z,interior labelTableNumbers = guiCreateLabel( 0.5, 0.5, 0.5, 0.5, tonumber(unpack(hanburgerPositions)), true ) -- added new line HERE. --[[ This is the hunger script. You can add hamburgers by adding it in hamburgerPositions. It works easy, just a after it, and filling in! {x,y,z,interiorID} When it isn't the last position, it needs a "," after it ]]-- -- DONT CHANGE ANYTHING AFTER THIS WITHOUT KNOWLEDGE! addEventHandler ("onClientResourceStart",getResourceRootElement(getThisResource()), function () hungerProcess = guiCreateProgressBar(0.7763,0.28,0.1775,0.04,true) guiMoveToBack (hungerProcess) guiProgressBarSetProgress(hungerProcess,100) hungerLabel = guiCreateLabel(0.7775,0.2817,0.1737,0.0367,"Hunger State",true) guiLabelSetColor(hungerLabel,255,255,255) guiLabelSetVerticalAlign(hungerLabel,"center") guiLabelSetHorizontalAlign(hungerLabel,"center",false) guiSetFont(hungerLabel,"default-small") for i,v in ipairs (hamburgerPositions) do local hamburger = createPickup (v[1],v[2],v[3],3,2768,100) local hamburgerMarker = createMarker (v[1],v[2],v[3],"corona",1,255,255,0,80) setElementData (hamburgerMarker,"HAMBURGER!",true) setElementInterior (hamburgerMarker,v[4]) setElementInterior (hamburger,v[4]) end setTimer (dropDownHungerState,45000,0,getLocalPlayer()) end) function setHungerState (player,hungerState) if (player == getLocalPlayer()) then guiProgressBarSetProgress(hungerProcess,hungerState) end end function getHungerState (player) if (player == getLocalPlayer()) then return guiProgressBarGetProgress(hungerProcess) end end function dropDownHungerState (player) if (player == getLocalPlayer()) then guiProgressBarSetProgress(hungerProcess,guiProgressBarGetProgress(hungerProcess) -1) if (guiProgressBarGetProgress(hungerProcess) == 0) then setElementHealth (player,getElementHealth (player) -25) --outputChatBox ("FAST! You'll get die when you don't eat!",255,0,0,false) elseif (guiProgressBarGetProgress(hungerProcess) == 10) then --outputChatBox ("Warning! You begin to become hungry!",255,0,0,false) end end end addEventHandler ("onClientPlayerSpawn",getRootElement(), function (team) setHungerState (source,100) end) addEventHandler ("onClientMarkerHit",getRootElement(), function(hitEle,dim) if (getLocalPlayer() == hitEle) and (getElementData (source,"HAMBURGER!") == true) then if (getHungerState (hitEle) < 50) then setHungerState (hitEle,100) outputChatBox ("HAMBURGER POWER!",255,0,255,false) outputChatBox ("You haven't got hunger any more \"{SMILIES_PATH}/icon_biggrin.gif\" alt=\"\" title=\"Very Happy\" />",255,0,255,false) else outputChatBox ("You don't need to eat!",255,0,255,false) end end end) -- Made by JasperNL=D I'm not sure where to change so it shows number instead of a label, so i added new line. If doesn't work, tell me the error or what the new label shows.
  7. addEventHandler("onPlayerJoin", getRootElement(), function() if not getPlayerTeam(source) then setPlayerTeam(source,getTeamFromName("Unemployed")) end end)
  8. I agree with Markeloff, as there is low good quality gamemodes, most of all RP gamemodes are leaked, there is tons of RPG servers and zombie servers, someone should really get creating with new ones. The one i would recommend is CrystalMV RPG as it is quite a new step towards RPG servers as it brings new life to RPG by having extremely good scripts such as BOTS which can attack, move and have different strength/health.
  9. I think he means that he wants some ideas for resource to make that would include xml
  10. manve1

    [HELP] Inventory!

    Hero Inventory or you can pay someone to make it as you would like to.
  11. manve1

    [HELP] Inventory!

    Use DataBases like MySql, SqLite to store the items when you dorp them/pick them up, everything else can be made with gui functions or if your artistic you can make them look a bit better using DirectX functions or images.
  12. you can use a table to store the data and then use the data to destroy the marker which you wish to.
  13. I could make scripts for you BUT I won't accept admin rights, I would make it for cash only
  14. -- Client Side -- Ghostmode Example from Wiki function ghostmode_on() local v = getPedOccupiedVehicle(localPlayer) -- Get her's Vehicle ID for index,vehicle in ipairs(getElementsByType("vehicle")) do --LOOP through all Vehicles setElementCollidableWith(vehicle, v, false) -- Set the Collison off with the Other vehicles. end outputChatBox("You are now a Ghost") end addEventHandler("onGamemodeMapStart", getRootElement(), ghostmode_on)
  15. manve1

    ?? Need help

    Click on the link Solidsnake14 gave you, there are examples ...
  16. I will look into this a lot deeper, thanx for the info, but how did you get the model id, not the texture id?
  17. manve1

    This ID.

    There is no andromada that has a ramp, there are broken airplanes that contain a "ramp", but andromada is only an airplane which you can fly, or an object for decoration, but it doesn't contain a ramp.
  18. WARNING: script\client:13: Bad usage @ 'engineReplaceModel' [Model ID 30403 replace failed] As far as i know this error suggests that there isn't a model with an ID of 30403?
  19. No, read more carefully at what i said it was model not texture as i know how to replace textures
×
×
  • Create New...