Код:
public OnPlayerRequestClass(playerid, classid)
{
ShowPlayerDialog(playerid,1234, DIALOG_STYLE_MSGBOX,""GREEN"Regulations",""ALB"Don't use a bad language!\n"ALB"Don't advertise\n"ALB"Don't player Kill\n"ALB"Read /rules and /pc","Accept","Refuse");
//Set up the class selection
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,-1753.6743,885.2703,295.8750);
SetPlayerCameraPos(playerid,-1753.6849,892.0016,295.8750);
SetPlayerCameraLookAt(playerid,-1753.6743,885.2703,295.8750);
SetPlayerFacingAngle(playerid,0.6323);
//Do things to the player
SetPlayerColor(playerid,COLOR_DEADCONNECT);
SetPlayerTeamFromClass(playerid,classid);
switch (classid)
{
case 0,1,2,3,4,5:
{
GameTextForPlayer(playerid, "~b~POL. OFFICER~n~~w~CITY DIV", 3000, 5);
}
case 6:
{
GameTextForPlayer(playerid, "~b~POL. OFFICER~n~~w~SWAT DIV", 3000, 5);
}
case 7:
{
GameTextForPlayer(playerid, "~b~POL. OFFICER~n~~w~FBI DIV", 3000, 5);
}
case 8:
{
GameTextForPlayer(playerid, "~p~ARMY OFFICER~n~~w~DEADLY FORCE SQUAD", 3000, 5);
}
case 9:
{
GameTextForPlayer(playerid, "~y~CIA~n~~w~CENTRAL INTELLIGENCE AGENCY", 3000, 5);
}
case 10:
{
GameTextForPlayer(playerid, "~b~POL. OFFICER~n~~w~CASUAL DIV", 3000, 5);
}
case 11:
{
GameTextForPlayer(playerid, "~b~POL. OFFICER~n~~w~AIR DiV", 3000, 5);
}
case 12:
{
GameTextForPlayer(playerid, "~b~POLICE OFFICER~n~~w~MARINE SUPPORT", 3000, 5);
}
case 13:
{
GameTextForPlayer(playerid, "~g~MEDIC~n~~w~CITY DIV", 3000, 5);
}
case 14:
{
GameTextForPlayer(playerid, "~w~CAR MECHANIC", 3000, 5);
}
case 15,16:
{
GameTextForPlayer(playerid, "~g~TAXI DRIVER", 3000, 5);
}
case 17,18,19,20,21,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,48,49,50,51,52,53,54,55,56,57,58,59,60:
{
GameTextForPlayer(playerid, "~w~CIVILIAN~n~~r~CHOOSE A JOB WHEN YOU SPAWN", 3000, 5);
}
}
return 1;
}