HU/setBlipOrdering

From Multi Theft Auto: Wiki
Revision as of 16:56, 24 July 2018 by Surge (talk | contribs)
Jump to navigation Jump to search

Ez a funkció beállítja a blip Z tengelyen való értékét. Ez lehetővé teszi, hogy megadd, hogy a blip egy másik blip felett, vagy alatt jelenjen meg.

Szintaxis

bool setBlipOrdering ( blip theBlip, int ordering )

OOP Syntax Help! I don't understand this!

Method: blip:setOrdering(...)
Variable: .ordering
Counterpart: getBlipOrdering


Kötelező argumentumok

  • theBlip: the blip whose Z ordering to change.
  • ordering: the new Z ordering value. Blips with higher values will appear on top of blips with lower values. Possible range: -32767 to 32767. Default: 0.

Visszaadott érték

Returns true if the blip ordering was changed successfully, false otherwise.

Példa

This example will create a blip and make your blip on top of all other blip's.

Click to collapse [-]
Server
function makeBlipHigher(thePlayer)
    local setmeup = createBlipAttachedTo ( thePlayer, 3, 3, 255, 0,0,255,0,99999.0, root)
    setBlipOrdering(setmeup, getBlipOrdering(setmeup) + 1)
    outputChatBox("*INFO: #ffff00Your blip is now on top of others!", thePlayer, 255,0,0,true)
    for i,v in ipairs(getElementsByType"player") do
          if v ~= thePlayer then
                  outputChatBox("*INFO: #ffff00" .. getPlayerName(thePlayer) .. "'s blip is now on top of your blip!",v,255,0,0,true)
          end
    end
end
addCommandHandler("incrementBlip", makeBlipHigher, false, false)

Lásd még

Fordította

  • Surge