Jump to content

WASSIm.

Members
  • Posts

    1,411
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by WASSIm.

  1. so when i start resource server will freezed bcs take max of ram (128MB)
  2. you dont' need use root for triggerClientEvent its just source of event sourceElement: The element that is the source of the event.
  3. change AddEventHandler to addEventHandler
  4. hadha ibi3: https://www.facebook.com/MaxiAmry?fref=ts
  5. no, i just use Xml factions for load file and startResource but after check line per line and result problem with startResource
  6. Hi GUYS, i have problem, when resource start server will freezed, realy i have file for resources list and when resource will start there resource will got freeze, its work fine on my local server but on my host got this problem
  7. if you looking something from tunisia post here: viewforum.php?f=166 and you need buy VPS if ou want host with website and with protection
  8. WASSIm.

    MTA don't launched

    HI GUYS, i have formatted my computer... so when open MTA but don' launched just show me that [stop playing with yourself] and then nothing http://pastebin.mtasa.com/613480365
  9. addEventHandler("onPlayerVehicleEnter", root, function (theVehicle) if (getElementModel(theVehicle) == 432) then toggleControl(source, "vehicle_secondary_fire", false) toggleControl(source, "vehicle_fire", false) end end) addEventHandler("onPlayerVehicleExit", root, function (theVehicle) if (getElementModel(theVehicle) == 432) then toggleControl(source, "vehicle_secondary_fire", true) toggleControl(source, "vehicle_fire", true) end end)
  10. yes i already do it but he don't understand
  11. you should tell us whats wrong and we will fixed it
  12. i talking with people post wrong code, and i working nn my own server
  13. you need use setElementDatabwhen you'r use setAccountData or you can use this... addEventHandler("onAccountDataChange", root, function (account, key, value) local thePlayer = getAccountPlayer(account) if (thePlayer) then setElementData(thePlayer, "account_"..key, value) end end) addEventHandler("onPlayerLogin", root, function (_, account) local alldata = getAllAccountData(account) for key, value in pairs(alldata) do setElementData(source, "account_"..key, value) end end) addEventHandler("onPlayerLogout", root, function (_, account) local alldata = getAllAccountData(account) for key, value in pairs(alldata) do removeElementData(source, "account_"..key, value) end end) Exmple: local bankMoney = getElementData(getLocalPlayer(), "account_bank.balance")
  14. realy guys its that to hard ? local totalVisiters = 0 addEventHandler("onResourceStart", resourceRoot, function () executeSQLQuery("CREATE TABLE IF NOT EXISTS players (name TEXT, serial TEXT)") for _, player in pairs(getElementsByType("player")) do local serial = getPlayerSerial(player) local result = executeSQLQuery("SELECT * FROM players WHERE serial=?", serial) if (#result == 0) then local name = getPlayerName(player) executeSQLQuery("INSERT INTO players(name,serial) VALUES(?,?)", name, serial) end end local count = #executeSQLQuery("SELECT * FROM players") if (count) and (tonumber(count)) then totalVisiters = count end end) addEventHandler("onPlayerJoin",root, function () local serial = getPlayerSerial(source) local result = executeSQLQuery("SELECT * FROM players WHERE serial=?", serial) if (#result == 0) then local name = getPlayerName(source) executeSQLQuery("INSERT INTO players(name,serial) VALUES(?,?)", name, serial) totalVisiters = totalVisiters+1 end end)
  15. WASSIm.

    Vehicle aim

    createVehicle -- That for create vehicle createPed -- That for create driver setElementAlpha -- If you want hide driver warpPedIntoVehicle -- That for create warp driver into vehicle setPedAnalogControlState -- That for control vehicle
  16. local render = { } function bindTheKeys2(player, key, stats) if (stats == "down") then render[player] = setTimer(function(player) local x, y, z, rx, ry, rz = getElementAttachedOffsets (car1) attachElements ( car1, vehicle[player], x, y, z, rx, ry, rz+1) end, 50, 0, player) elseif (stats == "up") and (isTimer(render[player])) then killTimer(render[player]) render[player] == nil end end function bindTheKeysd(player, commandName) bindKey(player, "F2", "both", bindTheKeys2) end addCommandHandler("bindme", bindTheKeysd)
  17. i got this problem on SAUR server before but fixed after few hours, i think after i delete client scripts..
×
×
  • Create New...