Jump to content

Cadu12

Retired Staff
  • Posts

    827
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Cadu12

  1. Eu sei, executesSQL... é facil pra ele.
  2. function createVehicleCommand ( thePlayer, commandName, carName ) local x, y, z = getElementPosition ( thePlayer ) if (type(tonumber(carName)) == "number") then if tonumber(carName) > 400 and tonumber(carName) < 611 then outputChatBox("Invalid Vehicle", player, 255, 0, 0) else local veh = createVehicle(carName, x+5, y, z) outputChatBox("Your " .. getVehicleName(veh) .. " (#" .. tonumber(carName) .. ") was spawned with an ID of " .. vehicles.id, player, 0, 255, 0) vehicles.id = vehicles.id+1 end else local carModel = getVehicleModelFromName(carName) if not carModel then outputChatBox("That is not a valid car name") else createVehicle(carModel, x+5, y, z) outputChatBox("Your " .. getVehicleName(carModel) .. " (#" .. carModel .. ") was spawned with and ID of " .. vehicles.id, player, 0, 255, 0) vehicles.id = vehicles.id+1 end end end addCommandHandler("v", createVehicleCommand)
  3. Oh, I didnt saw at down. @Ontopic Why are you copy and paste? It wont work, try read.
  4. Please show us your error, if you dont know how to get, just use /debugscript 3 in game.
  5. Are you using hamachi? If not, there is no need to change ip. Just change to ""
  6. MySQL: dbConnect dbQuery getAccountName ou getPlayerSerial SQLite: executeSQLCreateTable executeSQLInsert executeSQLQuery executeSQLSelect executeSQLUpdate getAccountName ou getPlayerSerial WARNING: Se você esta usando "getAccounts" e "getAllAccountData" com toptimes, seu server vai ficar ult lag.
  7. function createVehicleCommand ( thePlayer, commandName, carName ) local x, y, z = getElementPosition ( thePlayer ) if (type(tonumber(carName)) == "number") then if tonumber(carName) > 400 and tonumber(carName) < 611 then outputChatBox("Invalid Vehicle", player, 255, 0, 0) else local id = getElementModel(carName) createVehicle(carName, x+5, y, z) outputChatBox("Your " .. getVehicleName(id) .. " (#" .. tonumber(carName) .. ") was spawned with an ID of " .. vehicles.id, player, 0, 255, 0) vehicles.id = vehicles.id+1 end else local carModel = getVehicleModelFromName(carName) if not carModel then outputChatBox("That is not a valid car name") else createVehicle(carModel, x+5, y, z) outputChatBox("Your " .. getVehicleName(carModel) .. " (#" .. carModel .. ") was spawned with and ID of " .. vehicles.id, player, 0, 255, 0) vehicles.id = vehicles.id+1 end end end addCommandHandler("v", createVehicleCommand)
  8. Cadu12

    10,000 posts

    Congratulations Castillo!
  9. Still doesnt work, I have already remote access
  10. Do you mean that I have to put lib in my site or main host?
  11. Im not using VPS, just using DeluxHost. I tired remote access, does not work.
  12. autoConnect = nil autoConnect = setTimer( function() connection = dbConnect("mysql", "dbname=xgclan_mta;host=xg-clan.com", "*", "*") if connection then killTimer(autoConnect) end end , 1000, 0) I am sure, user and pass are ok.
  13. Hello, I have problem with dbConnect in host(linux) that I am getting error: "Could not connect", is there fix? Every time im getting error more than 5 days, I can't fix it. PS: dbConnect is working on my localhost.
  14. I tinhk he mean this: function formNumberToMoneyString ( value ) if tonumber ( value ) then value = tostring ( value ) if string.sub ( value, 1, 1 ) == "-" then return "-"..setDotsInNumber ( string.sub ( value, 2, #value ) ).." $" else return setDotsInNumber ( value ).." $" end end return false end local function setDotsInNumber ( value ) if #value > 3 then return setDotsInNumber ( string.sub ( value, 1, #value - 3 ) ).."."..string.sub ( value, #value - 2, #value ) else return value end end Credits to Zipper
  15. You're wrong, TAPL. Ontopic: Download MTA resource from googlecode, http://code.google.com/p/mtasa-resources/downloads/list You can use onPlayerFinishDD, onPlayerWinDD for DD/DM.
  16. Cadu12

    MTA DM RACE

    Stop posting three, please wait while anyone post your topic. Im sure he never give you a mods. You must learn Lua or buy scripter.
  17. triggerClientEvent triggerServerEvent onClientVehicleCollision
  18. Cadu12

    race dm mod

    Learn Lua, or seach in community.
  19. Add textbox input, please.
×
×
  • Create New...