Wysłany: 2011-08-27, 10:45
Adrian1545
Wiek: 30 Na forum: 5646 dni Posty: 78
Nick w MP: [sXc]Lexon
Piwa : 125
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 )
Wysłany: 2011-08-27, 12:29
Piorun
Wiek: 32 Na forum: 6712 dni Posty: 1837
Nick w MP: Piorun
Piwa : 516
getPlayerTeam
Kod:
If getPlayerTeam(getLocalPlayer()) == "blahblahblah" then
-- tutaj kod
end
My?l?, ?e sobie poradzisz .
Wysłany: 2011-08-27, 20:47
Adrian1545
Wiek: 30 Na forum: 5646 dni Posty: 78
Nick w MP: [sXc]Lexon
Piwa : 125
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 ?
Wysłany: 2011-08-27, 21:15
Piorun
Wiek: 32 Na forum: 6712 dni Posty: 1837
Nick w MP: Piorun
Piwa : 516
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?.
Tagi: nowe :: auto :: komenda
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: