Vms por parte rapaziada, Vou postar todo o código aqui pra vocês entenderem.
Aqui está o código da parte cliente: (Coloquei o código inteiro para melhor você entenderem...)
addEventHandler("onClientMouseEnter",root,
function ()
if source == sendmoney then
guiSetText (phon_LBL,"Enviar Dinheiro")
elseif source == Callingm then
guiSetText (phon_LBL,"Solicitar Samu")
elseif source == animshe then
guiSetText (phon_LBL,"Danças")
elseif source == top10pivp then
guiSetText (phon_LBL,"Navegador")
elseif source == putplibss then
guiSetText (phon_LBL,"Envie localização")
elseif source == Callingp then
guiSetText (phon_LBL,"Chame a polícia")
elseif source == top10 then
guiSetText (phon_LBL,"10 melhores jogadores")
elseif source == Calculatorpanel then
guiSetText (phon_LBL,"Calculadora")
elseif source == policePanel then
guiSetText (phon_LBL,"Procurados(desativado)")
elseif source == PlayerInfo then
guiSetText (phon_LBL,"Suas informações")
elseif source == sms then
guiSetText (phon_LBL,"Whatsapp!")
elseif source == mecanicolig then
guiSetText (phon_LBL,"Solicitar Mecânico!")
elseif source == taxilig then
guiSetText (phon_LBL,"Solicitar Uber!") --TA AQUI O CÓDIGO DO UBER, POSTEI O CÓDIGO INTEIRO SÓ PRA ENTENDER MELHOR.
end
end
)
O código acima leva pra esse código
--------------------------------------------------calling-------------------------------
addEventHandler("onClientGUIClick",root,
function ()
if( source == Callingp ) then
triggerServerEvent('ChamarAPolicia', localPlayer)
guiSetEnabled (Callingp,false)
setTimer (function ( )
guiSetEnabled (Callingp,true)
end,60000,1)
elseif( source == Callingm ) then
triggerServerEvent('ChamarOSamu', localPlayer)
guiSetEnabled (Callingm,false)
setTimer (function ( )
guiSetEnabled (Callingm,true)
end,60000,1)
elseif( source == mecanicolig ) then
triggerServerEvent('ChamarOMecanico', localPlayer)
guiSetEnabled (mecanicolig,false)
setTimer (function ( )
guiSetEnabled (mecanicolig,true)
end,60000,1)
elseif( source == taxilig ) then ------------------------------------------UBER AQ
triggerServerEvent('ChamarOTaxista', localPlayer)
guiSetEnabled (taxilig,true)
setTimer (function ( )
guiSetEnabled (taxilig,true)
end,60000,1)
end
end
)
E por ultimo a Parte do servidor coloquei só a parte que interessa que é a do uber.
function ChamarTaxista ()
local x, y, z = getElementPosition(source)
local loc = getZoneName ( x, y, z )
local city = getZoneName ( x, y, z, true )
outputChatBox("#00FFFFUber Acionado, aguarde no local.", source, 255, 255, 255, true)
for theKey,player in ipairs (getElementsByType("player")) do
local accName = getAccountName ( getPlayerAccount ( player ) )
if ( isObjectInACLGroup ("user."..accName, aclGetGroup ( GroupName2) ) ) then
outputChatBox("#00FFFF"..getPlayerName(source).." precisa de um uber em "..loc.." ("..city.."), localize-o em seu GPS", player, 255, 255, 255, true)
displayServerMessage(player, ""..getPlayerName(source).." precisa de um uber em "..loc.." ("..city.."), localize-o em seu GPS", "warning")
local blip = createBlipAttachedTo ( source, 56 )
setElementVisibleTo(blip, root, false)
setElementVisibleTo(blip, player, true)
setTimer ( function()
destroyElement(blip)
end, 270000, 1)
end
end
end
addEvent( "ChamarOTaxista", true )
addEventHandler( "ChamarOTaxista", root, ChamarTaxista)
Pelo visto é coisa simples mais como sou leigo no assunto não sei nem por onde vou.
Se quiserem posso deixar o link p download do script, que daí fica mais facil pra me auxiliarem, mais deis de ja agradeço.