Jump to content

Dzsozi (h03)

Members
  • Posts

    696
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Dzsozi (h03)

  1. Alright, thanks by the way again for the exportable script! It helped me alot too!
  2. That's for sure? Isn't there any possible way to do that?
  3. The only thing changes is the background's Y size for some reason. If I put these lines inside the script the background acts like there are no colorcodes in the text, but the text displays the color codes, but without changing the color. If I comment these 3 lines out while str:find ("#%x%x%x%x%x%x") do str = str:gsub('#%x%x%x%x%x%x', ''); end then the background works normally, but check the screenshots, maybe you will understand better what I'm trying to say. If these new 3 lines are inside the script: If not (background is working good now, not being cut down): But if I set the colorcoded parameter to true then it works as before, no line breaking. Or is it my fault, am I missing something or I did something wrong? Here's the current code: local borderDistance = 20 local tipBox = { } local boxX, boxY = borderDistance * displayWidth / displayWidth, borderDistance * displayHeight / displayHeight local boxPadding = 10 local lineHeight = dxGetFontHeight( 1, "default-bold" ) local minimumWidth = 350 local offsetWidth = 25 local tick = 0 addEventHandler( "onClientRender", root, function( ) if tipBox.string then local lines = 0 local wordbreak = false local str = tipBox.string while str:find ("#%x%x%x%x%x%x") do str = str:gsub('#%x%x%x%x%x%x', ''); end local lineWidth = dxGetTextWidth( str, 1, "default-bold" ) while ( lineWidth + offsetWidth > minimumWidth ) do lineWidth = lineWidth - minimumWidth lines = lines + 1 wordbreak = true end local boxWidth, boxHeight = minimumWidth + ( boxPadding * 3 ), ( lineHeight * ( lines + 1 ) ) + ( boxPadding * 2 ) dxDrawRectangle( boxX, boxY, boxWidth, boxHeight, tocolor( 0, 0, 0, 180 ), true ) dxDrawRectangle( boxX, boxY+boxHeight, boxWidth, 4, tocolor( 200, 0, 100, 255 ), true ) local textX, textY = boxX + boxPadding, boxY + boxPadding local textWidth, textHeight = textX + minimumWidth + boxPadding, textY + lineHeight + boxPadding dxDrawText( tipBox.string, textX, textY, textWidth, textHeight, tocolor( 255, 255, 255, 255 ), 1, "default-bold", "left", "top", false, wordbreak, true ) if getTickCount () >= tick then alpha = alpha - 25; if alpha <= 0 then alpha = 0; tipBox.string = nil; end end end end ) addEvent('addNotificationGTA', true); function addNotificationGTA (text) tipBox.string = text; tick = getTickCount () + (#text * 100); alpha = 255; playSoundFrontEnd(11); end addEventHandler('addNotificationGTA', root, addNotificationGTA); addNotificationGTA("asdaddNotificat#FF0000ionGTAaddNotificationGTAaddN#FFFFFFotificationGTAaddNotificationGTAaddNotificationGTAaddNotificationGTA")
  4. Unfortunately I'm not quite sure where to put it or how to use it to fix the colorcodes.
  5. It works, thank you!! But I would have one more question. Is this possibble to use color coded dxText in this script properly? Because if I set colorcoded to true it doesn't break the text, is there any possibble way to fix this? So can I have colored words with the same line breakings?
  6. Hey, so, I would like to make a GTA like (it sounds strange) notification system, something like you can see in every singleplayer GTA, the upper left hand corner box notifications: I have the base script, everything renders and works fine, but I would like to make a special "timer" for it, which works like the following way: the longer the text is, the longer the notification lasts. This is one thing I would like to make, the other thing is: how is it possibble to make an export function for this, so I can make notifications from other resources with the text I give in the resource I'm calling it back from. I don't really understand tables and loops, I would be so happy if somebody could help me! I hope you can understand me, and what I am trying to do and explain, thanks for the help in advance! local displayWidth, displayHeight = guiGetScreenSize(); local borderDistance = 20 local tipBox = { string = "asfasfasafaasfasfasafsafsfasfasafsasfasfafsafssafasfsdwadsadwqwdasdasfasasafsaf" } local boxX, boxY = borderDistance * displayWidth / displayWidth, borderDistance * displayHeight / displayHeight local boxPadding = 10 local lineHeight = dxGetFontHeight( 1, "default-bold" ) local minimumWidth = 350 local offsetWidth = 25 addEventHandler( "onClientRender", root, function( ) local lines = 0 local wordbreak = false local lineWidth = dxGetTextWidth( tipBox.string, 1, "default-bold" ) while ( lineWidth + offsetWidth > minimumWidth ) do lineWidth = lineWidth - minimumWidth lines = lines + 1 wordbreak = true end local boxWidth, boxHeight = minimumWidth + ( boxPadding * 3 ), ( lineHeight * ( lines + 1 ) ) + ( boxPadding * 2 ) dxDrawRectangle( boxX, boxY, boxWidth, boxHeight, tocolor( 0, 0, 0, 180 ), true ) dxDrawRectangle( boxX, boxY+boxHeight, boxWidth, 4, tocolor( 200, 0, 100, 255 ), true ) local textX, textY = boxX + boxPadding, boxY + boxPadding local textWidth, textHeight = textX + minimumWidth + boxPadding, textY + lineHeight + boxPadding dxDrawText( tipBox.string, textX, textY, textWidth, textHeight, tocolor( 255, 255, 255, 255 ), 1, "default-bold", "left", "top", false, wordbreak, true ) end )
  7. @ThatsMe Alright, thanks, I will try that, I guess again, because I think I already tried it.
  8. I don't have a low pc, it should have loaded, like it loaded before with the converted VCS files. Also, what load do you recommend to use? If not static then stream or distance? Which is better and why? And one more thing, could you give a link for the models and data that you used in your GTV project, or tell me how did you do that? I think it would help a lot and I would really appreciate that!
  9. Alright, I don't know what to do, I just want Vice City into MTA, but looks like it's not going to happen. As I wrote, I tried VC2SA, finished converting, started the resource, and now my MTA just loads after downloading the files. It keeps loading and nothing happens, it is loading for like 15 mins now, I even reconnected to the server, deleted the resource from the downloaded resources, and the same happens. Any suggestions? How the hell I could get Vice City into MTA? I really need it, please guys, somebody help me out!
  10. Okay, so I couldn't manage to fix this VCS convertion, for some reason the collisions were not working, I tried lots of things but I always fell through the map, I have been trying this for the 2nd day now, I downloaded VC2SA as you recommended, I am going to try it with this mod now. I don't know what should I do if it is not going to work...
  11. Yes I noticed it after, I forgot to mention that, I downloaded these seperate collision files, put them into the resources folder and such things, converted it again but it didn't work, but now I have one more idea, I will write whats up, I really hope that it's going to work!
  12. Okay, so here's the whole scene2res folder, it also has the output folder, ready to use as a resource, but when you start it you can see that the map is there, but you fall through for some reason, I don't know why, I just can't fix it, I guess there is some kind of error with the .col files, but I don't know what and how to fix it, please somebody help me! https://www.mediafire.com/?1h7rmrgg41vsy6h
  13. Hello guys! I spent my whole day trying to put the Vice City map into MTA SA:BLUE, I used the scene2res program but there was always something wrong, for example the map didn't load good, it was flickering all the time, the collisions were bad, I mean there weren't even collisions, I just fell through the texture, I couldn't manage to get it to work, the whole map was blurry and low quality, please somebody help me out! I would really like to make a new gamemode that is set in Vice City, but I don't really understand modelling, I even downloaded the whole GTA VC game, and picked out only the models and data folder for the scene2res program, selected the matching files, but it's not working, then I downloaded the GTA VCS map that was converted from ps2 and psp to pc version, it had perfect dffs and txds, it even had a few col files but they were not working!! I fell through the map, I don't have any idea how can I get Vice City into MTA, but I know that it is possibble, I have seen 3-4 servers that were set in Vice City, one of them was a Hungarian (thats where I'm from, and Hungary doesn't really make good RP servers, most of them use the vanilla valhalla mod) roleplay server, I even asked them how they did it, but they didn't reply to me. Please guys, help me out, give me tips or any other programs or anything, even if you have a done Vice City map resource and you are willing to give a copy of it to me I would really really appreciate it! Thank you in advance!!!! EDIT: I downloaded this VCS map, tried both versions, the psp and ps2 as well, but none of them worked correctly: http://gtaforums.com/topic/686322-storiesrel-converted-maps/ and I followed this tutorial video and used this program:
  14. Maybe you could try getGroundPosition instead of colshapes, but it's a CLIENT ONLY function.
  15. You could have a look at removeWorldModel's wiki example, one example removes all the world objects if I can remember well, you could try doing what you want by editing the example, also you will need table.insert Sorry for bad English if there was something written wrong, I'm from Hungary, but I hope that I could help you!
  16. "Ezt a scriptet készítette 50p" means "This script is created by 50p" and the label says "Verzió MatexD" which means "Version MatexD". I don't think that this is a reason to call it stolen. He wrote the credits in the descrition.
  17. It's not stolen, just translated to Hungarian.
  18. No, sorry, my bad, but it's still not working properly. Every player looks only to one direction except localPlayer, so me.
  19. For some reason it only works for the localPlayer, so for me, I can't see the other players' head rotating, and mine is bobbing, it always looks straight for one second.
  20. Hello community! Today I was searching MTA Wiki to find answer to my question which is: Is this possible to synchronize the head turning effect between players? I've visited 'setPedLookAt' wiki page, and it tells me this: So I've visited triggerLatentServer and ClientEvent functions' wiki page, but there's no example and I don't know how could I use them and sync setPedLookAt between players. Could someone help me in this? How should I set other players' head look at the position where they are looking. Just like in SA-MP. I hope you understand me and someone could help me! Thank you! P.S.: SA-MP sucks, but it's the only example that I can say to be understandable. lol
  21. Maybe the solution could be this? for i=700,20000 do removeWorldModel(i,10,2494,-1696,17) end Just copied the wiki example, of course needs editing, but we could loop through all the given lamps and getting the lamps of the world would be done, after this we only have to count the position the head of the lamps.
  22. That's my problem too, don't know how to get the position of all lamp posts and attach the corona or the light element to the place where the original light source is.
×
×
  • Create New...