Jump to content

InFerNo_01

Members
  • Posts

    19
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

InFerNo_01's Achievements

Square

Square (6/54)

0

Reputation

  1. function submitReg() dbExec(server, "CREATE TABLE IF NOT EXISTS accounts (accountname TEXT NOT NULL, password TEXT NOT NULL)") new = dbExec(server, "INSERT INTO accounts (accountname, password) VALUES ('"..inputusernamereg.."','"..inputpasswordreg.."')") output = outputChatBox("You have successfully created an account!") triggerClientEvent("closedok", getRootElement()) triggerClientEvent("onclose", getRootElement()) end
  2. The thing is that I'm using the same system for the vehicles: addEventHandler("onResourceStart", resourceRoot, function() -- vehicles local veh = mysql_query(database ,"SELECT id FROM `cars` WHERE `id` >= '1' ORDER BY id DESC LIMIT 1") local rowveh = mysql_fetch_assoc(veh) for i = 1, rowveh.id, 1 do repeat if i < 823 and i > 819 then break end local result = mysql_query ( database ,"SELECT * FROM `cars` WHERE `id` = '"..i.."'") local row = mysql_fetch_assoc(result) local vehid = createVehicle ( row.Model, row.Locationx, row.Locationy, row.Locationz, 0, 0, row.Angle, row.License) VehicleID[row.id] = vehid VehicleElement[vehid] = row.id until true end end ) And it works, for exemple to respawn a vehicle: function Command(player,_,id) if GetAdminLevel(player) >= 1 then if id then if VehicleID[id] ~= nil then respawnVehicle(VehicleID[id]) else MessageError(player, "This vehicle does not exist.") end else Syntax(player, "/rcid [id]") end else MessageError(player, "You're not an admin.") end end addCommandHandler("rcid", Command, false, false)
  3. Hey, I'm actually trying to import my houses system from SA:MP to MTA and I encounter a problem with the /enter command. He's is the script that load the houses from the database (server-side): HouseID = { } HouseElement = { } addEventHandler("onResourceStart", resourceRoot, function() -- Houses local houses = mysql_query(database ,"SELECT id FROM `house` WHERE `id` >= '1' ORDER BY id DESC LIMIT 1") local rowhouses= mysql_fetch_assoc(houses) for i = 1, rowhouses.id, 1 do MAX_HOUSES = rowhouses.id local result = mysql_query(database ,"SELECT * FROM `house` WHERE `id` = '"..i.."'") local row = mysql_fetch_assoc(result) local pickup = createPickup(row.Entrancex, row.Entrancey, row.Entrancez, 3, 1318, 0) HouseID[row.id] = pickup HouseElement[pickup] = row.id setElementData(pickup, "hEntrancex", row.Entrancex) setElementData(pickup, "hEntrancey", row.Entrancey) setElementData(pickup, "hEntrancez", row.Entrancez) setElementData(pickup, "hExitx", row.Exitx) setElementData(pickup, "hExity", row.Exity) setElementData(pickup, "hExitz", row.Exitz) outputDebugString ("House ID: "..i.." created.") end end ) And the /enter command (server-side): function Command(player,_) for i = 1, MAX_HOUSES, 1 do local x, y, z = getElementPosition(player) local hx, hy, hz = getElementPosition(HouseID[i]) -- line 8 local distance = getDistanceBetweenPoints3D(x, y, z, hx, hy, hz) if distance <= 5 then setElementPos(player, GetHVar(HouseID[i], "hExitx"), GetHVar(HouseID[i], "hExity"), GetHVar(HouseID[i], "hExitz")) setElementInterior(player, GetHVar(HouseID[i], "hInt")) setElementDimension(player, i) return 1 end end end addCommandHandler("enter", Command, false, false) I tried from different ways, but it never works. It returns my these errors: Thanks in advance. PS: function GetHVar(maison, variable) return tonumber(getElementData(maison, variable)) end
  4. It works, thanks a lot!
  5. Hello, I would like to check a string (in a name) to see if the name contains 2 capital letters like for exemple Charlie_Chapplin. I've already done that (it's for a RP server): addEventHandler("onPlayerJoin", root, function() local playerName = getPlayerName( source ) if string.find(playerName, "#") or not string.find(playerName, "_") then kickPlayer ( source, "Invalid Name" ) end spawn(source) end ) Thank's in advance
  6. This problem appeared after a ddos attack, the server was down and when it was on again. I didn't change anything in the script since this moment. Maybe it's related to the ports? Or something else?
  7. Hi, I've got a problem on my server: when a player join the server, the message **trouble network** appears and it freezes all the player for a moment --' Any solutions? Thanks'
  8. Bonjour/Bonsoir. Je vous présente deux nouveaux serveurs 100% Français du groupe GTSeries. Qu'est ce que GTSeries? GTSeries est un groupe qui crée des serveur sur des plateformes multijoueurs (SAMP, MTA, Warface, Minecraft..etc) Arrivée sur MTA GTSeries arrive sur MTA SA et vous propose deux serveurs (un DM et un DD). Ce sont des serveurs comptes comprenants un système de points, d'argent, de team. Serveurs 100% français. Adresses IP Adresse du serveur DD: mtasa://tiger.gtseries.eu:22003/ Adresse du serveur DM: mtasa://tiger.gtseries.eu:22004/ Plus d'info Pour plus d'informations, rendez vous sur le forum : http://gtrp.info/forum/showthread.php?t=75719.
  9. Works now, thanks to Callum, Remi-X and lil-toady
  10. It's not stolen, it's server side, I just modified the command from here https://wiki.multitheftauto.com/wiki/BanPlayer and Callum helped me a little on the IRC chat but it's still not working. And I know how to change the command, I just don't know how to remove the original /ban command from MTA. I thought I needed to set the command.ban in ACL to false but it doesnt work. Please help I really tried, it's not like if i didn't do anything or steal the code.
  11. Hello! I've try to make a /ban command but it doesnt work. Here's my command: function banPlayerCommand ( theClient, commandName, bannedName, ... ) if hasObjectPermissionTo ( theClient, "function.kickPlayer" ) then if not ... then return outputChatBox ("#bf2e2e* Error: /aban [name] [reason]",theClient,255,255,255,true) end local reason = table.concat({...}," ") local bannerName = getPlayerName(theClient):gsub("#%x%x%x%x%x%x","") local bannedPlayer = getPlayerFromName(bannedName) if not isElement(bannedPlayer) then outputChatBox ("#bf2e2e* Error: Invalid player name!",theClient,255,255,255,true) end outputChatBox ( "#ff6666* #ff1111" ..getPlayerName(bannedPlayer):gsub("#%x%x%x%x%x%x","").. " #ff6666has been banned by " .. bannerName .. " (" ..reason.. ")", getRootElement(), 255, 0, 0, true ) banPlayer ( bannedPlayer, theClient, reason ) else outputChatBox ("#bf2e2e* Error: You are not admin!",theClient,255,255,255,true) end end addCommandHandler ( "aban", banPlayerCommand ) But it doesnt work, it displays "errors" in chat box like "You are not an admin" but when I do like "/aban inferno test" it always says "Invalid player name", and not my ban announce and the ban. Does someone know what did I make wrong please? PS: I also want to rename the /aban command in /ban command but I don't know how to remove the original /ban command. Thanks for helping
  12. Hello, I have a big problem with name tags, since I've try a nametags resource, I see this tag: http://www.noelshack.com/2012-26-1340984933-Sanstitre.png I tried to remove the nametags.lua, remove the ligne in meta, but this tag still appears. I also tried to: - Use this function: https://wiki.multitheftauto.com/wiki/SetPlayerNametagShowing - change gamemode (it was on race) - REMOVE ALL THE GAME/SERVER part and REINSTALL, tried to play without modified anything (scripts..etc) but this tag is still there and the original one don't appear! It doesn't appear on other servers only the one I host, put it's no modified, the files/scripts are the originals. Please help!
  13. I've got a proposition for 5 €. Anyone want to do it for under 5€?
  14. Just tell me your price please, I have others propositions so I can compare
  15. Hello, I'm actually looking for a scripter who can do this: • A score system for a DD/DM server: the score appears in the scoreboard (only if the player is logged in), you get points when you win (more there are players more you get points), you get points when you push someone and he dies (the amount of the points appears somewhere on the screen)..etc • A vote which appears after X minutes playing on a map with these options: faster game, less gravity, more gravity, inverted controls, push..etc. Just tell me on this topic or in PM how much money you want to do this script. Thank's
×
×
  • Create New...