Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: level
1. Level
Witam, ot?? robi? system leveli na serwer kolegi i wszystko dzia?a lecz, gdy dodaje sobie komend? /daj.xp to wywala mi taki b??d

s_cmd.lua:360: attempt to perform arithmetic on a boolean value


Tutaj wstawiam fragment kodu:
addCommandHandler("daj.xp", function(plr,cmd,cel,value)
    if 
getAdmin(plr,6) or getAdmin(plr,5then
        
if not cel or not tonumber(valuethen
            outputChatBox
("#663300(&#9432;) #FFFFFFU?ycie: /daj.xp <nick/ID> <koszt>"plr255,255,255true)
            return
        
end
        local target
=exports["pystories-core"]:findPlayer(plr,cel)
        if 
not target then
            outputChatBox
("#663300(&#10006;) #FFFFFFNie znaleziono podanego gracza."plr255255255true)
            return
        
end
        setElementData
(target"xp"getElementData(target"xp") + value
        
outputChatBox("#663300(&#9432;) #FFFFFFOtrzyma?e?(a?) od systemu "..value.." PLN"target255,255,255true)
        
outputChatBox ("#663300(&#10004;) #FFFFFFNada?e?(a?) "..value.." PLN dla gracza "..getPlayerName(target):gsub("#%x%x%x%x%x%x",""),plr255,255,255true)
    
end
end
)


Prosz? o pomoc
2. Level system
Mam taki problem ?e chce napisa? level system lecz nie wiem jak si? za to zabra? w LUA. Szuka?em w internecie ale s? tylko takie ?e samemu wpisujemy w kodzie od ilu do ilu jest dany level a ja chce zrobi? taki ?e serwer automatycznie stworzy levle na podstawie exp jaki gracz posiada.
3. [INNE] Drunk level przy celowaniu z broni
Witam. Chcia?bym doda? do GM'a rzecz, kt?re podczas celowania
z broni celnej jak? jest np. Desert Deagle w??cza?a drunk level, a gdy
przestane celowa? automatycznie go zerowa?a, lecz nie wiem od czego zacz??.
Prosz? o pomoc, za ni? oczywi?cie pocz?stuje :piwo: .
4. [INNE] System Level
Siemanko zrobi?em sobie prosty system Exp ale mam problem z przyznaniem poziomu kody:
Kod:

new Level1 = 0;
new Level2 = 5120;
new Level3 = 12800;
new Level4 = 25600;
new Level5 = 43520;
new Level6 = 64000;
new Level7 = 94720;
new Level8 = 140800;
new Level9 = 188416;
new Level10 = 245760;


i teraz mam problem jak zrobi? aby doda?o level og?lnie pr?bowa?em to zrobi? tak

Kod:


if(pInfo[playerid][PlayerInfoExp]>= Level1)
{
pInfo[playerid][PlayerInfoLevel]++;
}



Ale po wielokrotnych kombinacjach na tym ifie albo w k??ko dodaje mi Level albo w k??ko odejmuje albo stoi na 0 Kto? mo?e zna rozwi?zanie jak zrobi? aby doda?o tylko raz i je?li ju? jest to nie dodawa?o? chyba ?e EXP b?dzie == Level2 to doda 1+ Level itd.
5. [DM] Jak zrobić żeby level i exp był nad graczem 3d.
Witam mam problem chce ?eby nad graczem pisa?o tak:
Poziom: (level)
Exp: Respekt/IleDoNextlevela
Noi pr?bowa?em co? takiego:
Kod:


if(logged[playerid]){
Update3DTextLabelText(PlayerLabel[playerid],COLOR_GREY,"|Poziom %d|",GetPlayerLevel(playerid));
return 1;
}

Taki warning:
(3102) : warning 202: number of arguments does not match definition
Linijka 3102:
Update3DTextLabelText(PlayerLabel[playerid],COLOR_GREY,"|Poziom %d|",GetPlayerLevel(playerid));

Prosz? o pomoc.
Level: GetPlayerLevel(playerid);
Respekt: Respekt[playerid];
Respekt do next levela: GetPlayerNextExp(playerid);