Tematy otagowane jako: poziom
1. Gdzie można ustawić wymagany poziom w pracy?
Cześć, Przychodzę z pytaniem, gdzie mogę zmienić wymagany poziom na pracach? Paczka DemusMTA 2020
tutaj skrypt po stronie clienta w pracy i dmta_job-settings
[code] local sx, sy = guiGetScreenSize()
local tick = getTickCount( )
local settings = {
job_markerpos = {-95.22, 25.34, 3.12},
pos_x = 1280,
pos_y = 720,
jobCode = "pszczelarz",
gui = false,
guiJob = false,
bees = 0,
targetCol = nil,
targetBlip = nil,
}
local ule = {
{-69.16, 54.96, 3.12, 0, -110, 0},
{-70.76, 50.96, 3.12, 0, -110, 0},
{-72.26, 46.96, 3.12, 0, -110, 0},
}
local beePos = {}
for i,v in ipairs(ule) do
i = createObject(1899, v[1], v[2], v[3]-0.9)
setElementRotation(i, v[4]+90, v[5], v[6])
marker = createMarker(v[1], v[2], v[3]-0.85, "cylinder", 2, 255, 51, 204, 75)
setElementData(marker, "marker:ped", true)
setElementData(marker, "marker:text", "PODEJDŹ ABY ZEBRAĆ MIÓD")
end
local w, h = (sx/settings.pos_x),(sy/settings.pos_y)
local zoom = 1
if sx < settings.pos_x then
zoom = math.min(2, settings.pos_x / sx)
end
addEventHandler( "onClientResourceStart", resourceRoot, function()
marker = createMarker(settings.job_markerpos[1], settings.job_markerpos[2], settings.job_markerpos[3]-1, "cylinder", 2, 255, 51, 204, 75)
setElementData(marker, "marker:text", "PRACA DORYWCZA - PSZCZELARZ")
addEventHandler( "onClientMarkerHit", ...
2. poziom
Witajcie przychodz? z pytaniem zastanawiam si? bo chc? po?wiczy? zrobi? system lvla ale taki nie ?e ka?dy poziom ma okre?lony lvl i by nie tworzy? milion linijek kodu tylko np start jest pierwszy lvl 100 xp i chc? by drugi lvl by? by 120 itd zwi?kszenie o 20 co lvl
3. Poziom HP
Witam, pisze skrypt na hud ale nie wiem jak sprawdzic poziom zycia gracza i napisanie jego w procentach (np. 10%) Prosze o pomoc nagradzam
4. Poziom
Witam, chcia?bym zrobi? taki my?l? ?e prosty skrypt na gwiazdki wanted co s? w gta sa gdy zabijemy policjanta lub go staranujemy to dostajemy takie gwiazdki (wanted).
I chcia?bym zrobi? komend? w kt?rej b?dzie mo?na przydzieli? ilo?? takich gwiazdek, w hudzie mia?em jaka? funkcje o nazwie wanted i by?a na false wi?c ju? j? w??czy?em i jest na true.
5. poziom wody
Siema , mam pytanko . Jak podwy?y? i zni?y? poziom wody ?
6. Poziom
Witam mam pewien problem:
local punkty = getElementData ( p , "punkty" )
local poziom = getElementData ( p , "poziom" )
if punkty = 100 then poziom = poziom + 1 and punkty = punkty - 100
Db3 puste a poziomu Nie nadaje ani nie zabiera punktow
7. Poziom Tlenu W Wodzie
Witam pr?buj? zrobi? co? takiego, ?e gdy gracz ma skin 59 i jest pod wod? to nie ubwa mu tlen i ?ycie lecz nie dzia?a to. DB nic. Probowalem na kilka sposob?w.
function tlen ( thePlayer )
if getElementModel ( thePlayer ) == 59 then
if isElementInWater ( thePlayer ) then
setTimer (function()
setPedOxygenLevel ( thePlayer , 100 )
setElementHealth ( thePlayer , 100 )
-- end
end , 1000 , 1 )
end
end
end
tlen ()
8. Poziom
Siemka, zabra?em si? za poziom gracza, jednak nie wiem co robi?, jak o tym my?l? to good xD
Tu jest kod:
Jak mam si? dalej do tego zabra?, co poprawi? itd... pifko i repa.
Kod: exports.scoreboard:addScoreboardColumn('Poziom')
function dajscora(thePlayer, commandName, target)
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "Wlasciciel" ) ) then
if target then
target = getPlayerFromName ( target )
local aScore = getElementData(target, 'Poziom') or 0
setElementData(target, 'Poziom', aScore +1)
outputChatBox('[PoziomGracza] Doda?e? graczowi 'getPlayerFromName(target)' + 1 poziom!', thePlayer,0,200,0)
else
outputChatBox('[B??d] Podany nick jest nieprawid?owy !', thePlayer,200,0,0)
end
end
end
addCommandHandler('dajpoziom',dajscora)