Witam, posiadam skrypty na to, aby po zalogowaniu na serwer zapisywa?y si? bronie, amunicja i pozycja gracza. Skrypt dzia?a, lecz nie tak jak powinien dla gracza po zalogowaniu sie na acl panel admina, /login nick haslo, skrypt daje nam bron co mielismy, amo i pozycje. Jak to zmienic tak aby graczowi to dawalo? bez tej komendy
Kod:
[lua]
local datos = {
"DINERO",
"SKIN",
"X",
"Y",
"Z",
"ROTACION",
"INTERIOR",
"DIM"
}
function obtenerArmas(source)
if not (source) then
return false
end
local cuenta = getPlayerAccount ( source )
if (cuenta) then
for i=0, 12 do
local arma = getAccountData(cuenta, "weapon"..tostring(i))
local municion = getAccountData(cuenta, "MUNICION"..tostring(i))
if (arma) then
setElementData (source, "weapon"..tostring(i), arma )
if municion then
giveWeapon ( source, arma, municion )
setElementData (source, "MUNICION"..tostring(i), municion)
else
giveWeapon ( source, arma, 1 )
end
end
end
end
end
function obtenerOtrosDatos( source )
if not (source) then return false end
local cuenta = getPlayerAccount ( source )
if (cuenta) then
local x, y, z, rot, int, dim, skin, dinero
for i, v in pairs(datos) do
local dato = getAccountData (cuenta, v)
if (dato) then
if v == "DINERO" then
dinero = dato
... |