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: namierzanie
1. Namierzanie
Chcialbym zrobi? zeby komenda unamierz ukrywa?a blipy na graczach.

Jeszcze pokazuje blipy dla wszystkich graczy ale namierza tylko graczy z sapd

function namierz (playerSourcethePlayer,command)
for 
kplayer in pairs(getElementsByType("player")) do
if 
getElementData(player,"player:duty")  == "SAPD" and getElementData(player,"player:rank") > 30 then
outputChatBox
("*Namierzy?es officer?w SAPD",thePlayer)
local blip createBlipAttachedTo player41)
             
end
        end
end
addCommandHandler
("namierz"namierz)

function 
namierz1(thePlayer,command)
      if 
getElementData(thePlayer,"player:rank") < 30 then outputChatBox("*Nie masz uprawnie? do namierzania",thePlayer)
    
end
end
addCommandHandler
("namierz"namierz1)
2. Namierzanie (GPS)
Witam!
My?l? nad stworzeniem skryptu kt?ry umo?liwi namierzenie wpisanych kord?w w komendzie.

Co mam u?y? do tego?
Funkcji getElementPosition?

Chc? u?yska?: /namierz -2934, 100, 394 - i wtedy namierza nam wpisany obszar
3. Namierzanie pojazdu
[center]Witam serdecznie
Mam taki problem, i? po zakupie pojazdu z salonu.

-- server
[lua]
function kupujemypojazd ( id, koszt )
local kasa = getPlayerMoney ( source )
local kosztpojazdu = koszt - 1
if kasa > kosztpojazdu then
local auto = createVehicle ( id, -1973.365234375, 248.23828125, 35.049915313721 )
local iiddd = math.random ( 1,100)
setElementData ( auto, "id", iiddd )
setElementData ( auto, "prywatne", true )
setElementData ( auto, "wlasciciel", getAccountName(getPlayerAccount(source)))
setElementData ( auto, "przebieg", 0 )
setElementData ( auto, "paliwo", 100 )

takePlayerMoney ( source, koszt )
warpPedIntoVehicle ( source, auto )
else
outputChatBox("Ten pojazd kosztuje "..koszt..".", source,255, 255, 255)
end
end
[/lua]

Nie mog? go namierzy?.

-- client
[lua]

function namierz (cmd,TO)
for k,v in ipairs ( getElementsByType ( "vehicle" ) ) do
if getElementData ( v, "id") == TO then
local x,y,z = getElementPosition ( v )
local blip = createBlip(x,y,z, 0, 2.5, 255, 0, 0 )
setTimer(destroyElement, 40000, 1, blip )
attachElements ( blip, v )
outputChatBox("Pojazd zosta? namierzony i zaznaczony blipem na mapie.", 255, 255, 255)
outputChatBox("Blip zniknie po 40 sekundach.", 255, 255, 255)
end
end
end


addCommandHandler("namierz", namierz )
[/lua]

Dodam, i? w debugu nie ma ?adnych b??d?w, pr...
4. Namierzanie Reflesh
Robi? reflesh tematu. Wywala db, ?e jest co? ?le z argumentami.

Kod:


function namierz(thePlayer, commandName, target)
if target then
target = getPlayerFromName ( target )
triggerClientEvent(source,"blipt",root)
else
outputChatBox('[B??d] Podany nick jest nieprawid?owy !', thePlayer)
end
end
addCommandHandler('namierz',namierz)
5. Namierzanie
Siemka, mam taki kod: (Jest to namierzanie gracza, dzia?a tak ?e oznacza go blipem)

s-side:
Kod:

function namierz(thePlayer, commandName, target)
if target then
target = getPlayerFromName ( target )
triggerClientEvent(source,"blipt",root)
-- -- Tworzy blipa
else
outputChatBox('[B??d] Podany nick jest nieprawid?owy !', thePlayer)
end
end
addCommandHandler('namierz',namierz)

function namierz2(thePlayer, commandName, target)
if target then
target = getPlayerFromName ( target )
-- destroyElement(myBlip) -- Niszczy Blipa
else
outputChatBox('[B??d] Podany nick jest nieprawid?owy !', thePlayer)
end
end
addCommandHandler('namierz',namierz2)

c-side:
Kod:

local myPlayer = getRandomPlayer()

addEvent("blipt", true)
addEventHandler("blipt",root
function()
outputChatBox("[Informacja] Zacz??e? namierzanie gracza.",source)
myBlip = createBlipAttachedTo(myPlayer, 56)
end
)

addEvent("blipf", true)
addEventHandler("blipf",root
function()
outputChatBox("[Informacja] Przesta?e? namierza? gracza.",source)
destroyElement(myBlip)
end
)

Dodatkowo mam pytanie, czy istnieje funkcja kt?ra pokazuje wiadomo??, jak outputChatBox, ale tylko dla wybranego teamu ?

[ Dodano: 2014-07-25, 18:20 ]
A, zapomnia?em doda? ?e owy kod nie dzia?a xd...