how to make a class selection screen with class system
#1

guys help me with this
how to make a class selection screen with class system
Reply
#2

There is always ******, but here's the main functions you use in making such a thing.

https://sampwiki.blast.hk/wiki/AddPlayerClassEx
https://sampwiki.blast.hk/wiki/AddPlayerClass

^^ 1 or the other... One does setting of classes only, the Ex one does team setting as well via the character selected.

https://sampwiki.blast.hk/wiki/SetPlayerCameraPos
https://sampwiki.blast.hk/wiki/SetPlayerCameraLookAt

https://sampwiki.blast.hk/wiki/SetPlayerPosition
https://sampwiki.blast.hk/wiki/SetPlayerInterior

https://sampwiki.blast.hk/wiki/TextDrawCreate
Reply
#3

Код:
stock LoadClasses()
{
//  Unity Classes
    AddPlayerClass(115, 1766.5635,-1847.7111,13.5781,183.4783, 24, 200, 28, 200, 33, 200); // Unity Class 1
	AddPlayerClass(33, 1766.5635,-1847.7111,13.5781,183.4783, 24, 200, 28, 200, 33, 200); // Unity Class 2
 	AddPlayerClass(53, 1766.5635,-1847.7111,13.5781,183.4783, 24, 200, 28, 200, 33, 200); // Unity Class 3
//  Grove Classes
 	AddPlayerClass(105,2504.0347,-1652.5273,13.5938,140.7401, 24, 200, 28, 200, 33, 200); // Grove Class 1
	AddPlayerClass(106,2512.7522,-1675.1533,13.5483,80.8929, 24, 200, 28, 200, 33, 200); // Grove Class 2
	AddPlayerClass(107,2504.1245,-1685.8965,13.5469,44.8592, 24, 200, 28, 200, 33, 200); // Grove Class 3
// Ballas Classes
    AddPlayerClass(102,2055.9773,-1192.9594,23.7984,267.8276, 24, 200, 28, 200, 33, 200); // Ballas Class 1
	AddPlayerClass(103,2055.5042,-1167.6951,23.7719,270.9610, 24, 200, 28, 200, 33, 200); // Ballas Class 2
	AddPlayerClass(104,2055.7559,-1151.1599,23.7852,270.9610, 24, 200, 28, 200, 33, 200); // Ballas Class 3
// PD Classes
    AddPlayerClass(280,1578.6930,-1694.5786,6.2188,186.0260, 24, 200, 28, 200, 33, 200); // PD Class 1
	AddPlayerClass(283,1572.8768,-1694.2316,6.2188,172.5525, 24, 200, 28, 200, 33, 200); // PD Class 2
	AddPlayerClass(288,1566.6099,-1693.9060,5.8906,171.6125, 24, 200, 28, 200, 33, 200); // PD Class 3
	AddPlayerClass(285,1561.4171,-1693.9485,5.8906,177.2525, 24, 200, 28, 200, 33, 200); // PD Class 4
	printf("|----------[ Classes Loaded! ] ----------|");
	return 1;
}
This is an already made class system I got here for you. Just copy that code into your script and you should be good..
Reply
#4

Quote:
Originally Posted by nicholasramdhan
Посмотреть сообщение
This is an already made class system I got here for you. Just copy that code into your script and you should be good..
Well done at pasting something which only does a quarter of what he needed...


Maybe show him where to look, rather than simply encouraging copy-paste..


Just so he learns to learn, not simply copy and paste to make things... And when in doubt, ask on the forums for someone to paste more...

By doing this, he learns nothing at all.



And, your code can be done so much better...
Reply
#5

Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
Well done at pasting something which only does a quarter of what he needed...


Maybe show him where to look, rather than simply encouraging copy-paste..


Just so he learns to learn, not simply copy and paste to make things... And when in doubt, ask on the forums for someone to paste more...

By doing this, he learns nothing at all.



And, your code can be done so much better...
Well, maybe the kid doesn't wanna learn how to script, he asked how to make the class section screen, and this shows exactly what he needs to add. It's simple. I didn't wanna go out like what you did. So yeah, my fault for being basic.
Reply
#6

Quote:
Originally Posted by nicholasramdhan
Посмотреть сообщение
Well, maybe the kid doesn't wanna learn how to script, he asked how to make the class section screen, and this shows exactly what he needs to add. It's simple. I didn't wanna go out like what you did. So yeah, my fault for being basic.
HAHAHAHAHA How new are you to this forum?

Fact is, pasting up code, to simple requests like this is frowned upon...


He asked you HOW TO MAKE IT... Not how to paste it....

Your code, is also substandard, and doesn't even do ANYTHING to help him out, expect for adding 9 classes, with no class selection screen or anything.

Are you sure you know how to actually code and not simply copy-paste, not knowing what the code you are copying and pasting is actually doing?
Reply
#7

Quote:
Originally Posted by nicholasramdhan
Посмотреть сообщение
Код:
stock LoadClasses()
{
//  Unity Classes
    AddPlayerClass(115, 1766.5635,-1847.7111,13.5781,183.4783, 24, 200, 28, 200, 33, 200); // Unity Class 1
	AddPlayerClass(33, 1766.5635,-1847.7111,13.5781,183.4783, 24, 200, 28, 200, 33, 200); // Unity Class 2
 	AddPlayerClass(53, 1766.5635,-1847.7111,13.5781,183.4783, 24, 200, 28, 200, 33, 200); // Unity Class 3
//  Grove Classes
 	AddPlayerClass(105,2504.0347,-1652.5273,13.5938,140.7401, 24, 200, 28, 200, 33, 200); // Grove Class 1
	AddPlayerClass(106,2512.7522,-1675.1533,13.5483,80.8929, 24, 200, 28, 200, 33, 200); // Grove Class 2
	AddPlayerClass(107,2504.1245,-1685.8965,13.5469,44.8592, 24, 200, 28, 200, 33, 200); // Grove Class 3
// Ballas Classes
    AddPlayerClass(102,2055.9773,-1192.9594,23.7984,267.8276, 24, 200, 28, 200, 33, 200); // Ballas Class 1
	AddPlayerClass(103,2055.5042,-1167.6951,23.7719,270.9610, 24, 200, 28, 200, 33, 200); // Ballas Class 2
	AddPlayerClass(104,2055.7559,-1151.1599,23.7852,270.9610, 24, 200, 28, 200, 33, 200); // Ballas Class 3
// PD Classes
    AddPlayerClass(280,1578.6930,-1694.5786,6.2188,186.0260, 24, 200, 28, 200, 33, 200); // PD Class 1
	AddPlayerClass(283,1572.8768,-1694.2316,6.2188,172.5525, 24, 200, 28, 200, 33, 200); // PD Class 2
	AddPlayerClass(288,1566.6099,-1693.9060,5.8906,171.6125, 24, 200, 28, 200, 33, 200); // PD Class 3
	AddPlayerClass(285,1561.4171,-1693.9485,5.8906,177.2525, 24, 200, 28, 200, 33, 200); // PD Class 4
	printf("|----------[ Classes Loaded! ] ----------|");
	return 1;
}
And this code won't executed without LoadClasses() under OnGameModeInit()
Reply
#8

Quote:
Originally Posted by bondowocopz
Посмотреть сообщение
And this code won't executed without LoadClasses() under OnGameModeInit()
But that's all it does... Just makes the classes... No area to be selecting, no textdraws, nothing more than just allocating some classes...
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)