Jump to content

Bonsai

Members
  • Posts

    1,031
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Bonsai

  1. You add that to a normal resource? So you have one resource with all map files in it? Sorry, I think I still don't understand this..
  2. What do you mean by GUI anyway? Elements created by gui functions can be relative to the screen and each other. Thats pretty easy to make them look equal on all resolution, except for the textlabels maybe. For dx functions you can also make positions and stuff relative, by multiplying the screenX or Y by some value. THere you can also scale font size, but it might look bad.
  3. Where you stole that? And I didn't really understand your question... fadeCamera function makes camera go black, so find it and disable it.
  4. Keyword is "relative" I guess. Else you have to get players resolution and scale everything.
  5. Oh right, sorry. Of course I'm not using MySQL
  6. Hey Peeps, just a little question. Imagine there is a /stats command. Should executeSQLQuery be used to get the stats every time the command is used, or should the stats be stored in a table on player join and saved when he quits? Basically, is there any real disadvantage when using executeSQLQuery? So far I haven't notice any performance issue, I just wanna know if its problematic doing it like that. Bonsai
  7. Well, I thought maybe the database isn't replaced.
  8. Make sure the server is offline when u edit databases or acl.
  9. If you don't provide some more infos nobody will be able and/or willing to help you.
  10. local result = executeSQLQuery("SELECT playerName, timeText, dateRecorded, extra FROM ? ORDER BY timeMS ASC LIMIT 10", mapname ) This is what I do in my toptimes script.
  11. I just suggest you to do GUIs without any resource. Its good training, you know exactly what every line is for and its not that hard at all.
  12. I guess you could just go to the Map Editor and check the pickup category. Select one and press F3.
  13. Bonsai

    Max INT value

    As far as I know 8 byte, aka you don't have to care about it
  14. I used that for a radar, its not suitable for world positions. (z coordinate)
  15. I didn't call it a solution. Its just supposed to be a guideline. This way people still have to think about it and can't just copy/paste it, what he is probably going to do with your code. And that will make him come back in the future, asking basic questions because you don't learn from copying, and whats even worse, he might expect others to post a working code, as most of topic creators already do.
  16. Another solution might be, to multiply by 100 to get rid of decimals (assuming there are 2) before saving and dividing by 100 when working with it.
  17. I did some more testing and it seems like it takes some time until the position is updated. Everything I posted above is done within one function. But if I attach the element some time earlier, it will return the right values. That means, I can't change the offset directly in that function. I'm now attaching the object earlier offset by 1, and just multiply with the desired distance. Not the best way to do it, but as long as it works. I would use math functions to get the exact point in front of a vehicle, but it seems to fail for certain rotations.
  18. You could just something like this: local variable = y function dxDrawImage ( x*0.4, variable, 300, 50, 'images/dead_player.png', 0, 0, -120 ) if variable > y*0.875 then variable = variable - 1 end end onClientRender
  19. Hey, I'm playing around with attaching Elements and I discovered something weird. This is what I do: local veh = getPedOccupiedVehicle(localPlayer) local x, y, z = getElementPosition(veh) dummy2 = createObject(1337, x, y, z) dummy3 = createObject(1337, 0, 0, 0) attachElements(dummy3, veh, 0, 20, 0) local x5, y5, z5 = getElementPosition(dummy3) --createObject(1337, x5, y5, z5) moveObject(dummy2, 3000, x5, y5, z5) The object is attached to the vehicle, and its right where I want it to be. But it seems like getElementPosition doesn't return the real values. My other object "dummy2" doesn't move to where the attached element is. Also, when I create an object on the positions of the attached one, its at some different position. Is there some bug on getting positions of attached Elements?
  20. I'm not sure if you are trolling or actually serious about what you are saying. Therefore, I won't pay attention to this topic anymore.
  21. Which is wrong, because all the race servers use the default race gamemode (some don't, because they wanted to revamp everything to correspond their own methods of making things), which obviously is edited. But the point is, you don't need to make your own, you just have to place enough stuff around to make it work with your own system. @Citizen: His example was just to show how easy it is to make one. The rest is simply just edits to the gamemodes so that they only fetch the players within that gamemode, which on the other hand is just dimension or element data or whatever you use to do that. It's nothing "complex", as mentioned above... Using existing gamemodes like race and do all the editing seems way more complicated to me than just creating your own one. Of course there are functions you can take from there without much editing, but basically just doing edits without knowing exactly what is done in every line and why, because you didn't write it, will cause much more trouble. However, I only know the race gamemode, and its in my opinion not worth to be used for that, since there is a lot of weird stuff inside which can be handled much easier.
  22. Search the forum, there are more than enough topics about custom radars.
  23. Yeah, the actual problem is fileDelete says its unable to delete file. I was wondering why so I tried to delete it in its folder. There it shows a file in use by gta_sa.exe message. Only restarting the resource is stopping this.
  24. local x,y, guiGetScreenSize() dxDrawRectangle(0, 0, x/2-30, y/2-30, tocolor(0, 0, 0, 255), false) -- BLOCK Edit: Thats the middle of the screen. Try it out.
×
×
  • Create New...