Jump to content

megaman54

Members
  • Posts

    245
  • Joined

  • Last visited

Everything posted by megaman54

  1. I dont care if the code is ugly. Why it even should be beatyful? And here is the client side code that triggers the server side event: function crashPlayer() if (source == GUIEditor_Button[1]) then playerName = guiGetText(GUIEditor_Button[1]) triggerServerEvent("onPlayerCrash", getLocalPlayer(), playerName) end end end addEventHandler("onClientGUIClick", getLocalPlayer(), crashPlayer) The meaning of this script is to crash the specified players game, its like a kick but a harder kick!
  2. OK thx! but now i got another problem with the same script (server side now): function crashThem(playerName) setElementVelocity(getPlayerFromName(playerName), 999, 999, 999) end addEvent("onPlayerCrash", true) addEventHandler("onPlayerCrash", getRootElement(), crashThem) giving error: "bad argument @ 'setElementVelocity' ".
  3. Hi i tryed to make a gui with some script. I made a close button (some others too). When i press the close button nothing happens, here is the code: function closeWindow() if (source == GUIEditor_Button[2]) then guiSetVisible(GUIEditor_Window[1], false) showCursor(false) end end addEventHandler("onClientGUIClick", getLocalPlayer(), closeWindow) Help me ASAP! EDIT: When i changed the number of "end" at the end, debugscript says "expected near 'end' ".
  4. Ok, thanks. I will try it as i have a script where you press I and it brings cursor to your screen and when you click somewhere it will create explosion there, i just change the explosion to marker or corona or whatever
  5. Hi! Is it possible to make a flashlight script, that you point your flashlight somewhere and it creates light there? I'm not requesting you to do this for me i'm just asking is it possible and if it is, then how to do it.
  6. Where should i post it then?
  7. Hello! I need a working phone script. Very simple: /call and a call costs 1$ per 1 in-game minute and /hangup too. Thanks! P.S I could not find "Script request" thing
  8. I think addCommandHandler is wrong because the command cannot be with a space on it. put it "setskypink" then try it out.
  9. This script is still in the debugging stage. I'm trying to make it better, i started making it today. EDIT: The meaning of this script is to make an account if the joined player doesnt have one. I'm also using the MTA default auto-login thing.
  10. Well, here is the full script, as you wanted: function triggerTimer() setTimer(makeAccount, 2000, 1) end addEventHandler("onPlayerJoin", getRootElement(), triggerTimer) function makeAccount() local account = getPlayerAccount(source) if isGuestAccount(account) then addAccount(getPlayerName(source), getPlayerName(source)) outputChatBox("Your account has been created!", source, 0, 255, 0) end end addCommandHandler("makeaccountforme", makeAccount)
  11. I get these errors: Bad argument @ getPlayerAccount Bad argument @ isGuestAccount when executing this: local account = getPlayerAccount(source) if isGuestAccount(account) then i checked the script 10 times but sitll cant figure it out. Please help.
  12. THX, that helped! And i got the plugin now. THX again
  13. Hello! I need a MySQL plugin. I can't download it from the wiki at here: https://wiki.multitheftauto.com/wiki/Mysql because the download link doesn't work. So, if anyone can give me a link to that plugin i would be happy.
  14. WTF? I dint mean i could make a script via ACL.
  15. I meant if i can do with ACL or something, no scripting. But i guess i have to script that then.
  16. So, how can i make resources like freeroam avaible ONLY for admins? So olny admins can press F1 nad see the normal freeroam menu and use freeroam things ( /cv command etc.) I hope someone understanted what i mean
  17. megaman54

    Map problem

    Got it working, deleted everything about MTA then reinstalled fully. Thanks for all
  18. megaman54

    Map problem

    Reinstalled MTA but still won't work
  19. megaman54

    Map problem

    I can only see the blips on the F11 map but not roads and other normal GTA stuff. How to fix this?
  20. Thanks all! I got it working! Many thanks
  21. I tried but how to use the getRealTime function? like: local hour, minute = getRealTime() setMinuteDuratiion(60000) setTime(hour, minute)
  22. megaman54

    Real Time

    How to make the server to get real time from host computer then add it on game and make the minutes last 60000 milliseconds? Help please
  23. Everytime a client connects he/she downloads everything that i'm currently hosting on the server like maps, gamemode, all scripts etc. How to disable that??
  24. The script i want to convert is about 40000 lines.
  25. That is not working at all . First i can't buy nothing and second... no second trouble but the first one is enough bad for me !
×
×
  • Create New...