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: addcommandhandler
1. addCommandHandler
Witam.
Mam taki kodzik, w debugu nic a nic sie nie robic, jestem w markerze wpisuje /zaladuj i nic wiec o co chodzi ;p pomozcie.

Kod:

function niejadek (player)
if ( player == localPlayer ) then
if isElementWithinMarker(player, praca3) then
if getElementData (player, "praca3") == true then
if isPedInVehicle (player) then
local v=getPedOccupiedVehicle(player)
local m=getElementModel(v)
if (m==578) then
outputChatBox ( "Za?adowa?e? Towar, Teraz jedz zawiez go do magazynu w LV", getLocalPlayer(), 0, 0, 205 )
setElementData(player, "dostawa", true )
setElementPosition( v, -1050.8125, -1024.5386962891, 129.89190673828 )
zaladowane = createObject ( 3374, -1046.0583496094, -1024.4210205078, 130.57907104492, 0, 0, 0 )
zaladowane1 = createObject ( 3374, -1043.3299560547, -1024.1569824219, 130.5806427002, 0, 0, 0 )
attachElements ( v, zaladowane )
attachElements ( v, zaladowane1 )
else
outputChatBox ( "niemacie", getLocalPlayer(), 0, 0, 205 )
end
end
end
end
end
end
addCommandHandler("zaladuj", niejadek)
2. 2 argument addCommandHandler
addCommandHandler("bpoli", garazfPolicja)
function 
garazfPolicja(player)
    if 
isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(player)), aclGetGroup("Policja")) then
        
if getPlayerTeam(player) == getTeamFromName("Policja") then
            removeCommandHandler
("bpoli")
            
addCommandHandler("bpoli", otwarta)
            
moveObject(garazPolicja, 10184, -1631.6999511719, 688.40002441406, 12.5)
            
setTimer(
                function ()
                    
addCommandHandler("bpoli", garazfPolicja)
                    
moveObject(garazPolicja, 10184, -1631.6999511719, 688.40002441406, 8.6999998092651)
                
end, 
            
10000, 1)
        else
            
outputChatBox("?eby otworzy? brame, musisz by? na dy?urze.", player)
        
end
    
else
        
outputChatBox("Nie pracujesz w Policji.", player)
    
end
end


Co jest ?le w 2 argumencie addCommandHandler ??