Jump to content

OGF

Members
  • Posts

    111
  • Joined

  • Last visited

Everything posted by OGF

  1. Replace localPlayer with 'root' in all the triggerServerEvent 's.
  2. Yes, you can delete objects by using bool removeWorldModel ( int modelID, float radius, float x, float y, float z [, int interior = 0 ] ) https://wiki.multitheftauto.com/wiki/RemoveWorldModel Now since you want to remove it and replace that will be impossible since...well..you removed it. I don't know if you mean replace the texture itself, or not. But you can remove the model and make a whole new object using a program like auto desk then importing it into the game.
  3. Then replace the marker line with colshape createColCircle ( float fX, float fY, float radius ) Or colshape createColRectangle ( float fX, float fY, float fWidth, float fHeight) Then with events onColShapeHit onColShapeLeave You can also check the shapes using https://wiki.multitheftauto.com/wiki/SetDevelopmentMode Like snake said this area is to get help not get people to do them for you. If you want them done some people are offering to do it for cash.
  4. Oh, I completely ignored the fact it was something else. forget what I said.
  5. team getPlayerTeam ( player thePlayer ) you could try using this to make this less complicated.
  6. OGF

    Plugins/mods?

    Why yes you can.
  7. Try defining that object as a variable and using setElementFrozen ( theElement, true )
  8. OGF

    dxDrawText Display

    Double Post, but I decided to use the fileOpen fileCreate etc etc, thanks guys, all good now.
  9. OGF

    dxDrawText Display

    ah ok works good now thanks, the one other thing i cant get is if a new player joins or someone reconnects the text will disappear to them. also if the player who displayed the message leaves, then the message will disappear for everyone on the server, I know its onClientPlayerJoin, do I maybe need to make an invisible edit and set text to that server sided? so when someone joins , get that text?
  10. OGF

    dxDrawText Display

    When I try that code it displays nothing, plus no error or nothing, the remove command doesnt seem to work either.
  11. OGF

    dxDrawText Display

    Wow works good, Forgot about nesting functions with events. Was wondering how I can remove this eventHandler from another function, because if I keep adding text, they overlap. thanks
  12. --client local sWidth,sHeight = guiGetScreenSize() function motdis () local motdt = guiGetText ( motdtxtbox ) triggerServerEvent ( "getdx", root, motdt ) end addEventHandler ( "onClientGUIClick", motdbut, motdis, false ) --server function getdxtxt ( motdt ) if not ( motd == "" ) then for id, player in ipairs ( getElementsByType ( "player" ) ) do triggerClientEvent ( "rendertxt", player, motdt ) end end end addEvent ("getdx",true) addEventHandler("getdx", resourceRoot, getdxtxt) --client function rendertxt (motdt) local sWidth,sHeight = guiGetScreenSize() texts = dxDrawText( motdt, sWidth * 0.456, sHeight * 0.051, sWidth * 0, sHeight * 0,tocolor(255,255,255,195),1.0,"bankgothic","left","top",false,false,false,true) addEventHandler ( "onClientRender", root, rendertxt ) end addEvent("rendertxt",true) addEventHandler("rendertxt", root, rendertxt ) Its kind of like a message of the day thing, so it always stays at the top of players screens. I have tried lots of things now, the problem is, the text actully displays once, but after that, the debugscript spams saying that the first argument in dxDrawText is nil. Im not sure what to do no more.
×
×
  • Create New...