Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RemoveClass and include file #17

Closed
BitFros7y opened this issue Sep 16, 2015 · 7 comments
Closed

RemoveClass and include file #17

BitFros7y opened this issue Sep 16, 2015 · 7 comments

Comments

@BitFros7y
Copy link

I suggest adding Remove/DestroyClass(classid) as it may be very useful. YSI y_classes have these but i guess i wouldnt hurt to have one more simple function...
And add include file with all functions and callbacks to releases (R14-3 and R15 did not have include, and i even wanted to suggest SetPlayerGravity function but checked source and noticed its already there)
Also suggesting adding examples for SendRPC and SendData and some more complex functions/callbacks in first post at samp forums.

@Crayder
Copy link

Crayder commented Sep 16, 2015

Classes are static, even y_classes' classes are static. Once created they can't be removed. y_classes simulates classes on top of the static classes. This can all be done in your script as well, I'm sure this won't be added.

@oscar-broman
Copy link
Contributor

Resetting classes to 0 would be really simple, just modify iSpawnsAvailable in pNetGame.

If you want to delete individual ones, all you need to do is splice AvailableSpawns and decrease iSpawnsAvailable.

@BitFros7y
Copy link
Author

Yep just remove individual ones..Or maybe add another functions like DestroyAllClasses() ?
These would be useful for some servers like mini games...

@ghost
Copy link

ghost commented Jan 25, 2016

It's possible but only would affect newly connected players

@ghost
Copy link

ghost commented Jan 31, 2016

I've did what I can to help you: 7c86cb3

@ghost ghost closed this as completed Jan 31, 2016
@Crayder
Copy link

Crayder commented Jan 31, 2016

How about a ResetClasses? Then we could manage local ones and reset the real ones when we want to do something.

Like, I could have an array of classes in my server. I initially add them using AddPlayerClass. Then if I want to remove a few I reset them and add the ones I have left.

@ghost
Copy link

ghost commented Jan 31, 2016

e9aa05b

for(new i = GetAvailableClasses(); i != 0; i--)
{
RemoveLastClass();
}

all classes has been reseted.

you can add new with AddPlayerClass

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants