Instalar o Steam
Iniciar sessão
|
Idioma
简体中文 (Chinês Simplificado)
繁體中文 (Chinês Tradicional)
日本語 (Japonês)
한국어 (Coreano)
ไทย (Tailandês)
Български (Búlgaro)
Čeština (Checo)
Dansk (Dinamarquês)
Deutsch (Alemão)
English (Inglês)
Español-España (Espanhol de Espanha)
Español-Latinoamérica (Espanhol da América Latina)
Ελληνικά (Grego)
Français (Francês)
Italiano (Italiano)
Bahasa Indonesia (Indonésio)
Magyar (Húngaro)
Nederlands (Holandês)
Norsk (Norueguês)
Polski (Polaco)
Português (Brasil)
Română (Romeno)
Русский (Russo)
Suomi (Finlandês)
Svenska (Sueco)
Türkçe (Turco)
Tiếng Việt (Vietnamita)
Українська (Ucraniano)
Relatar problema de tradução
what are you guys talking about simfphys is still here!
I feel my best!
:
:
:
:
:
Here's how it's used in trailers reborn:
Addon adds callback to list of "FLEX" callbacks with id of "Trailers".
A table containing required data (connection positions and types + few optional ones) is added to car definition in simfphys vehicle definition list as a `FLEX { Trailers = { inPos = Vector(0,0,0) } }`
FLEX is just a simple script that will call trailers's callback with data of FLEX { Trailers }.
When car is spawn, "FLEX" loads car definition and checks if it has field named "FLEX".
If it does, it goes through every member checking if callback for it is registered, if it is, it runs it.
So...
vehicle is spawn -> load it's definition -> it has field named "FLEX" and it's a table (list of key and value pair) -> go through every member of this list -> check if there's a callback registered with same key -> call it.
list.Set("FLEX", "Test", function(entity, spawndata)
print(spawndata)
end)
-- somewhere in vehicle spawnlist
vehicle = {
-- ...
FLEX = {
Test = 12345
}
-- Members = {...}
}
ok!
Nice!