Jump to content

P[ow]er

Members
  • Posts

    22
  • Joined

  • Last visited

  • Days Won

    1

P[ow]er last won the day on April 13 2023

P[ow]er had the most liked content!

1 Follower

About P[ow]er

  • Birthday 10/03/2000

Details

  • Gang
    Bpb*>
  • Location
    Canada
  • Occupation
    Walmart
  • Interests
    Computers

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

P[ow]er's Achievements

Civilian

Civilian (7/54)

4

Reputation

  1. function sendTurfPayout() local playerJobs = {} -- getting all police for i, player in ipairs(getElementsByType('player')) do local job = exports.NGJobs:getPlayerJob(player) if (job == 'Police Officer') then if (playerJobs[player] == nil) then playerJobs[player] = 0 end playerJobs[player] = playerJobs[player] + 1 end end -- pay the players for player, count in pairs(playerJobs) do local cash = count * tonumber(get("*PAYOUT_CASH")) givePlayerMoney(player, cash) exports.NGMessages:sendClientMessage("Police: Here is $" .. tostring(cash) .. " payout.", player, 0, 255, 0) end end -- set the timer local payoutTimeStr = get("*PAYOUT_TIME") if payoutTimeStr ~= false and type(payoutTimeStr) == "string" then local payoutTimeInt= tonumber(payoutTimeStr) if type(payoutTimeInt) == "number" and payoutTimeInt > 0 then setTimer(sendTurfPayout,payoutInt*60*1000,0) else outputDebugString("Warning! Invalid *PAYOUT_TIME set in meta file",2); end else outputDebugString("warning No *PAYOUT_TIME parameter foundin meta file",2); end try this please
  2. function onPlayerLogin() local playerID = getPlayerID(source) local currentDate = getDateString() -- get the current date in string format -- save the login information to the database dbExec("INSERT INTO player_logins (player_id, last_login_date) VALUES (?, ?)", playerID, currentDate) end function onCommandLastLogin(player, cmd, targetPlayerID) if not targetPlayerID then outputChatBox("Usage: /lastlogin <playerID>") return end -- retrieve the last login date from the database local result = dbQuery("SELECT last_login_date FROM player_logins WHERE player_id=?", targetPlayerID) local row = dbPoll(result, -1)[1] if not row then outputChatBox("Player not found or has not logged in before.") else local lastLoginDate = row.last_login_date outputChatBox("Player "..targetPlayerID.." last logged in on "..lastLoginDate) end end
  3. function onVehicleStartEnter(player, seat, jacked) local vehicle = getPedOccupiedVehicle(player) if vehicle and getElementModel(vehicle) == 480 then cancelEvent() outputChatBox("You cannot enter this vehicle.") end end addEventHandler("onVehicleStartEnter", getRootElement(), onVehicleStartEnter)
  4. local func_str = "function(player) return getPlayerName(player) == owner end" local loadstringed = loadstring("local owner = 'owner'; return function(player) "..func_str.." end") local myFunc = loadstringed() -- Call the function with a parameter local testPlayer = getPlayerFromName("player1") local result = myFunc(testPlayer) print(result) -- true --- local func_str = "function(player) return getPlayerName(player) == 'owner' end" local loadstringed = loadstring("return "..func_str) local success, myFunc = pcall(loadstringed) -- Call the function with a parameter local testPlayer = getPlayerFromName("player1") local success2, isOwner = pcall(myFunc, testPlayer) print(success2, isOwner) -- true false
  5. Here is an example of how you could achieve this: Detecting the shift key press: function onClientKey ( button, press ) if ( button == "lshift" and press ) then -- Change the car handling end end addEventHandler ( "onClientKey", root, onClientKey ) Changing the car handling: function changeHandling () local handlingTable = getVehicleHandling ( getPedOccupiedVehicle ( localPlayer ) ) -- Modify the handling table to make the car more suitable for drifting setVehicleHandling ( getPedOccupiedVehicle ( localPlayer ), handlingTable ) end You would need to modify the changeHandling function to adjust the handling table to make the car more suitable for drifting. You could increase the car's rear-wheel grip, reduce its weight, or increase its acceleration, for example. You can find more information on MTA scripting in the official MTA wiki: https://wiki.multitheftauto.com/
  6. function sendTurfPayout() local playerJobs = {} for i, policeOfficer in ipairs(getElementsByType('player')) do local jobName = exports.NGJobs:getPlayerJob(policeOfficer) if jobName == 'Police Officer' then local jobLevel = exports.NGJobs:getPlayerJobLevel(policeOfficer, jobName) if jobLevel and jobLevel > 0 then local payout = jobLevel * tonumber(get('*PAYOUT_CASH')) givePlayerMoney(policeOfficer, payout) exports.NGMessages:sendClientMessage(policeOfficer, 'Police: Here is $'..payout..' payout', 0, 255, 0) end end end end setTimer(sendTurfPayout, (60 * tonumber(get('*PAYOUT_TIME'))) * 1000, 0) Try it and say if it works please
  7. how can i upload files from my own website to my ftp server ? now ?
  8. hey i have a question how can i uploads maps site to my server's ftp but site isnt server's site sorry for my english...
  9. P[ow]er

    Yardım edin

    Admin panelin sağ alt tarafında anonymous diye bir tik işareti vardır ona tik atarsan banladığın, kick veya mute attığın kişilerin kimin tarafından atıldığını kimse göremez
  10. Merhaba arkadaşlar DM oynayanlarınız varsa 2009-2014 arası çığır açan bir dm serveri olduğunu bi çoğunuz bilirsiniz gta.ru nun 2014 ten sonra server büyük düşüşe uğradı dm serveri komple bana devredildi adminler ayrıldı tek ben kaldım Sağlam olmasada gerçek anlamda kodlama yapabilen bir scripter ve server içerisinde yönetecek bir admin arıyorum ilgilenecek varsa Bana bu numaralardan ulaşabilirsiniz Aramak için +90 530 120-95-99 Whatsapp için +7 978 267-63-41 Konuşturkan sonra tecrübeliyse ve beğenirsem alacam
  11. Scriptin o kısmını yansıtırsan yardımcı olabilirim
  12. but i dont know how to fix it...
  13. lol dude my spectator like this i need this script
  14. no one can help ??? PLEASE
  15. hi i have a question when a player watching me i see who is whatching me but when i watch other player he is too see know who watch himself but i cant see who watching him and nothing in debug anyone can help me ? this is race_client.lua setTimer( function() --Specs local snr = 0 for k, v in ipairs(getElementsByType("player")) do local label = getPlayerNametagText(v) if getElementData(v, 'spectates') == getLocalPlayer() then snr = snr + 1 if posLabel[label] ~= nil then setElementData(posLabel[label], "spectated", true) setElementData(playerLabel[label], "spectated", true) end else if posLabel[label] ~= nil then setElementData(posLabel[label], "spectated", false) setElementData(playerLabel[label], "spectated", false) end end end end ,50,0) and this rankingboard_client.lua addEventHandler("onClientRender", getRootElement(), function() for id, elem in pairs(playerLabel) do if guiGetVisible(elem) and string.len(guiGetText(elem)) > 4 then local x,y = guiGetPosition(elem, false) local a = guiGetAlpha(elem) * 255 if not getKeyState("tab") then dxDrawColoredLabel(string.gsub(guiGetText(elem)," ", " ",1), 65,y,200,y+17, tocolor(255,255,255,a),{255,255,255,a},1, font, "left", "center", false,false,false) if getElementData(playerLabel[id], "spectated") ~= nil then if getElementData(playerLabel[id], "spectated") then dxDrawImage(17,y,16,16,"img/eye.png", 0,0,0,tocolor(255,255,255,255), false) end end end if x < 100 then guiSetPosition(elem, sx+100,y,false) end end end for id, elem in pairs(posLabel) do if guiGetVisible(elem) and string.len(guiGetText(elem)) <= 4 then local x,y = guiGetPosition(elem, false ) local a = guiGetAlpha(elem) * 255 if not getKeyState("tab") then if getElementData(posLabel[id],"spectated") == true then dxDrawText(guiGetText(elem), 1,y+1,56,y+18, tocolor(0,0,0,math.floor(a*0.8)), 1, font, "right", "center", false,false,false) dxDrawText(guiGetText(elem), 0,y,55,y+17, tocolor(127,255,212,a), 1, font, "right", "center", false,false,false) else dxDrawText(guiGetText(elem), 1,y+1,56,y+18, tocolor(0,0,0,math.floor(a*0.8)), 1, font, "right", "center", false,false,false) dxDrawText(guiGetText(elem), 0,y,55,y+17, tocolor(255,255,255,a), 1, font, "right", "center", false,false,false) end end if x < 100 then guiSetPosition(elem, sx+100,y,false) end end end end)
×
×
  • Create New...