• Content Count

  • Joined

  • Last visited

  • Days Won


LopSided_ last won the day on August 17 2017

LopSided_ had the most liked content!

Community Reputation

67 Popular


About LopSided_

  • Rank


  • Gang
  • Location

Recent Profile Visitors

2,177 profile views
  1. LopSided_

    [HELP] MYSQL Error

    Yeah, your arguments are all messed up. unix_socket should be part of the second argument, the string is also formatted incorrectly. dbConnect("mysql", "dbname="..databaseName..";host="..databaseHost..";unix_socket=/var/run/mysqld/mysqld.sock", databaseUsername, databasePassword, "autoreconnect=1")
  2. LopSided_

    i have a problem

    Your event handling is all wrong. Do not pass the local player as an argument to the event like this: triggerServerEvent("onLoginWith",localPlayer,user,pass) Things wrong here: - you're making the source element the local player, that will not work - you're trying to pass the local player as an argument You should use the predefined variable `client` on the serverside. `client` contains the player that called the event. This is for security purposes. You should also set the source argument to resourceRoot, instead of localPlayer So you'd have: triggerServerEvent("onLoginWith", resourceRoot, pass) addEventHandler("onLoginWith", root, function(pass) local user = client ... end) Now in the rest of your code where you've tried to use 'source' to get the player, replace it with client.
  3. LopSided_


    This can be done with some basic math. Let's say we're positioning the notifications from 0,0 on the client's screen (top left) --Notification values local notificationBaseX, notificationBaseY = 0, 0 local notificationWidth, notificationHeight = 200, 60 local notificationMargin = 7 local notifications = {} --Our table where the notifications are stored. function createNotification(text) --Example function to create a notification table.insert(notifications, text) end function renderNotifications() --Draw the notifications for i, notificationText in ipairs(notifications) do local notificationX, notificationY = notificationBaseX + notificationMargin, notificationBaseY + (notificationHeight + notificationMargin) * (i - 1) --Add the notification height & margin, then multiply that by the current notification index. We'll start indexing at 0 by removing 1 from the current index. dxDrawRectangle(notificationX, notificationY, notificationWidth, notificationHeight, tocolor(255, 0, 0)) dxDrawText(notificationText, notificationX, notificationY, notificationX + notificationWidth, notificationY + notificationHeight, tocolor(255,255,255), 1, "default-bold", "center", "center") end end addEventHandler("onClientRender", root, renderNotifications) --Create the notifications createNotification("Notification 1") createNotification("Notification 2") createNotification("Notification 3") I hope that's enough to get you started. Any questions just ask
  4. LopSided_

    Ped Atack

    Tons of things wrong with this. For a starter you're calling the onPedRender function every frame without any kind of checks to see if "thePed" exists, or if he already has the weapon which you're trying to give him - that's extremely bad practice. Also, where is this "findRotation" function? You haven't included in the code. In future please provide the full error, I highly doubt it was just "a nil value". That helps no one.
  5. LopSided_

    string.upper problem

    Well it looks like you didn't enable OOP in the meta.xml, using <oop>true</oop>
  6. LopSided_

    nested table problem

    (edited answer) You are inserting the ped by doing table.insert( taxidf[player].ped, { ped } ) which makes a table inside the ped table. To retrieve the ped, you'd need to do: local ped = taxidf[player].ped[1][1]; But really, unless you need it for a specific reason, you should just change the insert line to: table.insert( taxidf[player].ped, ped )
  7. LopSided_

    [HELP] API for youtube

    Use Google to look for other YouTube APIs. or host your own YouTube downloader/converter using youtube-dl and FFmpeg.
  8. LopSided_

    [REL] Better Hydra Missiles

    Good stuff
  9. LopSided_


    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.
  10. LopSided_

    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
  11. LopSided_

    how to compress dff and txd file

    Does that actually compress the TXD though or the images?
  12. LopSided_

    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.
  13. LopSided_

    comparing player serial with a string serial. SQL

  14. LopSided_


    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 )
  15. LopSided_


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