Jump to content

Douks08fr

Members
  • Posts

    12
  • Joined

  • Last visited

Everything posted by Douks08fr

  1. Thank you for your help, its was really helpful. But, It looks that making this limit is harder than I thought. Thank you anyway
  2. Hi everybody, I managed to edit my ped spawning script to set a per-player (+server) zombie limit. Global limit is set to 200 (ie), each player can spawn 15 peds which will follow them. If the player kill one of them, the a new ped can spawn as the count is under the limit. So, to do that i've tried the following : local variable follow When the ped-spawn is called on my script, it add +1 on a "setElementData" attached to player name. And so, if he kill one, this "setElementData" got -1 as value (actual -1) In the paper, this way to do looks really perfect But in fact, not really. The spawn stop at 15 (its fine), but if another player connect, no ped spawn for him (so, the per-player 15 is set to the entire server). Does anyone have any idea about this function or maybe some help ? Thank you very much and have a nice week-end.
  3. Je ne m'attendais plus à avoir de réponse ! Enfaite le problème était le même sur un autre serveur, on à changer d'hébergeur pensant que le problème venait du système de virtualisation (XEN) qui limitait les ressources, mais enfaite, tout est pareil. On à atteint 26 joueurs sans crash, alors que avec 5-10 joueurs, le serveur à crash... Merci pour ta réponse
  4. Hey, I know last post was very old but, does anybody know if this script is working ? For now, theres nothing like this...
  5. Hey everybody, happy new year I don't know if somebody has already told this bug, but : [2010-12-18 09:28:20] ERROR: zombies/zombie_server.lua:141: attempt to perform arithmetic on global 'x' (a boolean value) This appear many times.
  6. :o :o That was just beacause I used "player" ? You're really awesome guys, it works
  7. Wow, thats harder than i thought ... I've made something wrong but ... what. The cars are spawned but the older isn't destroyed. local playerData = {} function getPlayerVehicle (player) if playerData[player] then return playerData[player].vehicle -- maybe you can just return this, but dunno if it triggers error else return nil end end function createPlayerData (player) if playerData[player] then return end playerData[player] = {} end function destroyVehicle (player) if playerData[player] then if playerData[player].vehicle then destroyElement (playerData[player].vehicle) playerData[player].vehicle = nil else return false end end end addEvent ("carBuy", true) addEventHandler ("carBuy", getRootElement(), function(id2, cost2, name2,x, y, z, sRz, thePlayer) if (getPlayerMoney (source) >= tonumber(cost2)) then outputChatBox ("Achat de " .. name2, source, 255, 0, 0, false) outputChatBox ("Prix: " .. cost2, source, 255, 0, 0, false) takePlayerMoney (source, tonumber (cost2)) local x,y,z = getElementPosition (source) local vehicle = createVehicle (id2, x, y, z, 0, 0, sRz ) destroyVehicle (player) playerData[thePlayer].vehicle = createVehicle (vehicle) warpPedIntoVehicle(source, vehicle) local blii = createBlipAttachedTo ( vehicle, 56, source ) setElementVisibleTo ( blii, getRootElement ( ), false ) setElementVisibleTo ( blii, source, true ) else outputChatBox ("Vous ne pouvez acheter ce produit [pas assez d'argent]", source, 255, 0, 0, false) end end)
  8. Thanks. So, could this one work : addCommandHandler ("destroy", function(thePlayer,command) local vehicles = getElementsByType("vehicle") for i,v in ipairs (vehicles) do destroyElement(v) end end end) ?
  9. Thanks for your help About the function who will destroy the car : destroyElement(vehicle) How can I retrieve the vehicle to destroy ? If I use "getElementData ( source, "veh" )", what should I store in "veh" key and what should I use with destroyElmnt ? Thanks
  10. Hey everybody, I've got a zombie MTA server running with Shop script (https://community.multitheftauto.com/index.php?p= ... ils&id=720), this script allow players to buy cars/weapons/skills. With ~80-100 players per day, if they all use this script and buy a car, it will be a very big mess ... So, I need your help about destroyElement. I would like to remove the cars who players bought when they die/leave the serv/buy another one. But I don't find how to choose a car created with this script... Thanks a lot
  11. Bonsoir bonsoir, J'inaugure le forum des Français avec ... un problème ! Je possède un serveur privé sous Débian lenny, 512 Mo de RAM, 100 GO de disque, et une certaine partie d'un processeur... Un très gros problème se renouvelle de façon aléatoire : le serveur s'éteint (le serveur mta). Rien de précisé dans les logs du serveur MTA ou de Débian. La RAM n'est pas en sur-utilisation ni le processeur ... J'en appel donc à la communauté afin de m'aider au plus possible sur ce problème Merci et joyeuses fêtes
×
×
  • Create New...