Jump to content

1LoL1

Members
  • Posts

    944
  • Joined

  • Last visited

Everything posted by 1LoL1

  1. function giveSomeoneMoney(player, cmd, target, amount) if target then if amount then local money = getPlayerMoney(player) local targetplayer = getPlayerFromParticalName(target) local r, g, b = getPlayerNametagColor(thePlayer) ---- local r, g, b local hex = string.format("#%.2X%.2X%.2X", r, g, b) -- converts R, G, B to HEX value amount = tonumber(amount) if targetplayer then if money >= amount and amount >= 250 then givePlayerMoney(targetplayer, amount) takePlayerMoney(player, amount) outputChatBox("You Were Given from "..hex..getPlayerName(player).." #00FF00$"..tostring(amount).."", targetplayer, 0, 100, 0, true) outputChatBox("You Gave to "..hex..getPlayerName(targetplayer).." #00FF00$"..tostring(amount).."", player, 0, 100, 0, true) end end end end end addCommandHandler("give", giveSomeoneMoney)
  2. This should work 100%. local messages = { {"1"}, {"2"}, {"3"}, {"4"}, {"5"}, {"6"}, {"7"} } function test () outputChatBox(unpack(messages[math.random(#messages)]), getRootElement(), 255, 255, 255, true) end setTimer(test, 6000, 0)
  3. 1LoL1

    [HELP] Wheels

    Any help please?
  4. 1LoL1

    [HELP] Wheels

    Not work vehicle is not defined.. i want change vehicle wheels.
  5. 1LoL1

    [HELP] Wheels

    Hello, i creatd the script but not work why please? can anyone help me? local w = {1025,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1096,1097,1098} -- all: 17 addEventHandler("onVehicleEnter", getRootElement(), function (source) local vehicle = getPedOccupiedVehicle(source) local wheels = (getElementData(source, "wheel") or 0) if vehicle then if (wheels == 9) then addVehicleUpgrade(vehicle, w[9]) end end end)
  6. Try this: function radio() setRadioChannel(0) cancelEvent() end addEventHandler("onClientPlayerVehicleEnter",getRootElement(),radio) addEventHandler("onClientPlayerRadioSwitch",getRootElement(),radio)
  7. This is english section. But you can create a new topic Here.
  8. onClientPlayerVehicleEnter onClientPlayerVehicleExit
  9. setAccountData is server-side function.
  10. Try this. addEventHandler("onPlayerLogin", getRootElement(), function () local account = getPlayerAccount(source) local balance = (getAccountData(account, "bankmoney") or 0) if balance then setAccountData(account, "bankmoney", balance) else setAccountData(account, "bankmoney", 0) end end ) addEventHandler("onPlayerLogout", getRootElement(), function () local account = getPlayerAccount(source) local balance = (getAccountData(account, "bankmoney") or 0) setAccountData(account, "bankmoney", balance) end ) addEventHandler("onPlayerQuit", getRootElement(), function () local account = getPlayerAccount(source) local balance = (getAccountData(account, "bankmoney") setAccountData(account, "bankmoney", balance) end );
  11. Try this and use Lua tags. function asda(thePlayer,cmd) if getElementData(thePlayer,"admin.number") > 4 then local account = getPlayerAccount(thePlayer) setAccountData(account, "Banned", true) exports.CORtexts:output(getAccountName(getPlayerAccount(thePlayer).." has been banned successfully", thePlayer, 0, 255, 0) else exports.CORtexts:output("You don't have access to use this command", thePlayer, 255, 0, 0) end end addCommandHandler("banaccount", asda) function asda2(thePlayer,cmd) if getElementData(thePlayer,"admin.number") > 4 then local account = getPlayerAccount(thePlayer) setAccountData(account, "Banned", false) exports.CORtexts:output(getAccountName(getPlayerAccount(thePlayer).." has been unbanned successfully", thePlayer, 0, 255, 0) else exports.CORtexts:output("You don't have right to use this command", thePlayer, 255, 0, 0) end end addCommandHandler("unbanaccount", asda2)
  12. 1LoL1

    anyway ?

    Nobody here will not write the whole code, or any example. And for you is the example = code.
  13. HELP ME PLEASE! You want help with "!" ?
  14. 1LoL1

    Tag Team

    addEventHandler("onPlayerChat", getRootElement(), function(msg, type) if type == 0 then cancelEvent() local name = getPlayerName(source) local r, g, b = getPlayerNametagColor(source) local players = getPlayerTeam(source) local team = getTeamName(players) local hex = string.format("#%.2X%.2X%.2X", r, g, b) outputChatBox(""..team.." "..hex..name..": #FFFFFF"..msg.."", getRootElement(), 255, 255, 255, true) end end )
  15. 1LoL1

    Tag Team

    addEventHandler("onPlayerChat", getRootElement(), function(msg, type) if type == 0 then cancelEvent() local name = getPlayerName(source) local r, g, b = getPlayerNametagColor(source) local players = getPlayerTeam(source) local team = getTeamName(players) local hex = string.format("#%.2X%.2X%.2X", r, g, b) outputChatBox(""..team.." "..hex.." "..name..": #FFFFFF"..msg.."", getRootElement(), 255, 255, 255, true) end end )
  16. local account = getPlayerAccount(source) setAccountData(account, "Zombie kills", 9999999) And if you have save on MySQL dbConnect or MySQL Modules you can use "setElementData".
  17. Yes it is possible. I tested the script and you forgot used in settings "server" use to "true".
  18. [sHOW] is not download.
  19. Where is "v" defined?
  20. 1LoL1

    Need Help..

    Profesion? you mean team? and if players is in "Pilot" then can't kills players in "Medic"?
  21. Here you can see error. for _, v in ipairs(getElementsByType("vehicle") do Try this: addEventHandler("onResourceStart", getRootElement(), function () for _, v in ipairs(getElementsByType("vehicle")) do if getElementModel(v) == 601 then setVehicleHandling(v, "mass", 15000.0) setVehicleHandling(v, "turnMass", 15000) setVehicleHandling(v, "maxVelocity", 70.0) setVehicleHandling(v, "engineAcceleration", 5.0 ) setVehicleHandling(v, "engineInertia", 25.0) setVehicleHandling(v, "steeringLock", 25.0 ) setVehicleHandling(v, "seatOffsetDistance", 1.0) end end end)
  22. 1LoL1

    Duty command

    You forgot "then". if isObjectInACLGroup ("user.".. getAccountName (acc), aclGetGroup ("Admin")) then
  23. 1LoL1

    [HELP] Trigger

    Thanks!. Works.
  24. 1LoL1

    [HELP] Trigger

    Anyone?
  25. 1LoL1

    [HELP] Trigger

    wtf? it's server-side but i need in client-side.
×
×
  • Create New...