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

Wysłany: 2011-08-27, 10:45


Adrian1545







Wiek: 30
Na forum: 5646 dni
Posty: 78
Nick w MP: [sXc]Lexon

Piwa: 125

Respekt: 55

Witam.
Mam skrypt na podmian? auta i chcia? bym zrobi? aby te auto w??cza?o sie tylko osobow z teamu lub grupy acl.
Prosze o pomoc.

Kod:

function replaceModel()
txd = engineLoadTXD("infernus.txd", 411 )
engineImportTXD(txd, 411)
dff = engineLoadDFF("infernus.dff", 411 )
engineReplaceModel(dff, 411)
end
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel)

addCommandHandler ( "reloadcar", replaceModel )


Postaw piwo autorowi tego posta
 

 
Wysłany: 2011-08-27, 12:29


Piorun







Wiek: 32
Na forum: 6712 dni
Posty: 1837
Nick w MP: Piorun

Piwa: 516

Respekt: 480,7
Respekt: 480,7

getPlayerTeam

Kod:


If getPlayerTeam(getLocalPlayer()) == "blahblahblah" then
-- tutaj kod
end


My?l?, ?e sobie poradzisz :) .

Podpis
Możesz mnie znaleźć na: Facebook
Postaw piwo autorowi tego posta
 

 
Wysłany: 2011-08-27, 20:47


Adrian1545







Wiek: 30
Na forum: 5646 dni
Posty: 78
Nick w MP: [sXc]Lexon

Piwa: 125

Respekt: 55

Zrobi?em tak i nie dzia?a

Kod:

If getPlayerTeam(getLocalPlayer()) == "team" then
function replaceModel()
txd = engineLoadTXD("infernus.txd", 411 )
engineImportTXD(txd, 411)
dff = engineLoadDFF("infernus.dff", 411 )
engineReplaceModel(dff, 411)
end


i tak tez
[code]
Kod:

If getPlayerTeam(getLocalPlayer()) == "team" then
function replaceModel()
txd = engineLoadTXD("car/infernus.txd", 411 )
engineImportTXD(txd, 411)
dff = engineLoadDFF("car/infernus.dff", 411 )
engineReplaceModel(dff, 411)
end
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel)

addCommandHandler ( "reloadcar", replaceModel )
end


a te blabla to nazwa teamu ?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2011-08-27, 21:15


Piorun







Wiek: 32
Na forum: 6712 dni
Posty: 1837
Nick w MP: Piorun

Piwa: 516

Respekt: 480,7
Respekt: 480,7

Kod:


addEventHandler ( "onClientResourceStart", getRootElement(),
function()
if getPlayerTeam(getLocalPlayer()) == "team" then
txd = engineLoadTXD("car/infernus.txd")
engineImportTXD(txd, 411)
dff = engineLoadDFF("car/infernus.dff", 411 )
engineReplaceModel(dff, 411)
end
end)

Warunek if piszemy zawsze z ma?ej.
Usun??em r?wnie? z funkcji engineLoadTXD parametr modelid, poniewa? w tej funkcji nie ma tego parametru.

Powinno dzia?a?.

Podpis
Możesz mnie znaleźć na: Facebook
Postaw piwo autorowi tego posta
 

 
Tagi: nowe :: auto :: komenda
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