BIG T Posted December 31, 2017 Share Posted December 31, 2017 Estou a tentar fazer um script de dashboard , alguem me ajuda?? Queria que ele tivesse as seguintes indicaçoes: -Quando o player entra no server ou morre ele volta sempre para o dashboard; -O dashboard tem que dar para o player escolher skin e armamento; -E que tenha tambem o "botao" de spawn no ceu de paraquedas. Imagem de exemplo: http://prntscr.com/huimp0 Link to comment
Other Languages Moderators Lord Henry Posted January 2, 2018 Other Languages Moderators Share Posted January 2, 2018 O que vc já tentou fazer? Vc vai precisar das funções de onPlayerLogin, onPlayerWasted, setElementPosition, setElementModel, giveWeapon, setPedArmour. Além de guiCreateButton, onClientGUIClick, triggerServerEvent. 1 Link to comment
BIG T Posted January 13, 2018 Author Share Posted January 13, 2018 Mudei de ideias queria fazer um painel de entrada com: -Quando o player entra no server ou morre ele volta sempre para o painel; -O dashboard tem que dar para o player escolher skin; -Que o player consiga ter todas as armas consigo ao spawnar; -E que tenha tambem o "botao" de spawn no ceu de paraquedas. Imagem de exemplo: http://prntscr.com/hzziv1 Link to comment
Other Languages Moderators Lord Henry Posted January 13, 2018 Other Languages Moderators Share Posted January 13, 2018 Server-side: function playerLogou (previousAcc, currentAcc) triggerClientEvent (source, "showPanel", getRootElement()) end addEventHandler ("onPlayerLogin", getRootElement(), playerLogou) function playerMorreu (ammo, attacker, weapon, bodypart) triggerClientEvent (source, "showPanel", getRootElement()) end addEventHandler ("onPlayerWasted", getRootElement(), playerMorreu) function setStuff () giveWeapon (client, 46, 1, true) setElementPosition (client, 0, 0, 300, true) end addEvent ("spawnMe", true) addEventHandler ("spawnMe", getRootElement(), setStuff) Client-side: mainWindow = guiCreateWindow (0.1, 0.4, 0.2, 0.3, "Seleção de Skin", true) spawnButton = guiCreateButton (0.25, 0.8, 0.5, 0.2, "spawn", true, mainWindow) guiSetVisible (mainWindow, false) guiWindowSetSizable (mainWindow, false) function mostraOcultaPainel () if guiGetVisible (mainWindow) then guiSetVisible (mainWindow, false) else guiSetVisible (mainWindow, true) end end addEvent ("showPanel", true) addEventHandler ("showPanel", getRootElement(), mostraOcultaPainel) function clickEvents (button) if button ~= 'left' then return false end if source == spawnButton then mostraOcultaPainel() triggerServerEvent("spawnMe", localPlayer) end end addEventHandler ("onClientGUIClick", root, clickEvents) O resto é com vc. Aprenda a construir o painel e a inserir funções nos botões. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now