Jump to content

BNR Athena

Members
  • Posts

    2
  • Joined

  • Last visited

BNR Athena's Achievements

I ordered some spaghetti with marinara sauce and I got egg noodles and ketchup. I'm an average nobody.

I ordered some spaghetti with marinara sauce and I got egg noodles and ketchup. I'm an average nobody. (2/54)

0

Reputation

  1. function tc0() local sX, sY = guiGetScreenSize() showCursor(true) guiSetVisible(tw, false) tw = guiCreateWindow (sX/2 -200, sY/2 +150, 400, 80, "Painel de Compra BNR", false) texto = guiCreateLabel (40, 20, 400, 40, "Você está olhando o "..c0[1]..", ele custa o valor de R$ "..c0[2], false, tw) bbcomprar = guiCreateButton(0 , 40, 200-10, 50, "comprar", false, tw) bbfechar = guiCreateButton(200+10 , 40, 200-10, 50, "Cancelar", false, tw) addEventHandler("onClientGUIClick", bbcomprar, comprar0, false) addEventHandler("onClientGUIClick", bbfechar, fechar0, false) end function ver0() guiSetVisible(tw, true) showCursor(true) end addEvent("Abrir_painel", true) addEventHandler("Abrir_painel", root, tc0) function comprar0(button, state) if button == "left" and state == "up" then triggerServerEvent("comprarc0", root) end end function fechar0(button, state) if button == "left" and state == "up" then guiSetVisible(tw, false) showCursor(false) end end
  2. Quando eu vou verificar se o dinheiro da pessoa, ele retorna que o getPlayerMoney() não pode ter o valor nil, no caso ele não reconhece o player que está fazendo a ação de comprar o carro, isso faz com que o script não funcione. Alguém pode me ajudar a arrumar o script, ficaria bem agradecida function abriPainel0(source) triggerClientEvent(source, "Abrir_painel", source) end addEventHandler("onMarkerHit", mc0, abriPainel0) function comprarcarro0(source) local acc = getAccountPlayer(source) or "ninguém" local money = getPlayerMoney(source) or 0 if money >= c0[2] then if getElementData(source,"Comprou") == false then setElementData(source,"Comprou",true) setTimer(comprar, 10000, 1) takePlayerMoney(source, c0[2]) createVehicle(c0[3], g0[3], g0[4], g0[5]+2) else outputChatBox("Espere 10 segundos",source,255,255,255,true) end else outputChatBox("Você não possui dinheiro você precisa de R$ "..c0[2]-money,source,255,255,255,true) outputChatBox("O Player é o: "..tostring(acc)) end end addEvent("comprarc0", true) addEventHandler("comprarc0", root, comprarcarro0) function comprar() setElementData(source,"Comprou",false) outputChatBox("Você já pode comprar outro veiculo.",source,255,255,255,true) end
×
×
  • Create New...