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: głód/hp
1. Głód/hp
Mam taki problem ?e chc? zrobi? by gracz po wejsciu w marker i wpisaniu cmd /kup burger / kebab dosta? 10/20 hp. Problem jest taki ?e to nie dzia?a a w debugu nie ma ?adnego b??du. Prosz? o pomoc :D

 marker createMarker(2327.872420.2010.82-0.90"cylinder"12550020)
blip createBlip(2327.872420.2010.8241)

function 
glod(plrwybierasz)
    
wybierasz tostring(wybierasz)
    if 
wybierasz then return end
    
if isElementWithinMarker(plrmarkerthen
    
if wybierasz == "kebab" then
    outputChatBox
("zjad?e? kebaba. Dostajesz 10 hp")
    
    elseif 
wybierasz == "burger" then 
    outputChatBox
("zjad?e? burgera. Dostajesz 20 hp")
    
setElementHealth(plrgetElementHealth(plr), 20)
        
end
    end 
end
addCommandHandler
("kup",glod)

function 
rozpoczecie(plr)
    
outputChatBox("Witaj, je?eli masz ma?o hp zjedz co?, wybierz: burger, kebab"plr)
end 
addEventHandler
("onMarkerHit"markerrozpoczecie