oscar-broman / PAWN-Boilerplate

(discontinued) Solid core for a big SA-MP server script.
http://sa-mp.com/
24 stars 13 forks source link

Increased class functions #33

Closed Jameskmonger closed 10 years ago

Jameskmonger commented 11 years ago

Could we look at implementing some functions to delete/hide and edit classes during runtime?

oscar-broman commented 11 years ago

I designed the system to scan for the next available class, asking PlayerCanSelectClass each time. It's ready to be improved.

Perhaps adding a callback that PlayerCanSelectClass calls, to allow maximum flexibility.

Jameskmonger commented 11 years ago

I'm sure that it would be relatively easy to implement the class editing, it would just require defining each class with an id

oscar-broman commented 11 years ago

Each class does have an id - the one you get when creating it.

Jameskmonger commented 11 years ago

I mean saving this id rather than just using CreateClass and no using the returned value.

oscar-broman commented 11 years ago

Oh you mean in the demo gamemode? Yeah, well there isn't a reason to do this currently.

Jameskmonger commented 11 years ago

Not just in the demo gamemode, I haven't been storing the id of the class anywhere. I think it would be pretty easy to implement class editing and allowance though, right?

oscar-broman commented 11 years ago

Yeah, that's what I said. All you need to do, really, is modify PlayerCanSelectClass. I will do this when starting on v1.1, but you can try doing it beforehand.

Jameskmonger commented 11 years ago

Alright, if I have any luck I'll send it to you :)