[Tutorial] Making Skin Selector with gametext & teams[DM]
#1

Introduction
This tutorial shows you how can you add a Screen Message and set player's team while he chooses a skin.
Codes
First of all you have to set teams:
Код:
public OnGameModeInit()
{
SetTeamCount( 1 ); //Change the number "1" depending on the teams you want to have(Number 0 = 1 team/Number 1 = 2 Teams .......)
return 1;
}
Then we have to add skins(https://sampwiki.blast.hk/wiki/Skins:All):
Код:
public OnGameModeInit()
{
AddPlayerClass(115, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0);//terrorist (Team 0)
AddPlayerClass(195, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0);//swat(Team 1)
SetTeamCount( 1 ); //Change the number "1" depending on the teams you want to have(Number 0 = 1 team/Number 1 = 2 Teams .......)
return 1;
}
So after you guys do this you have to change public OnPlayerRequestClass(playerid, classid) code:
Код:
public OnPlayerRequestClass(playerid, classid)
{
	SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
	SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
	SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
	SetCameraBehindPlayer(playerid);
switch(classid)
{
case 0: //The first "AddPlayerClass" you added at "OnGameModeInit()"
{
GameTextForPlayer(playerid,"~r~Terrorist",4000,3);//Screen Message
SetPlayerTeam(playerid, 0 );//Sets Player's TEAM
}
case 1: //The second"AddPlayerClass" you added at "OnGameModeInit()"
{
GameTextForPlayer(playerid,"~r~S.W.A.T",4000,3);//Screen Message
SetPlayerTeam(playerid, 1 );//Sets Player's Team
}
}
return 1;
}
Errors or Problems? let me know
If you face any problems about this please let me know
Reply
#2

Not explained lol.
Reply
#3

Explain well next time .
Reply
#4

Not Explained at all.
Reply
#5

Yay! I love all these C&P works! Mind telling me how to do it?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)