Jump to content

Anderl

Members
  • Posts

    2,266
  • Joined

  • Last visited

Everything posted by Anderl

  1. It still won't work because there's no source neither there is a "carModel" variable.
  2. DirectX rectangles aren't elements, neither dxDrawRectangle returns any kind of element. You gotta check cursor position on onClientClick.
  3. What exactly do you want to do?
  4. Would not "getAccountGang" use account element and not account name? Is the gang system made by you or is it from community? If it's from community, you mind sending me link to check that? Try this, anyway: function VehicleEnter( player, seat ) if ( seat == 0 ) then local nLevel = tonumber( getElementData( player, "level" ) ) or 0; local szGang = exports.gangsystem:getAccountGang( getAccountName( getPlayerAccount( player ) ) ); if ( ( szGang ~= "Army" ) or ( szGang == "Army" and nLevel < 7 ) ) then cancelEvent(); outputChatBox( "This vehicle is locked to Army level 7!", player, 255, 0, 0, false ); end end end
  5. Well, just check if the player is in a gang and if it is check if "gang" element data is "Army". If it isn't, block access. I can't show you an example because I don't know how your gang system works.
  6. My god, one more "company" that doesn't even know how "things" work.
  7. Anderl

    Lua help

    Trust me, the fastest way to learn how to LUA script is to just read https://wiki.multitheftauto.com/ - its also the most simplest No, it isn't because MTA Wiki is a wiki for functions/events and their examples of usage of MTA:SA, it has nothing to do with Lua.
  8. How is your hardrive index 8.1? Because in Windows 7 it says it takes on a scale 1.0 to 7.9, or is it bigger in windows 8? Windows 8 max. score is bigger.
  9. I didn't understand it; You want to block access from gangs too or a specific one? Ahah, thanks.
  10. One way would be to use same indexes as in "pVehicles" table in another table with its respective colors. Example: local pColors = { [1] = { 255, 0, 0 }; } for i, model in ipairs( pVehicles ) do setVehicleColor( model, unpack( pColors[i] ) ); end ( This will set vehicle with index 1 at "pVehicle" table with the specified color in the table at index 1 in "pColors" ) Put this below "pVehicles" table.
  11. local pVehicles = { [1] = createVehicle( 520, 1526.5999755859, 2877.1000976563, 13.89999961853, 0, 0, 90 ); } function VehicleEnter( player, seat ) if ( seat == 0 ) then local nLevel = tonumber( getElementData( player, "level" ) ) or 0; if ( nLevel < 7 ) then cancelEvent(); outputChatBox( "To enter this hydra you must have level 7 or higher!", player, 255, 0, 0, false ); end end end -- for _, vehicle in ipairs( pVehicles ) do addEventHandler( "onVehicleStartEnter", vehicle, VehicleEnter ); end
  12. Wrong. He used a statement with a condition "source == hydra" which does the same as putting the element 'hydra' instead of 'root'. It's wrong too because you can't compare an element with a table.
  13. Anderl

    converting

    ^ CLEO mods must be re-scripted for MTA:SA. There's no such thing for converting CLEO to Lua.
  14. local file = fileOpen( ":resource/file.ext" ); if ( file ) then loadstring( fileRead( file, fileGetSize( file ) ) )(); end fileClose( file );
  15. Anderl

    Lua help

    Because he's a 10-year-old kid. Not anybody can programme, do you know any 4 year old kid programming a game? A 10-year-old kid just can't get it. If you can't understand how Lua works, then you might want to start by something easier like how computers work? Then you'll be able to understand how programming languages work ( I don't think Lua is hard and I doubt there's such easy language like Lua ).
  16. And I said how to do it, you just need to search for the right functions. It ain't hard.
  17. This code makes totally no sense. addCommandHandler( "accountinfo", function( player, command ) if ( isGuestAccount( getPlayerAccount( player ) ) ) then outputChatBox( "You are not logged in!", player, 255, 0, 0, false ); return false; end outputChatBox( "Your account's username is: " .. getAccountName( getPlayerAccount( player ) ), player, 255, 255, 255, false ); end ) I guess you can't get account passwords with default MTA account system.
  18. You can either use onClientRender and check if vehicle's speed goes higher than the maximum you want ( should use a table for these things, if it's multiple vehicles ) and set it to the maximum until the player lets velocity go down ( I think this is not efficient - it might lag - and it's harder ) or use handling.
  19. FUUUUUUUUUUU É o hábito de falar inglês cara, malz.
  20. Anderl

    mta sa problem

    He installed GTA:SA in that folder and used that new path on installation. Even if he changed path later, MTA:SA would ask for the right path on startup.
  21. There are lots that allow ( if you mean a webhosting service and not a home server - even if it was a home server, it'd be possible ) - You can do that in CPanel ( I don't know if other panels let users do such things because I never used any others ).
×
×
  • Create New...