Jump to content

Dimos7

Members
  • Posts

    1,546
  • Joined

  • Last visited

Everything posted by Dimos7

  1. https://forum.multitheftauto.com/viewforum.php?f=119
  2. you will need make a gui or dx where player choose the skins and take the default or mods ones
  3. engineImportTXD engineLoadDFF setCameraTarget
  4. local x, y, z = 1911.2, -1776, 12 local Marker = createMaker(x, y, z, "cylinder", 5, 255, 0, 0, 150) local gate = createObject(968, 1915.5, -1771.80, 13, 0, -90) local gate1 = createObject(968, 1915.5, -1780.85, 16, 0, -90) addEventHandler("onMarkerHit", Marker, function(hitElement, matchingDimension) if isElement(hitElement) and getElementType(hitElement) == "player" then local theVehicle = getPedOccupiedVehicle(hitElement) if (theVehicle) then setElementData(hitElement, "Cleaned", true) fadeCamera(hitElement, false, 2.5, 0, 0, 0) setTimer(fadeCamera, 2500, 1, hitElement, true, 2.5) moveObject(gate, 9000, 1915.5, -1771.80, 16) moveObject(gate1, 2000, 1915.5, -1780.85, 13) outputChatBox("Your Welcome in car wash", hitElement, 0, 255, 255) end end end) addEventHandler("onMarkerLeave", Marker, function () moveObject(gate, 2000, 1915.5, -1771.80, 13) moveObject(gate1, 9000, 1915.5, -1780.85, 16) end)
  5. local x, y, z = 1911.2, -1776, 12 local Marker = createMaker(x, y, z, "cylinder", 5, 255, 0, 0, 150) local gate = createObject(968, 1915.5, -1771.80, 13, 0, -90) local gate1 = createObject(968, 1915.5, -1780.85, 16, 0, -90) addEventHandler("onMarkerHit", Marker, function(hitPlayer, matchingDimension) if isElement(hitPlayer) and getElementType(hitPlayer) == "player" then local theVehicle = getPedOccupiedVehicle(hitPlayer) if (theVehicle) then setElementData(source, "Cleaned", true) fadeCamera(source, false, 2.5, 0, 0, 0) setTimer(fadeCamera, 2500, 1, source, true, 2.5) moveObject(gate, 9000, 1915.5, -1771.80, 16) moveObject(gate1, 2000, 1915.5, -1780.85, 13) outputChatBox("Your Welcome in car wash", source, 0, 255, 255) end end end) addEventHandler("onMarkerLeave", Marker, function () moveObject(gate, 2000, 1915.5, -1771.80, 13) moveObject(gate1, 9000, 1915.5, -1780.85, 16) end)
  6. Dimos7

    Admin name

    function adminDuty(thePlayer, commandName) if exports.global:isPlayerAdmin(thePlayer) then local id = getElementData(thePlayer, "playerid") local adminduty = getElementData(thePlayer, "adminduty") local username = getPlayerName(thePlayer) local adminnev = getElementData(thePlayer, "gameaccountusername") local karinev = mysql:query("SELECT * FROM characters WHERE charactername=") if (adminduty==0) then exports['anticheat-system']:changeProtectedElementDataEx(thePlayer, "adminduty", 1, false) setPlayerName (thePlayer, adminnev) outputChatBox("#66FF66[starMTA]#32C8FF " .. adminnev .. " #FFFFFFadminszolgálatba #66FF66lépett! #FFFFFFHasználd a #32C8FF/pm " .. id .." #FFFFFFparancsot, hogy írj neki!",getRootElement(), 255, 255, 255, true) elseif (adminduty==1) then local adminlevel = getElementData(thePlayer, "adminlevel") if (adminlevel == 2) then outputChatBox("#66FF66[starMTA-Admin]#FFFFFF1-es Admin nem léphet ki szolgálatból.", thePlayer, 255, 0, 0, true) return end exports['anticheat-system']:changeProtectedElementDataEx(thePlayer, "adminduty", 0, false) setPlayerName (thePlayer, karinev) outputChatBox("#66FF66[starMTA]#32C8FF " .. adminnev .. " #FF6666kilépett #FFFFFFaz adminszolgálatból!", getRootElement(), 255, 0, 0, true) end mysql:query_free("UPDATE accounts SET adminduty=" .. mysql:escape_string(getElementData(thePlayer, "adminduty")) .. " WHERE id = '" .. mysql:escape_string(getElementData(thePlayer, "gameaccountid")).."'" ) exports.global:updateNametagColor(thePlayer) end end addCommandHandler("adminduty", adminDuty, false, false)
  7. Dimos7

    code not work

    function rainbowColor(thePlayer) local money = getPlayerMoney(thePlayer) local theVehicle= getPedOccupiedVehicle(thePlayer) local r, g, b = math.random(0, 255) , math.random(0, 255), math.random(0, 255) if isPedInVehicle(thePlayer) then if money >= 10000 then takePlayerMoney(thePlayer, 10000) theTimer = setTimer(setVehicleColor, 1000, 0, theVehicle, r, g, b) else outputChatBox("You not have enough money for this", thePlayer, 255, 0, 0) return false end end if isTimer(theTimer) then killTimer(theTimer) end end addCommandHandler("rainbow", rainbowColor) time pass but color not change
  8. Explane it better please
  9. If understand correctly you want create vehicle for each player join the server? if yes its different
  10. Dimos7

    SQL Problem

    local connection = exports.databse:getSQLConnection() antispam= { } function unmutePlayer(thePlayer) setPlayerMuted(thePlayer, false) end function playerSpamChat() local muted = getElementData(source, "muted") or 0 if antispam[source] == getTickCount() == 3000 and antispam[source] == getTickCount <= 3000 then setPlayerMuted(source, true) theTimer = setTimer(unmutePlayer, 10000, 1, source) if isTimer(theTimer) then killTimer(theTimer) end outputChatBox(getPlayerName(source).." has been muted for 1 minute by antispam for spam", root, 255, 0, 0) outputServerLog(getPlayerName(source).." has been muted for 1 minute by antispam for spam") setElementData(source, "muted", muted + 1) dbExec(connection, "UPDATE punishments SET type=? and name=? and serial=? and by=? and reason=? and starttime=? and finishtime=?","mute", getPlayerName(source), getPlayerSerial(source), "antispam", "spam", getRealTime().timestamp, getRealTime().timestamp +1*60) end end addEventHandler("onPlayerChat", root, playerSpamChat)
  11. Dimos7

    SQL Problem

    okay ty man than start time and finish time need be on string right?
  12. Dimos7

    Need help

    Kills = {} Deaths = {} Headshot = {} Money = {} Playtime = {} exports.scoreboard:scoreboardAddColumn("Kills", 20, root, "Kills", 3) exports.scoreboard:scoreboardAddColumn("Deaths", 20, root, "Deaths", 4) exports.scoreboard:scoreboardAddColumn("Headshot", 20, root, "Headshot", 5) exports.scoreboard:scoreboardAddColumn("Money", 20, root, "Money", 6) exports.scoreboard:scoreboardAddColumn("Playtime", 20, root, "Playtime", 9) addEventHandler("onPlayerLogin", root, function() local time = getRealTime() local hours = time.hour local minutes = time.minute for i = 0, pairs (Kills) do if not Kills[i] then Kills[i] = source setElementData(source, "Kills", i) break; end end for i = 0 , pairs (Deaths) do if not Deaths[i] then Deaths[i] = source setElementData(source, "Deaths", i) break; end end for i = 0 , pairs (Headshot) do if not Headshot[i] then Headshot[i] = source setElementData(source, "Headshot", i) break; end end for i = 0, pairs (Money) do if not Money[i] then Money[i] = source setElementData(source, "Money", i) break; end end for i = hours and minutes, getTickCount() do if not Playtime[i] then Playtime[i] = source setElementData(source, "Playtime", i) break; end end end) addEventHandler("onResourceStart", resourceRoot, function() local time = getRealTime() local hours = time.hour local minutes = time.minute for _, v in ipairs(getElementsByType("player")) do for i = 0, #Kills do if not Kills[i] then Kills[i] = v setElementData(v, "Kills", i) break; end end for i = 0, #Deaths do if not Deaths[i] then Deaths[i] = v setElementData(v, "Deaths", i) break; end end for i = 0, #Headshot do if not Headshot[i] then Headshot[i] = v setElementData(v, "Headshot", i) break; end end for i = 0, #Money do if not Money[i] then Money[i] = v setElementData(v, "Money", i) break; end end for i = hours and minutes , getTickCount() do if not Playtime[i] then Playtime[i] = v setElementData(v, "Playtime", i) break; end end end end) function setPlayerStatus(attacker, weapon, bodypart) if attacker then if (getElementType(attacker) == "player") then killPed(source, attacker, weapon) setElementData(attacker, "Kills", tonumber(Kills + 1)) setElementData(source, "Deaths", tonumber(Deaths + 1)) end if bodypart == 9 then killPed(source, attacker, weapon, bodypart) setElementData(attacker, "Headshot", tonumber(Headshot + 1)) end end setElementData(source, "Deaths", tonumber(Deaths + 1)) end addEventHandler("onPlayerWasted", root, setPlayerStatus) function getPlayerStatus(player) if isElement(player) and getElementType(player) == "player" and getElementData(player, "Kills") and getElementData(player, "Deaths") and getElementData(player, "Headshot") and getElementData(player, "Money") and getElementData(player, "Playtime") then return getElementData(player, "Kills"), getElementData(player, "Deaths"), getElementData(player, "Headshot"), getElementData(player, "Money"), getElementData(player, "Playtime") end end http://imgur.com/xb7v8O4 i want be like this 00:00 in start and after change
  13. Dimos7

    Need help

    then how to put it 00:00 and count it with real time?
  14. Dimos7

    Need help

    Kills = {} Deaths = {} Headshot = {} Money = {} Playtime = {} exports.scoreboard:scoreboardAddColumn("Kills", 20, root, "Kills", 3) exports.scoreboard:scoreboardAddColumn("Deaths", 20, root, "Deaths", 4) exports.scoreboard:scoreboardAddColumn("Headshot", 20, root, "Headshot", 5) exports.scoreboard:scoreboardAddColumn("Money", 20, root, "Money", 6) exports.scoreboard:scoreboardAddColumn("Playtime", 20, root, "Playtime", 9) addEventHandler("onPlayerLogin", root, function() local time = getRealTime() local hours = time.hour local minutes = time.minute for i = 0, pairs (Kills) do if not Kills[i] then Kills[i] = source setElementData(source, "Kills", i) break; end end for i = 0 , pairs (Deaths) do if not Deaths[i] then Deaths[i] = source setElementData(source, "Deaths", i) break; end end for i = 0 , pairs (Headshot) do if not Headshot[i] then Headshot[i] = source setElementData(source, "Headshot", i) break; end end for i = 0, pairs (Money) do if not Money[i] then Money[i] = source setElementData(source, "Money", i) break; end end for i = getRealTime(), getTickCount() do if not Playtime[i] then Playtime[i] = source setElementData(source, "Playtime", i) break; end end end) addEventHandler("onResourceStart", resourceRoot, function() local time = getRealTime() local hours = time.hour local minutes = time.minute for _, v in ipairs(getElementsByType("player")) do for i = 0, #Kills do if not Kills[i] then Kills[i] = v setElementData(v, "Kills", i) break; end end for i = 0, #Deaths do if not Deaths[i] then Deaths[i] = v setElementData(v, "Deaths", i) break; end end for i = 0, #Headshot do if not Headshot[i] then Headshot[i] = v setElementData(v, "Headshot", i) break; end end for i = 0, #Money do if not Money[i] then Money[i] = v setElementData(v, "Money", i) break; end end for i = getRealTime() , getTickCount() do if not Playtime[i] then Playtime[i] = v setElementData(v, "Playtime", i) break; end end end end) function setPlayerStatus(attacker, weapon, bodypart) if attacker then if (getElementType(attacker) == "player") then killPed(source, attacker, weapon) setElementData(attacker, "Kills", Kills + 1) setElementData(source, "Deaths", Deaths + 1) end if bodypart == 9 then killPed(source, attacker, weapon, bodypart) setElementData(attacker, "Headshot", Headshot + 1) end end end addEventHandler("onPlayerWasted", root, setPlayerStatus) function getPlayerStatus(player) if isElement(player) and getElementType(player) == "player" and getElementData(player, "Kills") and getElementData(player, "Deaths") and getElementData(player, "Headshot") and getElementData(player, "Money") and getElementData(player, "Playtime") then return getElementData(player, "Kills"), getElementData(player, "Deaths"), getElementData(player, "Headshot"), getElementData(player, "Money"), getElementData(player, "Playtime") end end error line 90 initial value must be a number
  15. Dimos7

    Admin name

    function adminDuty(thePlayer, commandName) if exports.global:isPlayerAdmin(thePlayer) then local id = getElementData(thePlayer, "playerid") local adminduty = getElementData(thePlayer, "adminduty") local username = getPlayerName(thePlayer) local adminnev = getElementData(thePlayer, "gameaccountusername") local karinev = getPlayerName(thePlayer) if (adminduty==0) then exports['anticheat-system']:changeProtectedElementDataEx(thePlayer, "adminduty", 1, false) setPlayerName (thePlayer, adminnev) outputChatBox("#66FF66[starMTA]#32C8FF " .. adminnev .. " #FFFFFFadminszolgálatba #66FF66lépett! #FFFFFFHasználd a #32C8FF/pm " .. id .." #FFFFFFparancsot, hogy írj neki!",getRootElement(), 255, 255, 255, true) elseif (adminduty==1) then local adminlevel = getElementData(thePlayer, "adminlevel") if (adminlevel == 2) then outputChatBox("#66FF66[starMTA-Admin]#FFFFFF1-es Admin nem léphet ki szolgálatból.", thePlayer, 255, 0, 0, true) return end exports['anticheat-system']:changeProtectedElementDataEx(thePlayer, "adminduty", 0, false) setPlayerName (thePlayer, karinev) outputChatBox("#66FF66[starMTA]#32C8FF " .. adminnev .. " #FF6666kilépett #FFFFFFaz adminszolgálatból!", getRootElement(), 255, 0, 0, true) end mysql:query_free("UPDATE accounts SET adminduty=" .. mysql:escape_string(getElementData(thePlayer, "adminduty")) .. " WHERE id = '" .. mysql:escape_string(getElementData(thePlayer, "gameaccountid")).."'" ) exports.global:updateNametagColor(thePlayer) end end addCommandHandler("adminduty", adminDuty, false, false)
  16. Dimos7

    Need help

    Kills = {} Deaths = {} Headshot = {} Money = {} Playtime = {} exports.scoreboard:scoreboardAddColumn("Kills", 20, root, "Kills", 3) exports.scoreboard:scoreboardAddColumn("Deaths", 20, root, "Deaths", 4) exports.scoreboard:scoreboardAddColumn("Headshot", 20, root, "Headshot", 5) exports.scoreboard:scoreboardAddColumn("Money", 20, root, "Money", 6) exports.scoreboard:scoreboardAddColumn("Playtime", 20, root, "Playtime", 9) addEventHandler("onPlayerLogin", root, function() local time = getRealTime() local hours = time.hour local minutes = time.minute for i = 0, pairs (Kills) do if not Kills[i] then Kills[i] = source setElementData(source, "Kills", i) break; end end for i = 0 , pairs (Deaths) do if not Deaths[i] then Deaths[i] = source setElementData(source, "Deaths", i) break; end end for i = 0 , pairs (Headshot) do if not Headshot[i] then Headshot[i] = source setElementData(source, "Headshot", i) break; end end for i = 0, pairs (Money) do if not Money[i] then Money[i] = source setElementData(source, "Money", i) break; end end for i = getRealTime(), getTickCount() do if not Playtime[i] then Playtime[i] = source setElementData(source, "Playtime", i) break; end end end) addEventHandler("onResourceStart", resourceRoot, function() local time = getRealTime() local hours = time.hour local minutes = time.minute for _, v in ipairs(getElementsByType("player")) do for i = 0, pairs (Kills) do if not Kills[i] then Kills[i] = v setElementData(v, "Kills", i) break; end end for i = 0, pairs (Deaths) do if not Deaths[i] then Deaths[i] = v setElementData(v, "Deaths", i) break; end end for i = 0, pairs (Headshot) do if not Headshot[i] then Headshot[i] = v setElementData(v, "Headshot", i) break; end end for i = 0, pairs (Money) do if not Money[i] then Money[i] = v setElementData(v, "Money", i) break; end end for i = getRealTime() , getTickCount() do if not Playtime[i] then Playtime[i] = v setElementData(v, "Playtime", i) break; end end end end) function setPlayerStatus(attacker, weapon, bodypart) if attacker then if (getElementType(attacker) == "player") then killPed(source, attacker, weapon) setElementData(attacker, "Kills", Kills + 1) setElementData(source, "Deaths", Deaths + 1) end if bodypart == 9 then killPed(source, attacker, weapon, bodypart) setElementData(attacker, "Headshot", Headshot + 1) end end end addEventHandler("onPlayerWasted", root, setPlayerStatus) function getPlayerStatus(player) if isElement(player) and getElementType(player) == "player" and getElementData(player, "Kills") and getElementData(player, "Deaths") and getElementData(player, "Headshot") and getElementData(player, "Money") and getElementData(player, "Playtime") then return getElementData(player, "Kills"), getElementData(player, "Deaths"), getElementData(player, "Headshot"), getElementData(player, "Money"), getElementData(player, "Playtime") end end lne 62 for need limt numbe
  17. Dimos7

    Question

    I create a script that jailed a player is offline and put a timer and i want to know if the the timer iwll killed if player is off? function oflinejailPlayer(thePlayer, name, minutes, , reason , ..., _) local query = dbQuery(connection, "SELECT * FROM accounts WHERE name=?", name) local result, num_affected_rows = dbPoll(query, -1) local adminlevel = getElementData(thePlayer, "adminlevel") local minutes = tonumber(minutes) local reason = table.concat({...}, "") if num_affected_rows == 1 then if adminlevel >= 1 then if minutes >= 1 and minutes <= 60 then if reason ~= "" then target = getPlayerFromName(name) dbExec(connection, "UPATE punishments SET type=? and name=? and serial=? and by=? and reason=? and starttime=? and finishtime=?", "jail", name, getPlayerSerial(target), getPlayerName(thePlayer), reason, getRealTime().timestamp, getRealTime().timestamp + minutes * 60) jailPlayer(thePlayer, target, minutes, reason ) else outputChatBox("Use /ojail [name] [minutes] [reason]", thePlayer, 255, 0, 0) return false end else outputChatBox("Jail time is min 1 minute and max 60 minutes", thePlayer, 255, 0, 0) return false end else outputChatBox("You aren't a admin.", thePlayer, 255, 0, 0) return false end else outputChatBox("Name not found!", thePlayer, 255, 0, 0) return false end end addCommandHandler("ojail", oflinejailPlayer)
  18. Dimos7

    Admin name

    function adminDuty(thePlayer, commandName) if exports.global:isPlayerAdmin(thePlayer) then local id = getElementData(thePlayer, "playerid") local adminduty = getElementData(thePlayer, "adminduty") local username = getPlayerName(thePlayer) local adminnev = getElementData(thePlayer, "gameaccountusername") local karinev = mysql:query("SELECT * FROM characters WHERE charactername=?") if (adminduty==0) then exports['anticheat-system']:changeProtectedElementDataEx(thePlayer, "adminduty", 1, false) setPlayerName (thePlayer, adminnev) outputChatBox("#66FF66[starMTA]#32C8FF " .. adminnev .. " #FFFFFFadminszolgálatba #66FF66lépett! #FFFFFFHasználd a #32C8FF/pm " .. id .." #FFFFFFparancsot, hogy írj neki!",getRootElement(), 255, 255, 255, true) elseif (adminduty==1) then local adminlevel = getElementData(thePlayer, "adminlevel") if (adminlevel == 2) then outputChatBox("#66FF66[starMTA-Admin]#FFFFFF1-es Admin nem léphet ki szolgálatból.", thePlayer, 255, 0, 0, true) return end exports['anticheat-system']:changeProtectedElementDataEx(thePlayer, "adminduty", 0, false) setPlayerName (thePlayer, karinev) outputChatBox("#66FF66[starMTA]#32C8FF " .. adminnev .. " #FF6666kilépett #FFFFFFaz adminszolgálatból!", getRootElement(), 255, 0, 0, true) end mysql:query_free("UPDATE accounts SET adminduty=" .. mysql:escape_string(getElementData(thePlayer, "adminduty")) .. " WHERE id = '" .. mysql:escape_string(getElementData(thePlayer, "gameaccountid")).."'" ) exports.global:updateNametagColor(thePlayer) end end addCommandHandler("adminduty", adminDuty, false, false)
  19. getVehicleMaxPassengers
  20. go to the source where the mouse cursor is bind with x and remove that and will be done i think
  21. Can post whole code to see also put it in lua tags ty
×
×
  • Create New...