-
Posts
1,412 -
Joined
-
Last visited
-
Days Won
2
Everything posted by WASSIm.
-
done
-
so when i start resource server will freezed bcs take max of ram (128MB)
-
post what do you change
-
you're welcome
-
you dont' need use root for triggerClientEvent its just source of event sourceElement: The element that is the source of the event.
-
change AddEventHandler to addEventHandler
-
chnawa ismek ?
-
hadha ibi3: https://www.facebook.com/MaxiAmry?fref=ts
-
no, i just use Xml factions for load file and startResource but after check line per line and result problem with startResource
-
tnajam ta7ki bil tounsi lina
-
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
-
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
-
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
-
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)
-
yes i already do it but he don't understand
-
you should tell us whats wrong and we will fixed it
-
i talking with people post wrong code, and i working nn my own server
-
You're Welcome
-
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")
-
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)
-
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
-
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)
