Jump to content

dranton17

Members
  • Posts

    13
  • Joined

  • Last visited

Everything posted by dranton17

  1. Here is the script . You just need to get the player's vehicle and then use the fixVehicle command . function fix (playerSource) local theVehicle = getPedOccupiedVehicle (playerSource) if theVehicle and getVehicleController ( theVehicle ) == playerSource then fixVehicle (theVehicle) outputChatBox ("Your vehicle has been fixed !" , thePlayer) end end addCommandHandler ("fix" , fix)
  2. Also how can i create admin ? I didn't understand the whole part with ACL . How do i set my account on admin ?
  3. Also i have this login gui script . How can i add a register button too ? function createLoginWindow() local X = 0.375 local Y = 0.375 local Width = 0.25 local Height = 0.25 wdwLogin = guiCreateWindow(X, Y, Width, Height, "Please Log In", true) -- define new X and Y positions for the first label X = 0.0825 Y = 0.2 -- define new Width and Height values for the first label Width = 0.25 Height = 0.25 -- create the first label, note the final argument passed is 'wdwLogin' meaning the window -- we created above is the parent of this label (so all the position and size values are now relative to the position of that window) guiCreateLabel(X, Y, Width, Height, "Username", true, wdwLogin) -- alter the Y value, so the second label is slightly below the first Y = 0.5 guiCreateLabel(X, Y, Width, Height, "Password", true, wdwLogin) X = 0.415 Y = 0.2 Width = 0.5 Height = 0.15 edtUser = guiCreateEdit(X, Y, Width, Height, "", true, wdwLogin) Y = 0.5 edtPass = guiCreateEdit(X, Y, Width, Height, "", true, wdwLogin) -- set the maximum character length for the username and password fields to 50 guiEditSetMaxLength(edtUser, 50) guiEditSetMaxLength(edtPass, 50) X = 0.415 Y = 0.7 Width = 0.25 Height = 0.2 btnLogin = guiCreateButton(X, Y, Width, Height, "Log In", true, wdwLogin) -- make the window invisible guiSetVisible(wdwLogin, false) end addEventHandler("onClientGUIClick", btnLogin, clientSubmitLogin, false) addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function () -- create the log in window and its components createLoginWindow() -- output a brief welcome message to the player outputChatBox("Welcome to Mountain Fort . Please log in !") -- if the GUI was successfully created, then show the GUI to the player if (wdwLogin ~= nil) then guiSetVisible(wdwLogin, true) else -- if the GUI hasnt been properly created, tell the player outputChatBox("An unexpected error has occurred and the log in GUI has not been created.") end -- enable the players cursor (so they can select and click on the components) showCursor(true) -- set the input focus onto the GUI, allowing players (for example) to press 'T' without the chatbox opening guiSetInputEnabled(true) end ) function clientSubmitLogin(button,state) if button == "left" and state == "up" then -- get the text entered in the 'username' field local username = guiGetText(edtUser) -- get the text entered in the 'password' field local password = guiGetText(edtPass) -- if the username and password both exist if username and password then -- trigger the server event 'submitLogin' and pass the username and password to it triggerServerEvent("submitLogin", getRootElement(), username, password) -- hide the gui, hide the cursor and return control to the player guiSetInputEnabled(false) guiSetVisible(wdwLogin, false) showCursor(false) else -- otherwise, output a message to the player, do not trigger the server -- and do not hide the gui outputChatBox("Please enter a username and password.") end end end
  4. I managed to make a script that when a player make a kill gets +100$ . But everytime i reconnect the money is reseted to 1000 (default value that i put) . How can i save the money he have when he log out and when he relog he get the same money he had last time . Also i thought about a little script about deposit money somewhere so not losing them when you die . I know how to make it but how do i save the money that have been deposited , and when they relog the money are still there ... Smth like this : function deposit(thePlayer, command, amount) local money = getPlayerMoney(thePlayer) if (money+1>amount) takePlayerMoney (thePlayer, tonumber(amount) ) --Here i don't know how to store the money outputChatBox("You have stored " amount " dollars in your bank account") else outputChatBox("You don't have so much money!") end end addCommandHandler("deposit", deposit) *Also i want to know how to show a tip or a text only to a player . I must write outputChatBox (thePlayer , "Hey!" ) ? *How can i output coloured text ? Red , blue ? And when output a text how can i make it on separate lines or i must put more output ? I want to make a /rules command *And how can i add any column to the table ?
  5. Thanks . But how can i store the kills that someone makes ? Like a scoreboard ? I need just an idea . Thanks .
  6. dranton17

    Scoreboard

    I wish to make a mode to count zombie kills . I have the ZDay mode . I want to make a script that counts the kills . Lets say for every kill the player receives 10 dollars . And also when the player has a number of kills 300 is spawned as an more advanced class with more weapons . Example : 0 kills - Civilian - SD Pistol : 300 - Kills - Police man - Deagle + MP5 etc . These features will be only avalivible to registered players . Thanks . I have the idea how to make it but i don't know very well how to write it into code (im new to scripiting ) . Thanks for help . *Also there is any host that host for free a mta server ? With my pc i can be uptime only like 9/24 hours per day so ...
  7. I have the script that set the location to spawn when login but after someone die he is respawned at the basic place near Las Venturas . What is the script in which i can set the coordonates for respawn ?
  8. I created this tutorial for another community but i thought it's nice to share it with you too : *The video : *Watch in FULLSCREEN ! *Final result : *Here is a result after i worked a little more on it . So there are a lot of ways to do a signature . You need only imagination : Rate and comment .
  9. Thanks . But how do i set the zombie spawns because i can't find nothing in the editor related to that Zday.
  10. 1.How can i spawn some peds into my server . They don't need to move just to be in certain places or doin an animation ? There is any resource for this ? If yes how do i use it . 2.I took the zombie day resource but i don't know how to use it . I've put it in the resources folder but it didn't appears in editor neither in definitions or in gamemodes ? How to "install" it ? Thanks.
  11. I've made a map and i want to make some interiors but i don't know how to make that yellow arrow and teleport me to the desired interior . I've tryed the [REL]Teleport Editor but after i put the 2 markers when i press F5 to test it nothing appears on the places where markers are . Also i read that i can create my own teleports by scripting but i dont know how ? Thanks . *Also i have a problem with ZombieDay mode . I've put it in Resources directory but nothing appears in editor.
  12. put the teleporteditor.zip file to MTA/server/mods/dethmach/resources (or MTA/server/mods/dethmach/resources/[editor]) it should be only in one localization, else it will not work (so if you added it in many places you should delete it) than fallow this instructions: when you create the map you will find it somewhere in the resources folder (I did not created a new map in 1.1 yet, so I don't know exactly... )youre map will be a folder, not a zip file, meta.xml will be in that file. Open it with the notepad and add the line @solidsnake please read the first post carefully including the posted links before “helping”... Thanks a lot . Im gonna try as you say.
  13. Im new to scripting . I want to add the Teleport definition : https://forum.multitheftauto.com/viewtop ... 08&t=32529. But i dont have any idea how to load definitions . Also i cant find meta.xml . Where i must put that files ? I've put them in a lot of folders but they still dont show up on the list from mta editor ? Thanks.
×
×
  • Create New...