Jump to content

Feche1320

Members
  • Posts

    461
  • Joined

  • Last visited

Everything posted by Feche1320

  1. Well, you didn't read then. That simple code doesn't let me put colour codes at all.
  2. No, that isn't working, as I supposed.
  3. I'm trying to avoid people only with color codes, for example, if you do /nick #884466 you will be named as ' '(blank name), so I was trying this: addEventHandler("onPlayerChangeNick", g_Root, function(old, new) if new == "#%x%x%x%x%x%x" then outputChatBox(source, "You can't have just colour codes in name.", source, 255, 0, 0) cancelEvent() end end ) But it isn't working at all. Thanks.
  4. Yes!! It was this, thank you!
  5. I am making my own chat log system, but there is a minor problem: When I open the file using fileRead, it will start writting at pos 0 and it will overwrite any existing text, and I need it to start writing from the end, how can I do this? Thanks
  6. Yes, becouse I have the maps in a .zip file, and I need to make a /deletemap command.
  7. Hey, I was like you, I switched from SAMP to MTA.. Use the Wiki at all times, it really helps you out alot, that's how I did practically understand everything from LUA. Anyways, knowing PAWN it will make you some things easier, so don't waste that knowlodge. If Wiki couldn't help you, the forum is the best choice then, and always try to make your own scripts. If you need some help, feel free to ask! Good luck!
  8. I have my maps compressed in a .zip file... file delete only deletes a file that is on the same resource, any way to delete a file in the mods/deathmatch/resources directory? Thanks
  9. When and where should I use 'pairs' or 'ipairs'? For example: local table = { "hello", "i", "am", "here", "not" } for i, tmp in ipairs(table) do outputChatBox(tmp) end local table = { "hello", "i", "am", "here", "not" } for i, tmp in pairs(table) do outputChatBox(tmp) end Will print the same: 'hello i am here not' So.. differences? Thanks
  10. Feche1320

    Login

    Open un your acl.xml and change the 'access' to false: <right name="command.register" access="false" /> <right name="command.login" access="fals
  11. Well, /facepalm on you.. I made the spectators sytem with colored names.. And I gave credits to Zango only for using the dxDrawText positions, becouse the script is TOTALY re made.
  12. Yes, it was working fine without the resource in a .zip, yesterday I compressed each map in a .zip file to save some space, but now I can't rename the map.. meta.xml doesn't chage.
  13. I changed == to string.find and works.. pretty rare..
  14. Any way of doing this? It doesn't change it at all.. local currentmapres = exports.mapmanager:getRunningGamemodeMap() file = xmlLoadFile(":" ..getResourceName(currentmapres).. "/meta.xml") if file ~= false then local oldmapname = xmlFindChild(file, "info", 0) if oldmapname ~= false then local newname = table.concat({...}, " ") xmlNodeSetAttribute(oldmapname, "name", newname) outputChatBox("* Map name is now '" ..newname.. "'.", g_Root, 46, 154, 254) triggerClientEvent("updateMapName", g_Root, newname) setResourceInfo(currentmapres, "name", newname) xmlSaveFile(file) xmlUnloadFile(file) end end end
  15. function isInTable(table, arg) local result = false for i = 1, #table do if table[i] == arg then result = true break end end return result end If I insert in the table "asd", and then use isInTable(the table, "asd") it will return false always, why? (I don't see any errors on code) Thanks
  16. So how can I make my own isMapDowloading function so it won't kick it? Thanks
  17. I am making my ping kicker, but I have a problem with isTransferBoxActive() When the map is downloading, isTransferBoxActive returns false, making it to kick the player. But when it's downloading a map resource (txd, music, etc) isTransferBoxActive returns the right value, true. Is this a bug? Thanks
  18. Well, maybe I will do something related to strlen and split it?
  19. Thank you! Works great, only one more problem: dxDrawText(cap, ax, ay, ax + w, by, color, scale, font, "left", "top", false, true) Doesn't break the text to a new line..
  20. But folder will stay there, empty. I need to delete it too.
  21. Can someone do it with centering compatible? I'm trying to do it, but I fail
×
×
  • Create New...