HU/setBlipOrdering

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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: A blip, ami a Z tengely értékét változtatja.
  • ordering: az új Z kordináta értéke. A magasabb értékkel rendelkező blipek magasabban fognak megjelenni, mint a kevesebb értékkel rendelkező. Lehetséges érték: -32767-tól 32767-ig. Alapértelmezett: 0.

Visszaadott érték

Visszaad egy true értéket, ha a blip kordinátája sikeresen meg lett változtatva, egyébként false.

Példa

Ez a példa létrehoz egy blip-et, és a te blipedet az összes többi blip fölé helyezi.

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