Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Castillo

    How to use addons?

    Write: "/config" while logged in as Admin.
  2. Try downloading latest resources from here: http://code.google.com/p/mtasa-resources/downloads/list
  3. By default MTA has many game modes, including "race" game mode, just start it.
  4. Good to hear that . You're welcome.
  5. local gate = createObject ( 980, 1128.3000488281, -1541.0999755859, 16.10000038147, 0, 0, 180 ) local marker = createMarker ( 1128.3000488281, -1543.5999755859, 13.300000190735, "cylinder", 2, 255, 255, 255, 255 ) function moveGate ( hitPlayer, matchingDimension ) if isObjectInACLGroup ( "user.".. getAccountName ( getPlayerAccount ( hitPlayer ) ), aclGetGroup ( "Admin" ) ) then moveObject ( gate, 2000, 1118, -1541.0999755859, 16.10000038147 ) setTimer ( moveBack, 2000, 1 ) end end addEventHandler ( "onMarkerHit", marker, moveGate ) function moveBack ( ) moveObject ( gate, 2000, 1128.3000488281, -1541.0999755859, 16.10000038147 ) end
  6. https://community.multitheftauto.com/ind ... ls&id=1514 That's my gang system.
  7. You have a missing dot after 'health'.
  8. Castillo

    Weapons

    addEventHandler ( "onPlayerWasted", root, function ( ) takeAllWeapons ( source ) end )
  9. Castillo

    teleport

    In order to make this, you'll need the event: onMarkerHit / onClientMarkerHit And the function: setElementPosition Click on the links of these to find out more.
  10. Castillo

    MySQL

    Oh, I didn't see that typo .
  11. Because you are checking if the hit element is a ped. There.
  12. Castillo

    MySQL

    You are sure that your column name is: "serial" and not "Serial"?
  13. Castillo

    MySQL

    Copy my code again and see if it works.
  14. Castillo

    MySQL

    What doesn't work?
  15. Castillo

    MySQL

    function setData ( source ) local x, y, z = getElementPosition ( source ) local query = dbQuery ( database, "SELECT * FROM prsaver WHERE serial = '".. getPlayerSerial ( source ) .."' LIMIT 1" ) local result, numrows, errmsg = dbPoll ( query, 0 ) if ( not result ) or ( type ( result ) == "table" and #numrows == 0 ) then local r, g, b = getPlayerNametagColor ( source ) local qh = dbQuery -- Long code here dbFree ( qh ) end end That'll check if the result was not found.
  16. Topic moved to: "Scripting" section. @On topic: To check if a player is on a team you must use the function: getPlayerTeam, getTeamName just obtains the name from a team element which is what getPlayerTeam returns.
  17. Castillo

    Need Help

    You can use one interior for many houses, but you should change dimension.
  18. Castillo

    MySQL

    Indeed, it's easier with MTA built-on functions. You're welcome.
  19. Castillo

    MySQL

    Well, I use it on that syntax, but I don't use Ryden's MySQL, I use MTA built-on functions.
  20. Castillo

    MySQL

    Try this: function insertToMySQL ( ) mysql_query ( database, "INSERT INTRO prresourcename ( Serial, AccountName, Password ) VALUES ( '123', 'Lala', 'But' );" ) end addEventHandler ( "onResourceStart", resourceRoot, insertToMySQL )
  21. Castillo

    MySQL

    Because is wrong. function insertToMySQL ( ) mysql_query ( database, "INSERT INTRO prresourcename ( Serial, AccountName, Password ) VALUES ( '123', 'Lala', 'But'" ) end addEventHandler ( "onResourceStart", resourceRoot, insertToMySQL ) Try with that.
×
×
  • Create New...