LopSided_

Members
  • Content count

    282
  • Joined

  • Last visited

  • Days Won

    1

LopSided_ last won the day on August 17

LopSided_ had the most liked content!

Community Reputation

64 Popular

3 Followers

About LopSided_

  • Rank
    Pee-Wee

Details

  • Gang
    EPG
  • Location
    UK

Recent Profile Visitors

1,534 profile views
  1. table.concat

    You don't. You need the command syntax to be different, such as: /oxquestion This is the question text|This is the answer text addCommandHandler("oxquestion",function(player, cmd, ...) local t = table.concat({ ... }, " ") local questionTable = {} local answerTable = {} local switch = false for i,v in ipairs(t) do if v == "|" then switch = true else if switch then table.insert(answerTable, v) else table.insert(questionTable, v) end end table.remove(t, i) end end) "|" is the separator for question/answer.
  2. MTA not working.

    Did you try reinstalling GTASA rather than MTA? It's a problem with a GTASA file, not MTA (at least as far as I can tell from the info provided) ...GTA:SA had trouble opening the file 'TIMECYC.DAT'... Try restoring that file from the error to original, (google for ''timecyc.dat backup'' for a download) in your GTA folder. (or it may have been removed by customization/bad modding, it should be located at Program Files (x86)\Rockstar Games\GTA San Andreas\data
  3. how to compress dff and txd file

    Does that actually compress the TXD though or the images?
  4. how to compress dff and txd file

    As far as I'm aware you can't compress TXD or DFF. You should compress the images you use rather than the actual TXD. Also don't use huge dimensions for your textures if they are for something that isn't important, or something small. I don't really use many custom TXDs in my stuff but I imagine 512x512 would be the biggest you want your images to be. Again, you can't compress a DFF. File size is linked with the amount of polys used in your models, so you should work on decreasing them - this is especially true if you're downloading free models from around the web as most of them won't be optimized.
  5. comparing player serial with a string serial. SQL

    https://wiki.multitheftauto.com/wiki/SetPlayerMuted
  6. antiban

    I wasn't aware cancelEvent() couldn't stop the ban, however there's no need to loop through all the bans (highly inefficient), just use the banPointer parameter provided onPlayerBan edit: just checked your errors to the script I provided, it looks to me like you either tried banning a player via console or you're using a custom ban script and not utilizing the responsibleElement argument within banPlayer()/addBan() function verifyBan(banPointer, responsiblePlayer) if not isElement(responsiblePlayer) then print("responsibleElement is Console or none stated for current ban"); return false end if getElementType(responsiblePlayer) ~= "player" then return false end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then removeBan(banPointer)--Remove the ban on admin, using banPointer addBan(getPlayerIP(responsiblePlayer), nil, getPlayerSerial(responsiblePlayer), root, "Banning other admins") --Ban the offending moderator outputChatBox (getPlayerName(responsiblePlayer).." has been banned for banning admins!", getRootElement(), 255, 0, 0) -- Output the ban. end end addEventHandler ( "onPlayerBan", getRootElement(), verifyBan )
  7. antiban

    I assume you used debugscript? Can you tell me what the errors are, or what exactly it is that doesn't work?
  8. antiban

    This isn't a problem you should initially be trying to solve with code. You shouldn't be giving people permissions on your server if you can't trust them. However, something like this might help. If anyone tries to ban an admin the action will be blocked and they'll get banned them-self (Serial and IP ban). function verifyBan(banPointer, responsiblePlayer) if getElementType(responsiblePlayer) ~= "player" then return false end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then cancelEvent() --Cancel the ban on admin addBan(getPlayerIP(responsiblePlayer), nil, getPlayerSerial(responsiblePlayer), root, "Banning other admins") --Ban the offending moderator outputChatBox (getPlayerName(responsiblePlayer).." has been banned for banning admins!", getRootElement(), 255, 0, 0) -- Output the ban. end end addEventHandler ( "onPlayerBan", getRootElement(), verifyBan ) Not tested, try it out and see if it works.
  9. antiban

    I don't get what you're trying to do. Players shouldn't have access to ban - why would admins be getting banned?
  10. Double Your money! and invest online! Best PTC Site

    Doesn't this just prove that you're (probably) making jack from the site, so you've had to resort to posting your referral link on forums? Nice try
  11. server blacklist help

    Here's an example of a PHP script I found with a quick google search https://gist.github.com/tbreuss/74da96ff5f976ce770e6628badbd7dfc Combine this with the PHP SDK (https://development.mtasa.com/wiki/PHP_SDK) and the callRemote function (https://development.mtasa.com/wiki/CallRemote) to send the Player's IP to the php script and return a result.
  12. Help me Plis

    local screenWidth, screenHeight = guiGetScreenSize() local webBrowser = createBrowser(screenWidth, screenHeight, false, false) function webBrowserRender() dxDrawImage(0, 0, screenWidth, screenHeight, webBrowser, 0, 0, 0, tocolor(255,255,255,255), true) end addEventHandler("onClientBrowserCreated", webBrowser, function() loadBrowserURL(webBrowser, "http://wiki.multitheftauto.com/wiki/Main_Page") addEventHandler("onClientRender", root, webBrowserRender) end ) Load this script and you should have all the information you need.
  13. Hi

    Hey guys, look at this random chunk of code. Can you try and decipher what problem I'm having without giving you any information whatsoever? First of all it might help to tell us what exactly the problem is. What errors are you getting? Where are your database connection details?
  14. Request info from server

    You can't return values like that, you have to create an event running the other way (server->client) Simple example --Clientside function getData(charid) triggerServerEvent("pushData", root, charid) --send charid to server end function receiveData(info) --do something with info end addEvent("onClientReceiveData", true) addEventHandler("onClientReceiveData", root, receiveData) --Serverside function processData(charid) local thePlayer = client --client is a predefined variable, contains the client who triggered the event --use charid to get your info triggerClientEvent(thePlayer, "onClientReceiveData", thePlayer, charid) --send info back (replace "charid" with whatever you want to send) end addEvent("pushData", true) addEventHandler("pushData", root, processData)
  15. load function from file

    Why don't you use exported functions instead? https://wiki.mtasa.com/wiki/Call