Jump to content

marty000123

Members
  • Posts

    256
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by marty000123

  1. You're not the only one who wants this to be a success
  2. I got a problem. This is the script I have: fixed) But I want to include this: fixed Now, I don't know how to includ this into the script. I want that the player who spawns the dual wield uzi's, actually gets DUAL WIELD. Any help would be appreciated. Because right now, when the player spawns the UZI's, they just get a single UZI.
  3. Hi, It turns out that it doesn't work. When I die / relog and give myself an UZI through the admin panel, I just have one uzi. Any help would be appreciated. Marty
  4. Hi Noki. I am going to try and add the following script to my already existing script: function onPlayerQuit() local playerAccount = getPlayerAccount(source) -- get his account if (playerAccount) then -- if we got the account then local playerMoney = getPlayerMoney(source) -- get his money amount setAccountData(playerAccount, "piraterpg.money", playerMoney) -- store his current money amount in his account data end end addEventHandler("onPlayerQuit", getRootElement(), onPlayerQuit) -- add an event handler function onPlayerLogin() -- when a player logins, retrieve his money amount from his account data and set it local playerAccount = getPlayerAccount(source) -- get his account if (playerAccount) then -- if we got the account then local playerMoney = getAccountData(playerAccount, "piraterpg.money") -- get the money amount was store in his account data -- make sure there was actually a value saved under this key (check if playerMoney is not false). -- this will for example not be the case when a player plays the gametype for the first time if (playerMoney) then setPlayerMoney(source, playerMoney) end end end addEventHandler("onPlayerLogin", getRootElement(), onPlayerLogin) -- add an event handler I have found this script on the mta wiki, and will edit it that it will work on my server with the stats saver. I made this: function getPlayerFromPartialName(name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end function changePedStats(thePlayer, _, name) local plr = getPlayerFromPartialName(name) if (not plr) then outputChatBox("There is no player with this name", thePlayer) return end local stat = setPedStat(plr, 75, 1000) if (stat) then outputChatBox("Congratulations! You have given "..getPlayerName(plr).." dual UZIs!", thePlayer) end end addCommandHandler("givestats", changePedStats, true) function onPlayerQuit() local playerAccount = getPlayerAccount(source) if (playerAccount) then local pedStats = getPedStat(source) setAccountData(playerAccount, "zi.pedstats", pedStats) end end addEventHandler("onPlayerQuit", getRootElement(), onPlayerQuit) function onPlayerLogin() local playerAccount = getPlayerAccount(source) if (playerAccount) then local pedStats = getAccountData(playerAccount, "zi.pedstats") if (pedStats) then setPedStats(source, pedStats) end end end addEventHandler("onPlayerLogin", getRootElement(), onPlayerLogin) Right now I'm actually a noob in scripting, so don't expect too much. I'm learning it. The script above, do you think this will work? Marty
  5. The first code was the needed one indeed, thanks alot! But when you die/relog, you lose the skills. How do I make it so it saves?
  6. Hi Noki, Thanks alot for your help! I tested it and it works completely fine. But how do I make it that the players who get's the skills get the message, and not me when I give the skill to the player?
  7. Hi lads. I tried to create a script in where I have to make a command to give players a UZI skill. But now, when I type the command, everyone in the whole server gets the skill, but I am looking for the feature to give the skill to just one person. What do I exactly have to add to the script? I don't have a clue. I made the command to be admin-only. This is what I have got so far: function changePedStats(thePlayer, commandName) if setPlayerStat(thePlayer, 75, 1000) then outputChatBox("Congratulations! You have got dual wield UZI stats!") end end addCommandHandler("givestats", changePedStats, true) Any help would be appreciated. Regards, Marty
  8. Hello I have a server on MTA:SA and I tried like 7 spawn panels. They all didn't work, telling me while registering that the account already exist, or an error accured, try again. Is there any way to solve this? It's not a script error because 4 of these working before untill I started a new server. Can anyone help me with this? -Marty
  9. Nope, didn't, just did it and now it works! thanks so much!
  10. What do you mean? I can open the script by typing /editor, and I'm in the Admin ACL group. But when I press Browse Scripts, all the scripts shows up. But when I click on a script, alot files should show up like meta.xml etc etc. But they doesn't, when I click on a script nothing shows up in the right column. Do I need to update my ingame script editor or can I solve it on another way? Thanks for the fast response by the way! -Marty
  11. Hey guys I currently have an ingame script editor by castillio. But for some reason it doesnt work anymore. Maybe its outdated since the latest update? Well I don't know. What's the link to the latest ingame script editor existing? Thanks in advance, -Marty
  12. Hi there I'm using a jail system, which places the selected person in the jail. But the problem is, when the player relogs, he spawns in the jail. But the spawn panel is still open for him. When he spawns by the spawn panel he's out of jail and he can do what he want, even though the jail time is still going. So I came on the idea to repeat his TP to the jail every 5 sec. Like if he's jailed for 1 minute, every 5 seconds he'll TP to jail, even if he's in. So if he relogs, he'll spawn at the place where he wants to spawn by spawn panel, but because the TP is repeating, he'll get back to jail after that 5 seconds anyway. But I don't know how to repeat that. Can anybody help me with this? Greetings, Marty
  13. Hi there, Is there any existing script which starts some resources you want to start? Like when you start the resource ''startresources'', the resources you want to start will start. Like you write down in a specefic file the resources ''snow'', ''armyskin'' and ''m4gun''. When you start the ''startresources'' resource, the snow, armyskin and m4gun resources will start. Is this one existing or possible to be made? Greetings, Marty
  14. Hello There Everyone is killing zombies all the way to earn their money to buy some nice weapons from it. But sometimes the server crashes, and all the resources are turning theirselves off. So I need to start all the resources over again, but that ain't the biggest problem. Every time when this happens, the money dissappears! I hate this, people are just losing their money. Is there any way to save the money with a simple script or something like that? Please help me out! Greetings, Marty
  15. marty000123

    /jp

    Hi guys I need something pretty urgent. Can some of you make like if you're in the acl group ''jp'' that you can do /jp ingame , you'll get a jetpack and when you do /jp again, you won't have it anymore. (when pressing F on the ground wont make you lose the jetpack) thanks in advance! Greetings, Marty
  16. Hi Guys, I requested a script before (a song requester), then he replied to me to add him on skype. In the first case I didn't fully trust a stranger to give him money for a script. But I took the risk, I sent him 5 euro's for it and I got a great song requester back, nice looking, low priced. You might like his service Marty
  17. Hai I'm looking for a script which makes players able to request a song with ''/song '' If a player only does /song, without the name after it, the words ''Enter a song!'' must appear in their screen. (Red letters) The players in the ACL group called ''Staff'' will get the song request. Output (for people in ACL group ''Staff''): '' A Song has been requested by . Requested Song: . '' (Blue letters) Thanks in advance! Marty
  18. Hi I suggested this more times before but it never worked. I'm trying something else now. I'm looking for a staffchat. If you press M you will talk in staffchat. Only players in the ACL group ''Staff'' will be able to use the Staffchat (M button). If someone enters a message and sends it, only ppl in the ''Staff'' ACL group will be able to hear it. Thanks in advance Marty (So if Staff's from ACL group ''Staff'' press M, they can talk in Staffchat, no matter how, but make it work C: )
  19. Thank you very much!
  20. Hey, thanks for your respond. When I use this, it's not working anymore. Nothing shows up, nothing happens. Solution? Marty
  21. Is it possible to add a reason to it? Like, /fine player amount reason Example /fine Marty 10000 Car parking Output: AdmCmd: Finedplayer has been fined $Amount by Finer (just like you had), Reason: Car parking That would be awesome and it would totally finish it! If it's impossible, I won't blame. Thanks anyway
  22. My Hero! Thank you very much!
  23. marty000123

    Fines!

    Hello I'm looking for a script which fines players. Like, only the ACL group ''HQ'' can fine players. It will be something like this. In this example my name is Lil'Bitch. Lil'Bitch: /fine NewbIE11 50000 So ''NewbIE11'' gets fined $50k. Means, they will lose $50.000 of their money. Output on EVERYONE'S SCREEN: 'AdmCmd: NewbIE11 has been fined $50000 by Lil'Bitch. That output needs to be RGBA 255 0 0 255 or #FF0000. So the output line will be this AdmCmd: finedplayer has been fined $amount by guywhofined. (I don't know if this resource already exist, didn't find it. If you need money to create this, I can give. If you can do it easily/for free, would be great. Please respond.) Thanks in advance! Greetings, Marty
  24. Sorry, these were some urgent scripts I needed and now I got them, thanks. Marty
×
×
  • Create New...