Jump to content

xXMADEXx

Members
  • Posts

    2,718
  • Joined

  • Last visited

Everything posted by xXMADEXx

  1. You need to delete all the default resources then place in the NG resources and replace the mtaserver.conf with the one from NG. Whenever I get around to it.
  2. I think that it's the coolvetica font. http://www.dafont.com/coolvetica.font
  3. It would be better to use account data rather than using a database. --[[ Police chiefs can ban from law at unlimited time ]]-- function add_law_ban(police_chief, cmd, bad_officer) -- Check if an officer to kick was provided if not bad_officer then outputChatBox("Correct syntax: /lawban ", police_chief, 255, 0, 0) return end -- Check if the provided cop account exist local cop_to_ban = getAccount(bad_officer) local cop_to_ban_plr = getAccountPlayer(cop_to_ban) if not cop_to_ban then outputChatBox("Correct syntax: /lawban ", police_chief, 255, 0, 0) return end -- Notify the cop if online if cop_to_ban_plr then exports.GTWtopbar:dm("You have been kicked from the force by: "..getPlayerName(police_chief), cop_to_ban_plr, 255, 0, 0) -- Reset job and team if online setPlayerTeam(cop_to_ban_plr, getTeamFromName("Unemployed")) setPlayerNametagColor(cop_to_ban_plr, 255, 255, 0) setElementData(cop_to_ban_plr, "admin",false) local skinID = exports.GTWclothes:getBoughtSkin(cop_to_ban_plr) setElementModel(cop_to_ban_plr, skinID) setElementData(cop_to_ban_plr, "Occupation", "") local ac = getPlayerAccount ( cop_to_ban_plr ); if ( not isGuestAccount ( cop_to_ban_plr ) ) then setAccountData ( ac, "lockedFromPolice", getTickCount ( ) + 5*60*1000 ); end end -- Notify the police chief issuing the command outputChatBox("Police: "..bad_officer.." was kicked from the police job", police_chief, 255, 100, 0) end addCommandHandler("banfromlaw", add_law_ban) addCommandHandler("lawban", add_law_ban) When the player goes to the job, you can check the "lockedFromPolice" account data which will either return false/nil or an integer. If it's an integer, check to see if getTickCount is smaller than the value and if it is then that means they are still blocked from the job.
  4. why why why why would you bump a 2 year old topic?
  5. Use the same technique as the other script that NeverGiveup posted. You just have to get the players group using getElementData ( thePlayer, "Group" ) and check to see if it is equal to Mafia. You need to try to do it yourself before directly asking for help, if you ever want to learn anything.
  6. Are you sure that the sound is successfully being created? Also, I'm not sure if you saw this, but for the getSoundBPM function:
  7. https://wiki.multitheftauto.com/wiki/Re ... t#spawnBot
  8. xXMADEXx

    Login panel

    Rather than searching for the login/register commands in the admin resource, you can deny access to them in acl.xml. If you still don't want to do that for whatever reason but don't want to search for the script, then you can do something like this to block the command from being created: local _addCommandHandler = addCommandHandler function addCommandHandler ( ... ) local args = { ... } if ( args [ 1 ]:lower ( ) == "login" or args [ 1]:lower( ) == "register" ) then return false; end return _addCommandHandler ( ... ) end
  9. Use this: getElementData ( thePlayer, "Group" ) It will return a string representing the players group. You can simply use an if statement to see if the player is in the group. You can do this yourself. Ikr, but most of them are new scripters (if even scripters at all) and have no idea how to work with so much code lmao.
  10. Thanks for reporting this, I can't fix the bugs that I don't know about. It should be fixed in the next release.
  11. Great news! I've released Nerd Gaming 1.1.4, which is equipped with some great new features for both players and administrators! Change log
  12. Hello! 1. Functions are a default feature of Lua. They are made so that you can just write a piece (large or small) code only once, and just use the function name to call it rather than having to rewrite the code. If/when you learn other languages, you will find that they are similar to methods in object-oriented languages. 2. Client scripts run on the clients game and the server scripts run on server-end. Client scripts are used for thing such as drawing interfaces. Server scripts are use for things like saving information to a database. 3. Whoah, slow down! The first thing that you should do is simply learn and get practice with Lua. Definitely don't even attempt C/C++ because those languages are complex and rather difficult to learn. However, if you do want to learn other languages I would recommond that you check out C# (c-sharp), PHP or Java. Lua: viewtopic.php?f=148&t=40809 C#: https://msdn.microsoft.com/en-us/librar ... 97(v=vs.71).aspx PHP: http://php.net/manual/en/introduction.php Java: http://heather.cs.ucdavis.edu/~matloff/ ... Intro.html Good luck with learning Lua and any other languages that you try!
  13. What exactly are you looking for?
  14. Here, I uploaded it to Vimeo. Link to video.
  15. You can see how JR10 did it here.
  16. It's an issue with the database. Make sure the database is successfully connecting. If it's not, just change CONNECTION_TYPE value in NGSQL/meta.xml to sqlite. and how can i change it please? Watch the installation video. It covers how to do everything.
  17. Looks nice, good job! (System\test.lua made me laugh )
  18. Just for a tip in the future, i'm sure just restarting your PC would have done the trick.
  19. This literally did nothing but add a pointless loop, and you should check out the unpack function. That's just because customblips is calling the file from a different resoruce, so it needs the :resource_name/path/to/image.png. This error can be caused if the image file doesn't exist in that location (make sure it does) and if it does exist, the image may be corrupt.
  20. I'm just going to be brutally honest with you... Nobody (or no professional scripters at least) are going to help you out with making this. Most of us are busy with our own life's or servers. To make something like that, it takes dedication and you're going to have to learn Lua (and probably SQL too.)
  21. While you're at it, you should check out the dxGUI system, but it's not complete yet.
  22. xXMADEXx

    dbConnect

    If all the connection details are correct, the host itself could be blocking remote connections. Check debugscript (/debugscript 3) to see what it says about the connection error.
  23. there is no way , the only one is using multiple computers, virtual ... but as it is in the samp doing? cannot be such that it is not possible to do it... SAMP isn't the same as MTA. Really the only thing in common between the two is the fact they enable multiplayer for GTA:SA. Fake players in MTA isn't possible.
  24. You just need to use setElementData/setAccountData and increase the key by one anytime they win. Use getAccounts and getAccountData to retrieve the accounts and wins.
  25. What do you mean role? There's no default "roles" in MTA. You're probably looking for the setElementData function.
×
×
  • Create New...