Jump to content

50p

Retired Staff
  • Posts

    2,973
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by 50p

  1. This code was taken from my "anti_flood" script.
  2. - Do you get warning/error messages? - What is player? - Debug your script before you ask questions, please.
  3. This code looks familiar to me and you say "I make some and don't work."? If you made this script yourself, you'd know how to use the function given to you by varez. Well, you can use the scripts from community website since they are all public scripts and we are here to help/teach you but I can't stand liars and taking credits for script that someone else made is just wrong. If you'll keep doing it, you will face consequences.
  4. 50p

    Problem

  5. 50p

    Players

    You can use some kind of ID system, eg: https://community.multitheftauto.com/index.php?p= ... ils&id=953 Then when you have player ID you can do something like: function moveObj( player ) local ID = --(you need to get player ID with "id system") moveObject( _G[ "object"..tostring(ID) ], 0, 0, 0, 0 ); end
  6. You may want to use onPlayerPickupUse instead.
  7. 50p

    LUA Function

    Simpler: local playerCount = #getElementsByType( "player" );
  8. guiSetVisible(GUIEditor_Window[1],false) What do you think this line of code is doing? Well, guess.
  9. 50p

    Playlabel

    It's changing fast because his timer's interval is to 50ms, that's 20 times in a second. Change it to 500 or 1000. His code is wrong too.
  10. 50p

    client side xml

    Not necessarily. You can use : <config src="phones/locationPhones.xml" type="client" /> Then you can use getResourceConfig instead.
  11. 50p

    spawning as CJ bug

    Debug it on the public server then. Your xml file may be missing some data.
  12. Ok, closing before this gets too far. I'll open it if the author of the topic will ask for it.
  13. Click the link I gave you in my previous post.. Don't be lazy and read the content of that page. Also, don't give up, if you don't understand it after first time reading because that's normal, read it again and again until you understand it because that page covers event system pretty well.
  14. Hmmm... you tried source? But what is source? Him and you should learn more about what source is because that's one of the most important stuff you need to know about.. https://wiki.multitheftauto.com/wiki/Eve ... ent_source Also, don't come up with weird ideas.. I mean where would playerSource come from? You have to have variable declared before you use it unless you're sure you want to use it as nil
  15. Because playerSource is nil?
  16. So many mistakes in just 2 line... Well, I don't have that much time to explain it all but Lua tutorials is what you're after.
  17. You've had tips on the first page; telling you to use table and timers to (un)lock the command..
  18. 50p

    Afk

    You're lying because there are a few topics about AFK already.
  19. 50p

    [REL] Anti-Flood 1.1

    It's there... https://community.multitheftauto.com/index.php?p= ... ils&id=202 You may have to log in or search for "anti_flood"
  20. You can't see it because it's in the map file that he showed in the first post that you probably forgot about.
  21. All I'm saying is you need to modify the resource that has this command because you can't make separate resource that will stop the command from working.
  22. What problem with the colour do you have?
  23. Explain what you did before we close the topic. It will help others as well.
  24. You can check if the hit pickup is a money pickup before you cancel event. Something like this: function onUse(hitPlayer) local teamName = getTeamName( getPlayerTeam( hitPlayer ) ) local eleData = getElementData(source,"team") if ( eleData ~= teamName ) and ( getElementModel( source ) ~= 1212 ) then -- 1212 or whatever model ID is your money pickup cancelEvent() end end addEventHandler("onPickupHit",getRootElement(),onUse)
  25. If you want to disable command, you have to modify its handler. There will be no script to stop commands because there is no function to "cancel" command.. but before you start editing the command you should gain some general knowledge about Lua itself.
×
×
  • Create New...