Jump to content

3aGl3

Members
  • Posts

    128
  • Joined

  • Last visited

1 Follower

Details

  • Gang
    Groove

Recent Profile Visitors

1,921 profile views

3aGl3's Achievements

Poot-butt

Poot-butt (14/54)

20

Reputation

  1. You could try to load that text from a file or similar and then use guiSetText, similar to this: local text local file = fileOpen( "welcome_text.txt" ) if file then text = fileRead( file, fileGetSite(file) ) fileClose( file ) end -- things happen here... GUIEditor.memo[1] = guiCreateMemo(0.46, 0.10, 0.48, 0.81, "", true, GUIEditor.window[1]) guiSetText( GUIEditor.memo[1], text ) -- more things happen here...
  2. dxCreateFont should not be part of the onClientReder call. If that is the case for you (you've given very little code, so we can't tell) that could lead to crashes.
  3. Did you two check if the mta process has access rights onto the *.db file?
  4. That seems like a good idea, just feed the table dynamical. When a relevant ped streams in on the client add it to the table, when it streams out remove it again.
  5. So, just giving a few ideas here, based on what info you gave... Why exactly do you need to loop through all of the peds? Can you break down the table further so the amount you loop through gets smaller? Can you reduce the amount the loops are run, e.g calling the loop less often?
  6. No no, you don't send the localClient to the Server. This is handled by MTA internally and will be available in the event Handler on the server side as the client variable. Sending the client to the server would work but it's pointless as you have the client variable and it's also unsafe as the elements send can be faked. See this thread for further predefined variables, also take a look at the triggerServerEvent entry in the wiki...
  7. This is really not the right place to ask this, this is the scripting section. If you have ssh access to the machine, with root rights you can just install mysql. Assuming you have a generic Linux machine it should be sudo apt-get install mysql-server If that doesn't work or you have a Windows Server look for a tutorial on how to install MySQL...
  8. Just execute the code on the clients side only. You probably want to create the marker on the client, and send the touch event off to the server so the server can check if the player isn't cheating or similar.
  9. Fair enough, on the storing side but what if I wanted to get every Sultan owner? On SQL I run a simple query that returns me a table with all players that own one, while like this I'd have to run a lua script that grabs every ones vehicles account data and then insert everyone into a table after going through all players...
  10. Except that you don't have full access to the integrated databases. Please explain how you want to efficiently store owned vehicles etc. with setAccountData and getAccountData. When using your own SQL database you can create a table for vehicles and a record for each vehicle...I don't even want to think about how you'd store a vehicle in account data. Let alone multiple.
  11. Maybe this or just implement it on your website instead, that's probably the better way anyway, people could just have the browser open in the background etc. Also there is no power going towards the game, which is not doing anything.
  12. I know your question has already been answered but I'd like to add to it. If you use a database or not really depends on what you want to. If you were to merely store a few values it would be way too much work, however since you asked for weapons, vehicles and the like a database is more or less a must have. You should also do yourself a favour and not mix the default MTA functions (setAccountData, getAccountData, ...) and your custom functions. Doing that will get messy really quick. The only functions I would maybe use are the account functions; e.g createAccount, ... that would allow you to use the integrated ACL. However you could also create your own rights system...needless to mention that is a lot of work.
  13. 1) Just use float3 colorrgb; in your shader, that should allow you to use dxSetShaderValue, you could also see the examples on the wiki for more details. 2) I suppose you are asking if you get problems when you call dxSetShaderValue in onClientRender events. Actually I'm not sure but I wouldn't call it more than really necessary.
  14. I think it's the comma in front of the where, so the mysql query line should be like this instead: mysql:query_free("UPDATE `characters` SET `etiket`="..mysql:escape_string(etiketLevel).." WHERE `id`='"..mysql:escape_string(getElementData(targetPlayer, "dbid")).."'")
  15. Perhaps your game only runs on a low FPS rate? Other than that I'd try to get the start time the first time you calculate the progress, that might help. Also proper tabs and spacing will help to make your code cleaner.
×
×
  • Create New...