Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2017-01-11, 17:02


venzikk

LUA, MODELER






Wiek: 25
Na forum: 3964 dni
Posty: 235
Nick w MP: VenZ

Piwa: 3158

Respekt: 240
Respekt: 240Respekt: 240

Witam ot?z zrobi?em co? takiego:

function pogotowie(thePlayer)

local gracz = getPlayerName(thePlayer)

outputChatBox (gracz.."  Wzywa Pogotowie Ratunkowe ! ", getRootElement(),120, 235, 63)
     setTimer(function()

local x, y, z = getElementPosition( thePlayer )
local thePlayer = createBlip( x, y, z, 22, 0, 0, 0, 255 )

end,2000,0)
end
addCommandHandler("999", pogotowie)


Co zrobi?, by ten marker si? usuwa? a nie powstawa? kolejny ?

[ Dodano: 2017-01-11, 17:12 ]
Dobra dzia?a, mam co? takiego, ale co zrobi?, ?eby tylko Pogotowie widza?o, ?e kto? ich wzywa



local gracz = getPlayerName(thePlayer)

outputChatBox (gracz.." Was wzywa! ", getRootElement(),120, 235, 63)


local x, y, z = getElementPosition( thePlayer )
local thePlayer = createBlip( x, y, z, 22, 0, 0, 0, 255 )

     setTimer(function()
    destroyElement(thePlayer) 
end,2000,1)
end
addCommandHandler("999", pogotowie)




Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-01-11, 17:20


nanKy







Wiek: 23
Na forum: 4006 dni
Posty: 498
Nick w MP: nanky

Piwa: 1775

Respekt: 239
Respekt: 239Respekt: 239

Zale?y pod co masz frakcje ACL/MYSQL czyli elementdata
Jak masz pod acl to nie doko?ca wiem jak to ma wygl?da? lecz co? na tym przyk?adzie


local gracz = getPlayerName(thePlayer)
if isObjectInACLGroup ( "user." ..gracz, aclGetGroup ( "Frakcja" ) then
outputChatBox (gracz.." Was wzywa! ", getRootElement(),120, 235, 63)


local x, y, z = getElementPosition( thePlayer )
local thePlayer = createBlip( x, y, z, 22, 0, 0, 0, 255 )

     setTimer(function()
    destroyElement(thePlayer) 
end,2000,1)
end
end
addCommandHandler("999", pogotowie)




LUB MYSQL/ELEMENTDATA



local gracz = getPlayerName(thePlayer)
    if getElementData("elementdatafrakcji") then
outputChatBox (gracz.." Was wzywa! ", getRootElement(),120, 235, 63)


local x, y, z = getElementPosition( thePlayer )
local thePlayer = createBlip( x, y, z, 22, 0, 0, 0, 255 )

     setTimer(function()
    destroyElement(thePlayer) 
end,2000,1)
end
end
addCommandHandler("999", pogotowie)


Postaw piwo autorowi tego posta
 

 
Tagi: wezwania.
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku