Jump to content

tosfera

Members
  • Posts

    1,193
  • Joined

  • Last visited

Everything posted by tosfera

  1. Quite offtopic; h4x7o0r said this; it should be possible to add new paintjobs, it's just a simple data that's being sent to the client. Am I right?
  2. tosfera

    about mysql

    depends, what do you want to do? Save a little bit of information or use it as a base of your server?
  3. You said you tried, show us what you tried.
  4. tosfera

    Stuck

    I'm not sure but a quick search on the wiki gave me the following functions. Maybe it's possible using them to achieve what you want; getPedTargetCollision getGroundPosition
  5. It is talking about the if statement, you are creating 3 buttons. If that succeeds you're doing nothing, else you destroy them. would be easier to see if button1 is already an element or not. And decide your creation / deletion on that. Just use isElement
  6. tosfera

    dll modules

    Alrighty, thanks anyway.
  7. tosfera

    dll modules

    Hey, I'm not sure if this is the right section to ask this but... how would I create a client-sided function in a module ( dll, windows platform )? Thankss.
  8. I wouldn't recommend it. Simply because the system isn't build for things like this. Keeping server-sided values can mess up alot, also your scripts will be filled with more and more users I guess... it can cause some serious damage if I think about it...
  9. I'm not sure, but maybe you can use the char function ( string library ) to replace a ASCII char to an actual character. Try replacing them in your code. Example; outputDebugString ( "H".. string.char ( 130 ) .."llo!" ); ASCII table can be found here; http://www.asciitable.com/
  10. I've updated my client and server but I noticed that r4929 still isn't solved. It is stated in the thread that the files has been updated to r6277. Any information about this?
  11. Thing I did, I used wine to run the windows version on Ubuntu, using the ( OUTDATED ) mysql plugin ( dll files ).
  12. There is none, just don't be lazy and learn how to script and get to known with the functions.
  13. Hmm, that's actually a good idea. Time to visit the IRC. ^^
  14. Hey guys, I'm currently roaming around the wiki and just messing around and I found something weird going on with the function; GuiScrollPaneGetVerticalScrollPosition. It got me quite confused, I tried reporting this at the mantis but for some reason they removed my report right away. So I assume that it returns a value of the position the scrollbar is at, like; 100 = at the bottom and 0 = at the top. But unfortunately this is not correct. I'm not getting 100 when it's at its lowest point. Anyone can clear this up for me? Thanks.
  15. Well, seeing this reminds me that you have not written this piece of code yourself. I am sorry to say, but I'm not helping you on this subject anymore. This is a part of vG code and I ( and I think the entire community ) am not supporting people with leaked files.
  16. Too bad that MTA doesn't allow '?' and ':' in the conditions. ^^"
  17. on my way you can just get the object like this; local radarArea = getElementData ( source, "areaObj" ); getElementData ( radarArea, "turfId" ); -- etc Using a table can be done on an easy way too, check this magical moment out; local tblTurfs = { }; function addTurf ( id, x, y, z, sizeX, sizeY, r, g, b, owner ) if ( not owner ) then owner = 0; end local col = createColCuboid ( x, y, z - 30, sizeX, sizeY, z + 30 ); local rArea = createRadarArea ( x, y, sizeX, sizeY, r, g, b, 130 ); tblTurfs [ col ] = col; -- storing it in the table setElementData ( col, "owner", owner ); setElementData ( col, "turfId", id ); setElementData ( col, "posx", x ); setElementData ( col, "posy", y ); setElementData ( col, "areaObj", rArea ); end addEventHandler ( "onColShapeHit", root, function () if ( tblTurfs [ source ] ) then -- checking if it's in your table -- onTurfEnter() end end ); addEventHandler ( "onColShapeLeave", root, function () if ( tblTurfs [ source ] ) then -- checking if it's in your table -- onTurfLeave() end end );
  18. tosfera

    HELP GUI!!

    Shaders? What. It's just the new GUI theme from MTA... ?
  19. Can you show me the entire code? Only concerning the fuel part though.
  20. You just want to create an RP server from scratch because other people do it ... ? Where the hell did this community go to... First of all, learn SQL. Start by learning the basics and after that you should get to know with the db* functions from MTA. Goodluck.
  21. Yes, that is indeed the way to do so. But remember to do this client sided, else it will start to bug your ass out. ^^
  22. You should store your turfs in an table. And whenever 'onColShapeHit' gets triggered, look if it is in the table. another way you can check it is to see if it as the element 'turfId'. Would also solve your problem. edit; I would do it like this; function addTurf ( id, x, y, z, sizeX, sizeY, r, g, b, owner ) if ( not owner ) then owner = 0; end local col = createColCuboid ( x, y, z - 30, sizeX, sizeY, z + 30 ); local rArea = createRadarArea ( x, y, sizeX, sizeY, r, g, b, 130 ); setElementData ( col, "owner", owner ); setElementData ( col, "turfId", id ); setElementData ( col, "posx", x ); setElementData ( col, "posy", y ); setElementData ( col, "areaObj", rArea ); end addEventHandler ( "onColShapeHit", root, function () if ( getElementData ( source, "turfId" ) ) then -- onTurfEnter() end end ); addEventHandler ( "onColShapeLeave", root, function () if ( getElementData ( source, "turfId" ) ) then -- onTurfLeave() end end ); Can you tell me, why did you add double values? Both on the colshape and radararea. setElementData( colCuboid, "owner", owner ) setElementData( colCuboid, "turfId", id ) setElementData( colCuboid, "posx", x ) setElementData( colCuboid, "posy", y ) setElementData( colCuboid, "area", radArea ) setElementData( radArea, "turfId", id ) setElementData( radArea, "posx", x ) setElementData( radArea, "posy", y ) setElementData( radArea, "owner", owner ) Quite overrated because you already linked the radArea ( in your code ) to the colshape so you can retrieve its data from there.
  23. There is nothing wrong with this piece of code, only thing I should do is change your 'else' to an 'elseif'. Any errors in your debuglog?
  24. function setHandling() for key,veh in ipairs ( getElementsByType ( "vehicle" ) ) do if ( getElementModel ( veh ) == 562 ) then if ( getElementData ( veh, "faction" ) == 72 ) then setVehicleHandling ( veh, "tractionMultiplier", 0.9 ); setVehicleHandling ( veh, "engineAcceleration", 22 ); setVehicleHandling ( veh, "maxVelocity", 200 ); setVehicleHandling ( veh, "steeringLock", 50 ); setVehicleHandling ( veh, "brakeDeceleration", 1000 ); end end end end addEventHandler ( "onResourceStart", getRootElement(), setHandling )
  25. I edited your code, just replace it with your old code.
×
×
  • Create New...