Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Can you post the original script? because what you post is obviously not the real script.
  2. Yes, but what are the grid list items?
  3. You forgot the commas after every item. vehcreates = { [1] = createVehicle(589, 561.3701171875, -1289.9091796875, 17.248237609863), [2] = createVehicle(518, 556.1318359375, -1290.0322265625, 17.248237609863 ), [3] = createVehicle(402, 550.7373046875, -1289.525390625, 17.248237609863 ), [4] = createVehicle(603, 545.7001953125, -1289.4248046875, 17.248237609863), [5] = createVehicle(480, 540.79296875, -1289.3271484375, 17.2421875 ), [6] = createVehicle(415, 535.57421875, -1289.22265625, 17.2421875), [7] = createVehicle(562, 530.060546875, -1289.1123046875, 17.2421875), [8] = createVehicle(541, 542.0224609375, -1276.32421875, 17.2421875), [9] = createVehicle(451, 548.0458984375, -1276.681640625, 17.248237609863 ), [10] = createVehicle(506, 554.1796875, -1274.70703125, 17.248237609863), [11] = createVehicle(558,558.728515625, -1273.3828125, 17.2421875), [12] = createVehicle(559, 514.390625, -1300.3056640625, 17.242187), [13] = createVehicle(565, 511.8505859375, -1306.9794921875, 17.2421875), [14] = createVehicle(429, 512.4658203125, -1313.7265625, 17.2421875 ), [15] = createVehicle(429, 544.9677734375, -1282.751953125, 17.248237609863 ), [16] = createVehicle(429, 551.22265625, -1282.5458984375, 17.248237609863 ), [17] = createVehicle(429, 557.4365234375, -1282.0048828125, 17.248237609863 ), [18] = createVehicle(429, 563.5048828125, -1281.46875, 17.248237609863 ) }
  4. Yes, they'll be created when the resource starts.
  5. Castillo

    Markers

    It's a loop. http://lua-users.org/wiki/ForTutorial
  6. There's no magical way to lower the download, maybe what you seen in that server is that they don't download the mods with the MTA system but a custom downloader, like in my server, the mods are downloaded in the background.
  7. Yeah, the getPropagated argument.
  8. Castillo

    Radio Player

    What's the problem?
  9. If you have mods ( vehicle, skin, weapons, etc ) installed, then remove some.
  10. Well, dbQuery is used if you need to get a result.
  11. local veh = { } local vehicles = { } function car ( player, command, arg1 ) local accName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ( "user.".. accName, aclGetGroup ( "Vip" ) ) then local x, y, z = getElementPosition ( player ) if veh [ player ] then vehicles [ veh [ player ] ] = nil destroyElement ( veh [ player ] ) end veh [ player ] = createVehicle ( 597, x, y, z ) setVehicleDamageProof ( veh [ player ], true ) addVehicleUpgrade ( veh [ player ], 1010 ) vehicles [ veh [ player ] ] = accName end end addCommandHandler ( "mycar", car ) function enterVehicle ( enteringPlayer, seat ) if ( seat == 0 and vehicles [ source ] ) then local accName = getAccountName ( getPlayerAccount ( enteringPlayer ) ) if ( not isObjectInACLGroup ( "user.".. accName, aclGetGroup ( "Vip" ) ) ) then cancelEvent ( ) outputChatBox ( "This is a private car you can't steal it !", enteringPlayer, 255, 0, 0 ) end end end addEventHandler ( "onVehicleStartEnter", getRootElement(), enterVehicle )
  12. local veh = { } local vehicles = { } function car ( player, command, arg1 ) local accName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ( "user.".. accName, aclGetGroup ( "Vip" ) ) then local x, y, z = getElementPosition ( player ) if veh [ player ] then vehicles [ veh [ player ] ] = nil destroyElement ( veh [ player ] ) end veh [ player ] = createVehicle ( 597, x, y, z ) setVehicleDamageProof ( veh [ player ], true ) addVehicleUpgrade ( veh [ player ], 1010 ) vehicles [ veh [ player ] ] = accName end end addCommandHandler ( "mycar", car ) function enterVehicle ( enteringPlayer, seat ) if ( seat == 0 and vehicles [ source ] ) then local accName = getAccountName ( getPlayerAccount ( enteringPlayer ) ) if ( vehicles [ source ] == accName ) then cancelEvent ( ) outputChatBox ( "This is a private car you can't steal it !", enteringPlayer, 255, 0, 0 ) end end end addEventHandler ( "onVehicleStartEnter", getRootElement(), enterVehicle ) Is that what you meant?
  13. Don't use dbQuery for insert queries, use dbExec.
  14. Use resid [ 1 ].ID.
  15. sx / 2 = half of the screen width.
  16. They plan on creating their own GUI, it's aimed for MTA 2.0 though.
  17. Oh yeah, I didn't notice he was using dbQuery to insert.
  18. Castillo

    Problem

    You're welcome.
  19. Well, you can make a table containing the jail cells available and obtain a random one everytime, then remove that one from the table to avoid players using same cell.
  20. local sx, sy = guiGetScreenSize ( ) dxDrawRectangle( ( sx / 2 - 52 ), ( sy / 2 - 220 ), 329, 351, tocolor(1, 0, 0, 170), true) The position won't be correct now, but you can move it until it fit what you need and see if it worked.
  21. And you did place a marker in the interior?
×
×
  • Create New...