18.08.2016, 10:35
http://sampsharp.timpotze.nl/controllers note that this is for v0.7 (I don't know which version you are using)
So controllers are mainly for listening to events so you can distribute them over a set of objects interested in these events. You can also register pooled types in the controllers (pooled types are types which have IDs such as players and vehicles).
A v0.6 example of registering overridden pooled types: https://github.com/ikkentim/SampShar...t.cs#L154-L187
A v0.7 example of registering overridden pooled types:
If you don't need to do one of these things you don't *need* to use controllers, but you can use them for other purposes you like.
So controllers are mainly for listening to events so you can distribute them over a set of objects interested in these events. You can also register pooled types in the controllers (pooled types are types which have IDs such as players and vehicles).
A v0.6 example of registering overridden pooled types: https://github.com/ikkentim/SampShar...t.cs#L154-L187
A v0.7 example of registering overridden pooled types:
PHP код:
[PooledType]
public class Player : BasePlayer
{
// .....
}