psyduck Posted September 28, 2013 Share Posted September 28, 2013 witam mam problem wynikający z mojego nieobeznania sie z LUA ale nie moge sobie z tym poradzic kolejny raz chodzi o to ze chce podpalić wszytskich którzy bedą w zasiegu poza sobą samym i nie wiem jak to zrobic bo brakuje mi c++'owego "różny od" function immo(thePlayer, cmd) local element = "player" local radius = 50 local x, y, z = getElementPosition(thePlayer) local colshape = createColSphere(tonumber(x), tonumber(y), tonumber(z), tonumber(radius)) for index, value in ipairs(getElementsWithinColShape(colshape, element )) do outputChatBox("player: "..getPlayerName(value), thePlayer) outputChatBox("for: "..getPlayerName(value), thePlayer) setPedOnFire ( value, true ) end end destroyElement(colshape) end addCommandHandler("dg", immo) Link to comment
dzek (varez) Posted September 28, 2013 Share Posted September 28, 2013 Jak na kogoś, kto ma doświadczenie z C++ to trochę kiepskie formatowanie kodu i lenistwo, by sprawdzić, że na forum jest podświetlanie kodu for index, value in ipairs(getElementsWithinColShape(colshape, element )) do if (thePlayer ~= value) then setPedOnFire (value, true) end end Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now