Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Vetal, here we don't give out scripts like that, we try to help you, we explain how things works, and for that is the wiki, there's where you should look at when you don't understand a function, i.e a event.
  2. Hei castillo could you explain me something , on that function u write? On server side function couldnt u receive the source of the event that would be that exactly player ? I mean u could use source variable instead of using the player one, right? I say this because u trigger the server event "getPlayerCredits" for the element getLocalPlayer(), so the source will be this local player right? And u could have used it, like this: addEvent("getPlayerCredits",true) addEventHandler("getPlayerCredits",root, function (source) outputChatBox(getPlayerName(source) .." has 50000 credits.",root,0,255,0) end) Right bro? just wanna be clear, so I can understand Lua more Thanks!! Well, here's an small explanation: source = the player who used the command (getLocalPlayer(), in this case). If you trigger getLocalPlayer() twice, it will send a player element that can be used in your function, ex: function o_o(player) player will be the one who triggered it, if you didn't pass it twice, source will work as that player. (Sorry, I'm not good explaining things .)
  3. Castillo

    all servers list

    I think I get his question, as far as I understand, he want's to get the MTA server(s) list, you seen the Server browser in MTA main menu? well, if i'm right, he want's to get that list.
  4. Use the function getTime combined with dxDrawText or guiCreateLabel, but is cooler with dxDrawText .
  5. Yes, but if i'm right, he said he still want's to use the MTA login system, and with this, you can't really use it.
  6. The command /login can't be removed because is built-in MTA, but.. you can remove the /register one, you can get it in the admin panel by lil toady, just search for "register" keyword.
  7. Jasd1, once again, you don't know what are you talking about, there was a function to set the SERVER name, no map name i.e game type.
  8. Castillo

    pf help

    Go to portforward.com, it has explanations for a lot of modems.
  9. Car mod: https://community.multitheftauto.com/index.php?p= ... ls&id=2496
  10. What do you mean? just remove the old resource and start new? I don't really get you.
  11. Castillo

    text

    I Think with this function: getScreenFromWorldPosition you can get it to work.
  12. 22 = Colt 45, just give the weapon press P (for admin panel) and check the ID.
  13. function replaceFunction( ) txd = engineLoadTXD ( "data/shotg.txd" ) engineImportTXD ( txd, 22 ) end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),replaceFunction) In your meta.xml you must have the right data "data/shotg.txd".
  14. I have a bug that when I click "Login" at the top it logs me in but then it logs me out, if I don't click "Board index" it wll logout me.
  15. Castillo

    Redirect

    Ok, stop off-topic.
  16. Castillo

    Redirect

    Twisted, is ok, we're many here, we all help when we can .
  17. Fail, you forgot to add checks about if the player is in a vehicle or not, take a look at the debug window in this image.
  18. Here: addEventHandler( "onClientCursorMove", getRootElement( ), function ( cursorX, cursorY, absoluteX, absoluteY, x,y,z) local pedday = getLocalPlayer() if (getElementVelocity(pedday) <= 0) then local x1,y1,_ = getElementPosition(pedday) local r = findRotation(x1,y1,x,y) setElementRotation(pedday, 0, 0, r) curX, curY, curZ = getElementRotation(pedday) setPedLookAt(pedday, x, curX , curY, z, -3000) end end) function findRotation(x1,y1,x2,y2) local t = -math.deg(math.atan2(x2-x1,y2-y1)) if t < 0 then t = t + 360 end; return t; end When I move my mouse it rotates the player acording to where I look at.
  19. Castillo

    Redirect

    Oh, i'm sorry, I didn't read carefully . function joinserverHandlerFunction (client, commandName, player) local pl = getPlayerFromName(player) if pl then redirectPlayer (pl, "194.187.214.31","22065") end end addCommandHandler ("redirect", joinserverHandlerFunction) Try with that.
  20. Castillo

    Redirect

    You must add your resource to the admin group in acl.xml, redirectPlayer requires admin rights to work.
  21. You must ask a administrator to do that.
  22. Try renaming the resource name to rpm_gear, maybe the "+" is messing with it.
×
×
  • Create New...