
1LoL1
Members-
Posts
944 -
Joined
-
Last visited
Everything posted by 1LoL1
-
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)
-
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)
-
Not work vehicle is not defined.. i want change vehicle 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)
-
Try this: function radio() setRadioChannel(0) cancelEvent() end addEventHandler("onClientPlayerVehicleEnter",getRootElement(),radio) addEventHandler("onClientPlayerRadioSwitch",getRootElement(),radio)
-
This is english section. But you can create a new topic Here.
-
onClientPlayerVehicleEnter onClientPlayerVehicleExit
-
setAccountData is server-side function.
-
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 );
-
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)
-
Nobody here will not write the whole code, or any example. And for you is the example = code.
-
HELP ME PLEASE! You want help with "!" ?
-
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 )
-
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 )
-
local account = getPlayerAccount(source) setAccountData(account, "Zombie kills", 9999999) And if you have save on MySQL dbConnect or MySQL Modules you can use "setElementData".
-
Yes it is possible. I tested the script and you forgot used in settings "server" use to "true".
-
[sHOW] is not download.
-
Where is "v" defined?
-
Profesion? you mean team? and if players is in "Pilot" then can't kills players in "Medic"?
-
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)
-
You forgot "then". if isObjectInACLGroup ("user.".. getAccountName (acc), aclGetGroup ("Admin")) then
-
wtf? it's server-side but i need in client-side.