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: naprawę
1. Funkcja na naprawe auta
Witajcie, mam problem z przyciskiem napraw. Gdy zaznaczam gracza w grid liscie wciskam napraw nic si? nie dzieje. Pomo?e kto??

server
addEvent("naprawisz"true
addEventHandler("naprawisz"getRootElement(), function(playerpotem
local player getPlayerFromName player )
        
takePlayerMoney player 300 )
        
givePlayerMoney(potem200 )
        
local car getPedOccupiedVehicle(player)
        
fixVehicle(car)
end)



client

--Podaje tylko funkcje odpowiadaj?cza naprawianie
function naprawisz()
    
local player guiGridListGetItemText (gridzikguiGridListGetSelectedItem (gridzik), 1
    
triggerServerEvent("naprawisz"getRootElement(), playergetLocalPlayer())
outputChatBox("Naprawiasz auto!"000true)
end
addEventHandler
"onClientGUIClick"przycisk1naprawisz )

2. Potrzebuję naprawę pojazdu pod klawiszem >>2<<
Witam zrobi mi kto? napraw? pojazdu pod klawiszem 2 i z napisem na ?rodku "Pojazd Naprawiony!" i muzyk? nie pami?tam jakie id, ale wiem, ?e na niekt?rych serwerach jak si? loguje H@ to ona jest :D
Zrobi kto??
Za prac? :piwo: :)
3. kod na naprawe
Znalaz?em na forum kod na naprawe od Shuffle i nie dzia?a.
 addEventHandler "onClientClick"root, function( buttonstate_____element )
    if 
element then
        
if button == "right" and state == "down" and getElementType(element) == "vehicle" then
            
if getPedWeapon getLocalPlayer() ) == 23 then
                fixVehicle 
element )
            
end
        end
    end
end

pomo?e kto?? mete mam w client .