Jump to content

[AJUDA]Banco de Dados


Recommended Posts

Posted (edited)

O banco de dados para salvar uma pele pode ajudar a usar o script para um comando de outra pele (CJ). farda

 

pegar = createMarker(2447.582, -1759.798, 13.59 -1, "cylinder", 1.5,255,255,255,50)

function pegarFarda(player)
	if isElementWithinMarker(player, pegar) then
		if (getPlayerSkin(player) == 280) then
			outputChatBox("#0077FF[1Dev] #ffffffVocê ja está com a farda.", player, 255,255,255, true)
		else
		setPlayerSkin(player,280)
		outputChatBox("#0077FF[LVMPD] #ffffffVocê vestiu a Farda.", player, 255,255,255, true)
end
end
end
addCommandHandler("farda", pegarFarda)

function tirarFarda(player)
	if isElementWithinMarker(player, pegar) then
		setPlayerSkin(player,0)
		outputChatBox("#0077FF[LVMPD] #ffffffVocê tirou sua Farda.", player, 255,255,255, true)
end
end
addCommandHandler("tfarda", tirarFarda)

addEventHandler("onMarkerHit", pegar,
function(player)
    if getElementType(player) == "player" then
	outputChatBox("#0077FF=========================================================", player, 255,255,255, true)
	outputChatBox("#0077FF[LVMPD] #ffffffOlá, seja bem vindo a LVMPD, pegue aqui suas coisas de trabalho.", player, 255,255,255, true)
	outputChatBox("#0077FF[LVMPD] #ffffffFarda: #727272/farda", player, 255,255,255, true)
	outputChatBox("#0077FF[LVMPD] #ffffffTirar Farda: #727272/tfarda", player, 255,255,255, true)
	outputChatBox("#0077FF=========================================================", player, 255,255,255, true) 
    end
end)

 

Edited by otavio53
Posted (edited)

Use funções de conta pra salvar/obter da conta. Você vai precisar destas funções e eventos:

addEventHandler
"onResourceStop"
"onPlayerQuit"
"onPlayerLogout"
getPlayerAccount
setAccountData
getElementModel
"onPlayerLogin"
"onResourceStart"
getAccountData
setElementModel

 

Edited by DNL291

Please do not PM me with scripting related question nor support, use the forums instead.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...