FelipeMallmann
Members-
Posts
168 -
Joined
-
Last visited
Everything posted by FelipeMallmann
-
Olá galera, estou querendo fazer um sistema que dá dinheiro aos players a cada 1 hora, como se fosse um payday, porem existem 5 grupos no acl, 5 ranks que vao do 1 até o 5, e gostaria de fazer quanto maior o rank, mais valor ele recebe por hora. Esses valores sao randomicos, mas estou mais preocupado com os if's, ir na tentativa e ir testando pode demorar mto pois meu pc é lento, creio que isso é coisa simples para voces aqui do forum, poderiam me dizer se isso está correto, se funcionaria, ou senao, o que está errado? Muito obrigado. setTimer(function () if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Rank1")) then local amount = math.random(50,300) for id, player in ipairs(getElementsByType("player")) do givePlayerMoney ( player, amount ) outputChatBox ( "** Obrigado por jogar no servidor da Intinity Gaming **", player, 255, 255, 255, true ) outputChatBox ( "** Seu rank atual é:#00FF00 1 **", player, 255, 255, 255, true ) outputChatBox ( "** Voce recebeu : #00FF00$"..amount.."#FFFFFF **", player, 255, 255, 255, true ) end else if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Rank2")) then local amount = math.random(300,600) for id, player in ipairs(getElementsByType("player")) do givePlayerMoney ( player, amount ) outputChatBox ( "** Obrigado por jogar no servidor da Intinity Gaming **", player, 255, 255, 255, true ) outputChatBox ( "** Seu rank atual é:#00FF00 1 **", player, 255, 255, 255, true ) outputChatBox ( "** Voce recebeu : #00FF00$"..amount.."#FFFFFF **", player, 255, 255, 255, true ) end else if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Rank3")) then local amount = math.random(600,1000) for id, player in ipairs(getElementsByType("player")) do givePlayerMoney ( player, amount ) outputChatBox ( "** Obrigado por jogar no servidor da Intinity Gaming **", player, 255, 255, 255, true ) outputChatBox ( "** Seu rank atual é:#00FF00 1 **", player, 255, 255, 255, true ) outputChatBox ( "** Voce recebeu : #00FF00$"..amount.."#FFFFFF **", player, 255, 255, 255, true ) end else if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Rank4")) then local amount = math.random(1000,1500) for id, player in ipairs(getElementsByType("player")) do givePlayerMoney ( player, amount ) outputChatBox ( "** Obrigado por jogar no servidor da Intinity Gaming **", player, 255, 255, 255, true ) outputChatBox ( "** Seu rank atual é:#00FF00 1 **", player, 255, 255, 255, true ) outputChatBox ( "** Voce recebeu : #00FF00$"..amount.."#FFFFFF **", player, 255, 255, 255, true ) end else if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Rank5")) then local amount = math.random(1500,2000) for id, player in ipairs(getElementsByType("player")) do givePlayerMoney ( player, amount ) outputChatBox ( "** Obrigado por jogar no servidor da Intinity Gaming **", player, 255, 255, 255, true ) outputChatBox ( "** Seu rank atual é:#00FF00 1 **", player, 255, 255, 255, true ) outputChatBox ( "** Voce recebeu : #00FF00$"..amount.."#FFFFFF **", player, 255, 255, 255, true ) end else local amount = math.random(1,50) for id, player in ipairs(getElementsByType("player")) do givePlayerMoney ( player, amount ) outputChatBox ( "** Obrigado por jogar no servidor da Intinity Gaming **", player, 255, 255, 255, true ) outputChatBox ( "** Seu rank atual é:#00FF00 1 **", player, 255, 255, 255, true ) outputChatBox ( "** Voce recebeu : #00FF00$"..amount.."#FFFFFF **", player, 255, 255, 255, true ) end end,60000*60,0) Estou mais na duvida se tenho que declarar a variavel amount varias vezes, e se eu coloca esse end com o timer no final e tals
-
[REL] Ambient Effects ( Wet Ground, Thunder Sounds )
FelipeMallmann replied to [PXG]Blue's topic in Resources
how to add this at acl permissions? -
[REL] Ambient Effects ( Wet Ground, Thunder Sounds )
FelipeMallmann replied to [PXG]Blue's topic in Resources
How to add this acl request?? -
I tested it at map editor, and worked fine, but when I try to use this resource in my current server, this problem appears what can it be?
-
All interiors are black for me, already tried dimensions at many ways, nothing happens! When I use /sint [id] it's good, I can see all interiors, but when I buy a house, and try to enter it, everything is black!
-
I'm getting some errors, I cant create a business.. the resource name is 'business' and it's at acl group admin, when I type /business it works good but after pick the coords and set prices, when I click CREATE BUSINESS, the sound plays but nothing happens, the business doesn't create.. the only warning it shows is WARNING: business\scripts\core.server.lua:28: Bad argument @ 'query' [Expected string at argument 2, got function]
-
Entendi, vou fazer um teste com comando, ver se muda para todos ou so para os setados na acl, mas estou com outro problema.. Bad usage @ ' setWeaponProperty' [expected at least server 1.3.5-9.06139 bacause flag name is being used] como arrumar isso?
-
Estou com um erro que ja olhei no forum todo mas nao achei a resposta. erro Error: 'attempt to concatenate a boolean value' ou entao dá erro dizendo [Expected acl-group at argument 2, got boolean], estou tentando fazer com que quando o player entrar no server, e somente se ele for vip, alterar o status da eagle dele codigo addEventHandler("onPlayerJoin", root, function () if ( isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "Vip" ) ) ) then local ArmaEspecial = setWeaponProperty(24, "pro", "flag_type_dual", true) if ( ArmaEspecial ) then outputChatBox("Funcionando") else outputChatBox("Erro") end end end )
-
Cara, verifiquei diversas vezes, o nome nao está errado, e fica dando esse erro sempre, o que é isso?
-
client: function vehGUI() vehicleGUI = guiCreateWindow(477, 384, 301, 194, " || VEICULO ||", false) guiWindowSetSizable(vehicleGUI, false) vehMemo = guiCreateMemo(9, 18, 157, 133, "Obrigado por ser VIP, voce pode\n\n- Ligar/Desligar Luzes\n- Ligar/Desligar Motor\n- Trancar/Destrancar Veiculo", false, vehicleGUI) guiMemoSetReadOnly(vehMemo, true) vehLights = guiCreateButton(178, 30, 107, 26, "Luzes", false, vehicleGUI) vehEngine = guiCreateButton(178, 70, 107, 26, "Motor", false, vehicleGUI) vehLock = guiCreateButton(178, 115, 107, 26, "Tranca", false, vehicleGUI) vehClose = guiCreateButton(12, 158, 71, 26, "Sair", false, vehicleGUI) showCursor ( true ) end addEvent ( "showVIPGUI", true ) addEventHandler ( "showVIPGUI", root, vehGUI ) server: local function isVip(thePlayer) local accName = getAccountName(getPlayerAccount (thePlayer)) return isObjectInACLGroup("user."..accName, aclGetGroup( "Vip" )) end function abrirJanela (player) if isVip ( player ) then triggerClientEvent ( player, "showVIPGUI", player ) else outputChatBox ( "Apenas vips podem usar o painel !", player, 255, 0, 0 ) end end addCommandHandler ( "meucarro", abrirJanela, false, false )
-
Entendi! em partes kk, nao sabia que essa funçao so podia ser chamada em server-side, criei um novo arquivo do tipo server agora, só que mesmo estando no grupo acl 'Vip' ele fala que preciso ser vip.. erro: [Expected acl-group at argument 2, got boolean o que é esse erro?
-
Ai que tá, estou me atrapalhando nisso, pois o code tmb é uma funçao, eu devo remover a funçao: function vehGUI() e no final retirar o vehGUI addCommandHandler("vehmanager",vehGUI) ??
-
Fala pessoal, estou com duvida em como restringir esse comando apenas para vips usarem: o comando é esse: function vehGUI() vehicleGUI = guiCreateWindow(477, 384, 301, 194, " || VEICULO ||", false) guiWindowSetSizable(vehicleGUI, false) vehMemo = guiCreateMemo(9, 18, 157, 133, "Obrigado por ser VIP, voce pode\n\n- Ligar/Desligar Luzes\n- Ligar/Desligar Motor\n- Trancar/Destrancar Veiculo", false, vehicleGUI) guiMemoSetReadOnly(vehMemo, true) vehLights = guiCreateButton(178, 30, 107, 26, "Luzes", false, vehicleGUI) vehEngine = guiCreateButton(178, 70, 107, 26, "Motor", false, vehicleGUI) vehLock = guiCreateButton(178, 115, 107, 26, "Tranca", false, vehicleGUI) vehClose = guiCreateButton(12, 158, 71, 26, "Sair", false, vehicleGUI) showCursor ( true ) end bindKey ( "m", "down", vehGUI ) addCommandHandler("vehmanager",vehGUI) Criei encima dele uma funçao local: local function isVip(thePlayer) local accName = getAccountName(getPlayerAccount (thePlayer)) return isObjectInACLGroup("user."..accName, aclGetGroup( "Vip" )) end Porem nao sei aonde colocar os IFs dentro do codigo
-
Funcionou!! Muito obrigado FuSioN_ e manawydan !!
-
O segundo ta funcionando perfeitamente, ja o primeiro estou com duvidas local dinheiro1 = getPlayerMoney(thePlayer) guiCreateLabel(35,16,250,60,"Seu Dinheiro: "..dinheiro1,false,ShopWindow) function atualizardinheiro() -- duvida sobre o que colocar aqui end setTimer(atualizardinheiro,1000,0)
-
Eae galera, estou com 2 problemas aqui, o primeiro é que eu queria botar um timmer para verificar o dinheiro do player, pois uso uma resource mostra o dinheiro do player numa window porem para atualizar eu preciso ficar dando restart na resource.. Codigo: local dinheiro1 = getPlayerMoney(thePlayer) guiCreateLabel(35,16,250,60,"Seu Dinheiro: "..dinheiro1,false,ShopWindow) Queria fazer um timmer para atualizar o dinheiro dos players automaticamente A outra duvida que tenho é só é possivel fazer um grupo, no caso seriam vips, ganharem mais dinheiro ao matar bots do que os players normal (sem grupo no acl) codigo: addEventHandler( "onZombieGetsKilled", getRootElement(), function( killer ) givePlayerMoney( killer, 5 ); end ) Queria manter esse codigo porem adicionar um outro, para players "VIPs" no acl Bom, é isso galera se alguem puder me ajudar agradeço, vlwss
-
Não funcionou, mas eu pude aprender a partir do seu codigo e consegui arrumar, muito obrigado.
-
Fala galera, estava tentando limitar esse comando apenas para admins. Em um topico anterior ja me ajudaram para com que ele seja usado apenas uma vez, mas agora queria que fosse apenas pelos admins, estava tentando algo como: porem nao sei o que está errado ai local blockCreate = false local accName = getAccountName ( getPlayerAccount (player) ) function createBarrier(thePlayer) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "admin" ) ) then if (blockCreate ~= true) then local x, y, z = getElementPosition(thePlayer) barrierObject = createObject(1225, x-1, y, z-0.6) if (barrierObject ~= false) then blockCreate = true end if (isPedInVehicle(thePlayer)) then end else outputChatBox("Voce ja criou um explosivo, use /re (remover explosivo) para poder criar novamente.") end end end addCommandHandler("explosivo", createBarrier) function deleteBarrier(thePlayer) if (isElement(barrierObject)) then destroyElement(barrierObject) blockCreate = false else outputChatBox("Nao existe nenhum explosivo criado!", thePlayer, 250, 0, 0) end end addCommandHandler("re", deleteBarrier) eu mesmo adicionei as linhas local accName = getAccountName ( getPlayerAccount (player) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "admin" ) ) then e do jeito que está o comando não funciona mesmo o player estando como admin no acl. gostaria de saber qual o erro ou se falta alguma coisa, vlwwws
-
local randomImage = math.random(1,11) login_window = guiCreateStaticImage(0, 0, screenw, screenh, "images/background_"..randomImage..".png", false) E as 11 imagens tem o nome de backgorund_1, background_2, assim vai
-
Sim meu MTA encontra-se na versao mais atual, e meu script ta tudo certinho, tanto é que outras imagens nunca deu nem warnings sequer, ta tdo certinho, o meta ta certinho, enfim, ainda aguardo por respostas se alguem souber
-
Fala galera, estou com um probleminha, deve ser menor do que eu acho mas quebrei a cabeça e ainda não consegui arrumar. Meu problema é o seguinte: estou fazendo um login com imagens de fundo randomicas, e quando eu ligo o server ele da WARNING e fala que a imagem.png é inválida. obs: tudo funciona 100% correto, as imagem vêm de forma aleatória como eu desejava porem fica esses warnings chatos no console, será que é o peso da imagem? a resoluçao ? bom, n sei, conto com a ajuda de vocês para de ajudar nesse pequeno problema, vlwwws log: [2015-01-25 20:10:24] WARNING: File 'images/background_1.png' in resource 'login' is invalid. [2015-01-25 20:10:24] WARNING: File 'images/background_2.png' in resource 'login' is invalid. [2015-01-25 20:10:24] WARNING: File 'images/background_3.png' in resource 'login' is invalid. [2015-01-25 20:10:24] WARNING: File 'images/background_4.png' in resource 'login' is invalid. [2015-01-25 20:10:24] WARNING: File 'images/background_5.png' in resource 'login' is invalid. [2015-01-25 20:10:24] WARNING: File 'images/background_6.png' in resource 'login' is invalid. [2015-01-25 20:10:24] WARNING: File 'images/background_7.png' in resource 'login' is invalid. [2015-01-25 20:10:24] WARNING: File 'images/background_8.png' in resource 'login' is invalid. [2015-01-25 20:10:24] WARNING: File 'images/background_10.png' in resource 'login' is invalid. [2015-01-25 20:10:24] WARNING: File 'images/background_11.png' in resource 'login' is invalid. [2015-01-25 20:10:24] WARNING: File 'images/news.png' in resource 'login' is invalid. [2015-01-25 20:10:24] WARNING: File 'images/news1.png' in resource 'login' is invalid. [2015-01-25 20:10:24] Querying MTA master server... success! [2015-01-25 20:10:24] Server started and is ready to accept connections! [2015-01-25 20:10:24] To stop the server, type 'shutdown' or press Ctrl-C [2015-01-25 20:10:24] Type 'help' for a list of commands.
-
It worked, but not how it should because it's not a barreir, it's a barrel explosive. I can just create another if I remove the first one I created, but when I shoot the barrel (it explodes) I can't create again, I need to use /remove to be able to to that. And how to turn this just to admin use? thanks
-
Hello guys, can someone help me? my doubt is how to make this command just work one time, I mean, when the object is already created it should be impossible to create another, but when it explode you should be able to create again function createBarrier(thePlayer) local x, y, z = getElementPosition(thePlayer) barrierObject = createObject(1225, x-1, y, z-0.6) if (isPedInVehicle(thePlayer)) then end end addCommandHandler("explosivo", createBarrier) function deleteBarrier(thePlayer) if (isElement(barrierObject)) then destroyElement(barrierObject) else outputChatBox("Nao existe nenhum explosivo criado!", thePlayer, 250, 0, 0) end end addCommandHandler("removerexplosivo", deleteBarrier)
-
hmm ok then, you saved my life. I was used to test maps directly on my server, so I thought editor worked in the same way. THANKS!
-
oh god ahahhaha, I tryed to open by clikcing open and searching for it and it worked.. (hahahah) but why it can not be open like a resource? If I remember right I always started a map with console, because it's a resource like a normal one.. Well now I fell dumb cuz I didn't try the obvious, sorry for creating this topic haha. thanks ccw, and if you know the answer for my question please say it. Thanks
