Jump to content

SpecT

Members
  • Posts

    656
  • Joined

  • Days Won

    9

Everything posted by SpecT

  1. Use onClientKey and if the button is "F1" or "F2" then cancelEvent. In that function you could check if the player is in jail aswell.
  2. SpecT

    idk how to fix

    Lol why do you use a loop for that? Use this instead: local points = tonumber(getElementData(player, "points")) function() if points > 1 and points < 5 then outputChatBox(points) -- your code else -- maybe abuse end end If you want to use the loop anyway put the outputChatBox out of the loop. Example: local number = 5 local justDoIt = false function() for i=1,15 do if number == i then justDoIt = true else justDoIt = false end end -- closing the loop if justDoIt then outputChatBox(number) -- that will show the message just once end end But seriously there is no need to use loop for such thing.
  3. This should be moved to Tutorials! Anyway good job!
  4. Here you go: https://wiki.multitheftauto.com/wiki/Se ... _functions There are examples for every function listed in there. Good luck! PS: You can edit the ACL.xml file and reload it without server restart. All you need to do after you edit the xml file is to execute aclReload and it will refresh it.
  5. Yes, use the Admin Panel => Resources tab => Manage ACL button.
  6. Lel you said its your userpanel. If it was made by you, you would know what to do. The idea is: the map queue is stored in the userpanel and when a player buys a map (using command) it triggers event that is placed in the racevoting file. The function that should be in the racevoting file is similar to the "nextmap" command. So the buy map command should be in the userpanel's code, not in the race gamemode.
  7. Wow. That worked like a charm! Thanks man! #Solved
  8. Hey guys! Well the topic name says it all. I'm filling a table with serials that have more than 1 accounts registered to. But then it inserts the same serial once, twice or more (depends on accounts count). I tried some ways to prevent this but none of them worked. I even used the code provided from arezu here: https://forum.multitheftauto.com/viewtopic.php?f=91&t=40652&p=412597&hilit=table+duplicated#p414513 But it removes just some duplicates and the other stay there. So yeah .. I need help. Thanks in advance!
  9. Good job! But what about this https://community.multitheftauto.com/in ... ls&id=9528 ?
  10. Hello guys! I'm using MySQL database and the collected data is large. It's stored in a table in the server side and when it's needed it is being sent to the client(s). So I'm worried about the lag it causes while filling the table in the client side. So here is my question: How can I get rid or at least lower that lag while filling the table? Thanks in advance!
  11. Why don't you read the whole text that Anubhav wrote? He told you that position 0,0,0 is an underground position.
  12. Are you sure you use the command right ? example: /setLevel Steve 21
  13. What's the problem ? Any errors from debugscript ?
  14. To stop it starting with race gamemode you should remove the line in meta that is like "
  15. This should work, you messed everything. function setLevel(thePlayer,cmd,toPlayer,amount) local toPlayer = getPlayerFromName(toPlayer) local account = getPlayerAccount(thePlayer) local accName = getAccountName(account) if isObjectInACLGroup("user."..accName,aclGetGroup("Admin")) then if getElementType(toPlayer) == "player" and tonumber(amount) then setElementData(toPlayer,"Level",getElementData(toPlayer,"Level") + amount) outputChatBox("Your level was increased by "..getPlayerName(thePlayer).." ("..amount.."%)",toPlayer,0,255,0) outputChatBox(getPlayerName(thePlayer).."'s level was increased.",thePlayer,0,255,0) else outputChatBox("Failed to give because the player/amount was wrong.",thePlayer,255,255,0) end end end addCommandHandler("setLevel",setLevel,false,false) Also to set a level to the player you need to use his full nick (including color code if there is). So you should use getPlayerFromPartialName and replace getPlayerFromName[/with] with [wiki]getPlayerFromPartialName.
  16. Post the actual code. So we can see what you have changed and what not.
  17. WTF dude Who would do that just to get someone's account details. Well, if the player has rights in the server then he should be careful what he does on his PC. I don't have any more ideas. Maybe the others do have. Good luck!
  18. Well to do that they will need to have their username and password and also to use their serial. It will be a bit hard to do that BTW that's how the "Remember me" function works.
  19. Hmm .. I think that you only need to start the server. Then use your IP and the HTTP port to get the files.
  20. You could storage the player's login details in a xml file on their PC. And when they join check that file and if the account details are right then auto login.
  21. You could store the song data in XML, SQL or MySQL. And take that data (length) using song's name.
  22. Hah .. I just found out that this is that resource: https://community.multitheftauto.com/in ... ls&id=9262 But decompiled. Lel nice try to be "original".
  23. When they throw an item just use destroyElement to destroy it.
  24. Glad you fixed it! Good luck!
  25. You are welcome! If you need more help post it here. Good luck!
×
×
  • Create New...