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: pointer
1. Bad 'player' pointer @ 'getPlayerTeam'
Siema Napisa?em skrypt na teleportacje przez marker po czym wyskakuje mi b?ad :/

o to Kod Lua :


marker 
createMarker( -1078.38402.8913.1"cylinder"1.50237184255 )

function 
teleport (hitElement)
    if 
getPlayerTeam(hitElement) == getTeamFromName("Admins"
then
    
if getPedOccupiedVehicle(hitElement)
then   
    setElementPosition 
(hitElement,-1168.86,341.98,673.28 )
end
end
end
    addEventHandler 
("onMarkerHit",marker,teleport


B??d:

Bad 'player' pointer 'getPlayerTeam'(1)


Prosz? o szybk? pomoc :)
2. Bad 'element' pointer @ 'destroyElement'(1)
Witajcie, mam problem z usuwaniem button?w:

B??d
Bad 'element' pointer @ 'destroyElement'(1)

Kod:
local prawkoPed createPed(17, -2035.14, -118.141035.171875)
setElementInterior(prawkoPed3)
setElementRotation(prawkoPed00270)
buttons = {}

addEventHandler("onClientClick"getRootElement(),
function(
buttonstateabsoluteXabsoluteYworldXworldYworldZclickedElement)
    if (
clickedElement==prawkoPedthen
        local x
getScreenFromWorldPosition(-2035.14, -118.141035.171875)
        
buttons[1] = guiCreateButton(xy10020"Rozmowa"false)
        
addEventHandler("onClientGUIClick"buttons[1], startRozmowa)
    else
        for 
kbuttons in ipairs(buttons) do
            
destroyElement(buttons)
        
end
    end
end
)

function 
startRozmowa()
    for 
kbuttonss in ipairs(buttons) do
        
destroyElement(buttonss)
    
end
end