megaman54
Members-
Posts
245 -
Joined
-
Last visited
Everything posted by megaman54
-
Can you tell me how to convert SAMP pwn script to LUA script? Is there any converter? I noticed that there were a amx converter in MTA server folder but it wont work. So help please
-
Sorry! I was so stupid that i dint notice that but thanks anyways! Its working now!
-
YAY! The close button is working as it should work. But new peoblem is that after i close the window with the button the cursor keeps showing and i can just reconnect to get it off. So do i need to use: guiSetInputEnabled(skinGui, false) or something lese?
-
Thanks! ANd who can start scripting for me
-
Nevermind. Another thing: why this wont work: function onPlayerQuit ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local playermoney = getPlayerMoney ( source ) setAccountData ( playeraccount, "mtafreeroam.money", playermoney ) end end function onPlayerJoin ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local playermoney = getAccountData ( playeraccount, "mtafreeroam.money" ) if ( playermoney ) then setPlayerMoney ( source, playermoney ) end end end addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) addEventHandler ( "onPlayerJoin", getRootElement ( ), onPlayerJoin ) -- function onPlayerQuit ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local playerposition = getElementPosition ( source ) setAccountData ( playeraccount, "mtafreeroam.position", playerposition ) end end function onPlayerJoin ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local playerposition = getAccountData ( playeraccount, "mtafreeroam.position" ) if ( playerposition ) then setElementPosition ( source, playerposition ) end end end addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) addEventHandler ( "onPlayerJoin", getRootElement ( ), onPlayerJoin ) it saves everything i want bu it wont load anything. Whats wrong
-
So, in Wiki where i can see is it server side or client side script? Because always there are no read "server side" or "client side". please tell meso i can continue without problems.
-
Still not working
-
Hello! I made this today and i want to know what is wrong with it. It is workin when i type /setskin it loads the GUI all good but when i try to close it via the close button it wont close. So here is the code: function windowClose() guiSetvisible(skinGui, false) guiSetInputEnabled(skinGui, false) end addEventHandler ( "onClientGUIClick", closeButton, windowClose, false ) that is only the part of code what closes the gui but it is not working. Tell me what is wrong.
-
Thanks alot! And BTW are you de simbad ?
-
Where to get amunation? I saw same ammunation in many servers so i tought it wasnt scripted by the owner of the server. So any links to ammunation resources ?
-
Write the functions for this: GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Window[1] = guiCreateWindow(617,223,378,220,"Register",false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Button[1] = guiCreateButton(0.3651,0.8636,0.254,0.0909,"Register",true,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(0.0317,0.1409,0.3042,0.1455,"Account name:",true,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[1],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[1],"left",false) GUIEditor_Edit[1] = guiCreateEdit(0.2857,0.1273,0.4259,0.1136,"",true,GUIEditor_Window[1]) guiEditSetMaxLength(GUIEditor_Edit[1],50) GUIEditor_Label[2] = guiCreateLabel(0.0265,0.2955,0.3122,0.1409,"Password:",true,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[2],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[2],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[2],"left",false) GUIEditor_Edit[2] = guiCreateEdit(0.2937,0.3045,0.4206,0.1227,"",true,GUIEditor_Window[1]) guiEditSetMasked(GUIEditor_Edit[2],true) GUIEditor_Label[3] = guiCreateLabel(0.0582,0.5182,0.4365,0.0727,"Only registered user can play!",true,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[3],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[3],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[3],"left",false) GUIEditor_Label[4] = guiCreateLabel(0.0556,0.6091,0.8968,0.1727,"Click "Register" when you are ready.",true,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[4],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[4],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[4],"left",false) So i need functions that saves the account whit those information (name and password) so he can next time log in with it! EDIT: Nearly forgot: make me a saver that saves everything on player quit/disconnect: skin, positin, money. PLEASE
-
Thanks! Help me makin a script that add some clothes to CJ character. I already tried this: https://wiki.multitheftauto.com/wiki/AddPedClothes but it dint work. And help me using that clothes thing
-
Can any1 write me a script that creates a NPC/ped in front of the player? PLZ
-
Is there any possibility to script bots? Like if i go close to it it starts shooting. So bots possible in MTA ?? I dont mean a hack i mean bot script
-
Yes i try to make my own but its very hard because the tutorials aren't so... well "big". hope somebody understands me Today started working on Player Menu GUI and i like to know how to script the functions toGUI that i made with the GUI editor. Thanks EDIT: I also like to know how to save the work made in GUI editor so i can write functions to it and script and so on
-
Again thanks alot! I want to add a thing that stores player weapons.
-
Thanks alot! But now i need add that it saves the player skin after dead. So need help with that
-
Thank you Dakilla! I will test that and tell if it is working!
-
Hi all! I'm new in this LUA thing and i created gamemode (it is the same as in the tutorial). It looks like this: function joinHandler() local x = 2497.2021 local y = -1666.7891 local z = 13.3850 spawnPlayer(source, x, y, z) fadeCamera(source, true) setCameraTarget(source, source) outputChatBox("Welcome to this server!", source) outputChatBox("Press F9 for help!", source) end addEventHandler("onPlayerJoin", getRootElement(), joinHandler) as you can see it is very simple and now i want to add there a thing that spawns the player again when he/she gets killed at the same spot when joined. Always when someone dies he/she must reconnect. Help me in this PLZ!
