Jump to content

Gabriel1375

Members
  • Posts

    36
  • Joined

  • Last visited

Everything posted by Gabriel1375

  1. Do you guys think that's gonna work ? local dbConnection = dbConnect("sqlite", "backupexprank.db") function saveStat(sourcePlayer) local account = getPlayerAccount(sourcePlayer) local nomeconta = getAccountName(account) local patente = getAccountData(account, "level") local experiencia = getAccountData(account, "experience") dbExec(dbConnection, "INSERT INTO accounts VALUES(nomeBackup, patenteBackup, expBackup)", nomeconta, patente, experiencia) end addCommandHandler("savestats", saveStat)
  2. Hey, thanks for the reply !!! So in the " ... " what i need to put ? How i have to declare the local variables of the database ? like this ? local pRank = "Rank" local pExp = "Experience" Etc... ?
  3. Hello, im a staff of a server that gets 90 players on, but the internal.db becomes bugged, then we need to remake the server database, because it has A LOOOOT of players inactive, then the server becomes lag... Our server has a rank system, like: general 1, 2, etc... That's what i need: The player says /savestats, then it save the player rank/experience of internal.db in another .db file Then after the server database resetting, the server remake, idk how to say, the player register, and says something like: /getstats, then it get the experience/rank back on his account... How can i do this ? I never used to make any database scripts... Ty !!!
  4. Hello, i need a help... I have an base system on my MTA DayZ Server, that works like that: it creates an col zone, then when a player that is not from the group hit the col zone it gets teleported... It's working fine but i need to add a function that i think its really simple but idk how... This is what i need: A function that when a member of the group enter the base it says how much vehicle it's on the base... A function that when a player try to enter with a vehicle, if the base have more than 15 vehicles on the zone, it teleport the player out of the base... Basically is this: A function that checks how much vehicle has in the base, and a function that teleport the player if he tries to get more than 15 vehicles in the base zone... Here is what i think it will look like: function checkVehicles(theElement) --local veh = getPedOccupiedVehicle(theElement) -- random variable from the ready resource that identify the veh player is using --local accName = getAccountName(getPlayerAccount(theElement)) -- idk why i put that in but... if ( getElementData ( theElement , "Group" ) == GroupName ) and functionThatChecksVehiclesOnTheBase < 15 then sendMsg(theElement, "Welcome Player") end elseif functionThatChecksVehiclesOnTheBase > 15 then setElementPosition( theElement, TeleportLocation[1], TeleportLocation[2], TeleportLocation[3]) end end addEventHandler("onColShapeHit", getRootElement(), checkVehicles) Thanks !!!
  5. Still not working It gives me a warning saying that getElementType was expecting an element, but got number '1'
  6. Hello, basically what i want is this: The administrator give an command: /eventoblip Then it makes an BLIP in the admin, and when the player kill the admin it gives the killer an random item. Everything is working fine but, when someone kills the admin, the admin gets the item, not the killer, i've tried everything but i can't make the killer get the item... Also when someone kills the admin the name that shows in the chat is the admin name, but i wan't the killer name Here is my script: Also, i'm using the gamemode DayZ. Thanks
  7. Sorry, but i didn't understand, that's a post recruiting members to mta dayz creation... I want a script that get's the database tables/columns like: murders, name, deaths, that already exists in the MTA DayZ resource, and show like the players with the most murders...
  8. Hello everyone, i want to make a Ranking System on a MTA DayZ server. I want it to show: Player Name, Player Guild, Player Murders, Player Death, Player KD... To make this i need to have an database right ? This is what i want to do: 1 - Connect to the database 2 - Get the player account: player name, guild name, murders, deaths, kd ratio 2 - Save the player account everytime that one of these variables change /\ 3 - When player press some button it will show these stats i've said before, and order by player name, player murders, or something My current draft of the project is at this: I know that almost all of the things in my script are wrong and in the wrong place, but i really need an help to understand how can i do this... I don't know what scripts i have to edit like: login (to when the player login it saves to the database), etc... And also: The DayZ server has already a database that saves everything i've said before like: player name, player guild, player murders, player deaths, player kd, can i get the data from this database or i really need to create another like in my script ? Thanks !!!
×
×
  • Create New...