Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Well, and what stops you from doing it? if you already know what you have to do.
  2. You could maybe set a property to have infinite ammo, or just give the ammo after he fires it.
  3. getRealTime guiSetText setTimer or onClientRender
  4. Use: getVehicleOccupant or getVehicleController to see if the player is the driver of the vehicle he is in.
  5. Castillo

    Question

    No errors on debug?
  6. We don't accept requests here.
  7. getPedOccupiedVehicle is a client and server side function, you can use it both on the client and the server side.
  8. Why do you have to loop it? you can just do this: -- server side: local myTable = { } setTimer ( triggerClientEvent, 10000, 0, "updateClientTable", root, myTable ) -- client side: local myTable = { } addEvent ( "updateClientTable", true ) addEventHandler ( "updateClientTable", root, function ( theTable ) myTable = theTable end )
  9. You must load the XML content using the XML functions, then use math.random.
  10. We don't accept requests here, try to do it yourself, then request for help if you fail to do so.
  11. You must check the vehicle model with: getElementModel
  12. function start ( ) mysql = mysql_connect ( "localhost", "root", "", "mta" ) end addEventHandler ( "onResourceStart", resourceRoot, start ) function getMySQLHandler ( ) return mysql end On meta: function="getMySQLHandler" type="server" /> P.S: May I ask why are you using this mysql module and not the built-in MTA MySQL functions which are easier to use and better?
  13. At "fr_server.lua".
  14. You can remove the chat part from it.
  15. You must use getElementModel. function enterVehicle ( thePlayer, seat, jacked ) if ( getElementModel ( source ) == 425 ) then local team = getPlayerTeam ( thePlayer ) if ( not team ) then cancelEvent ( ) return end local p = getTeamName ( team ) if ( p ~= "xd" ) then cancelEvent ( ) end end end addEventHandler ( "onVehicleStartEnter", getRootElement(), enterVehicle )
  16. local query = executeSQLQuery ( "SELECT * FROM sqlite_master WHERE type='column' WHERE tablename = ?", "accounts" ) Try something like that, not sure if the table name column is "tablename".
  17. Proof the script being yours?
  18. Why are you bumping the topic if you can't even do what I said?
  19. "require" on MTA is not used, nor available. You could send the variable to the client side everytime you update it, or create an element and use element data.
  20. function enterVehicle ( thePlayer, seat, jacked ) local team = getPlayerTeam ( thePlayer ) if ( not team ) then cancelEvent ( ) return end local p = getTeamName ( team ) if ( p ~= "xd" ) then cancelEvent ( ) end end addEventHandler ( "onVehicleStartEnter", getRootElement(), enterVehicle )
  21. Go to your server and write "/debugscript 3", then see if there's any error from this script.
×
×
  • Create New...