public OnPlayerRequestClass(playerid, classid) {
PlayerTextDrawColor(playerid, g_Player[playerid][playerClassTxt][0], g_Team[classid][teamColor]);
PlayerTextDrawSetString(playerid, g_Player[playerid][playerClassTxt][0], g_Team[classid][teamName]);
PlayerTextDrawShow(playerid, g_Player[playerid][playerClassTxt][0]);
new
iTeamPlayer,
szBuffer[450],
szWeaponName[35]
;
for (new i, j = GetPlayerPoolSize(); i <= j; i++) {
if (GetPlayerTeam(i) == g_Team[classid][teamId]) {
iTeamPlayer++;
}
}
format(szBuffer, sizeof(szBuffer), "Players: ~r~%i ~w~~h~out of ~r~%i~n~", iTeamPlayer, g_Server[serverPlayers]);
strcat(szBuffer, "~w~~h~Vocк estarб spawning with ~r~");
GetWeaponName(g_Team[classid][teamWeapon1][0], szWeaponName, sizeof(szWeaponName));
strcat(szBuffer, szWeaponName);
strcat(szBuffer, ", ");
GetWeaponName(g_Team[classid][teamWeapon2][0], szWeaponName, sizeof(szWeaponName));
strcat(szBuffer, szWeaponName);
strcat(szBuffer, ", ");
GetWeaponName(g_Team[classid][teamWeapon3][0], szWeaponName, sizeof(szWeaponName));
strcat(szBuffer, szWeaponName);
strcat(szBuffer, ", ");
GetWeaponName(g_Team[classid][teamWeaponThrown][0], szWeaponName, sizeof(szWeaponName));
strcat(szBuffer, szWeaponName);
strcat(szBuffer, ", ");
GetWeaponName(g_Team[classid][teamWeaponMelle], szWeaponName, sizeof(szWeaponName));
strcat(szBuffer, szWeaponName);
PlayerTextDrawSetString(playerid, g_Player[playerid][playerClassTxt][1], szBuffer);
PlayerTextDrawShow(playerid, g_Player[playerid][playerClassTxt][1]);
if (g_Player[playerid][playerSpawnProtectTimer] != -1) {
KillTimer(g_Player[playerid][playerSpawnProtectTimer]);
}
if (IsValidDynamic3DTextLabel(g_Player[playerid][playerSpawnProtectLabel])) {
DestroyDynamic3DTextLabel(g_Player[playerid][playerSpawnProtectLabel]);
}
if (g_Player[playerid][playerSpawnTxtTimer] != -1) {
KillTimer(g_Player[playerid][playerSpawnTxtTimer]);
}
OnSpawnTextdrawHide(playerid);
switch (g_Team[classid][teamId]) {
case 0: {
SetPlayerInterior(playerid, 0);
SetPlayerCameraPos(playerid, 2524.1550, -1671.1104, 19.9203);
SetPlayerCameraLookAt(playerid, 2520.1550, -1671.1104, 19.4203);
SetPlayerPos(playerid, 2520.1550, -1671.1104, 19.4203);
SetPlayerFacingAngle(playerid, 270.0000);
ApplyAnimation(playerid, "Dancing", "Dan_Loop_A", 5.0, 1, 0, 0, 0, 0);
}
case 1: {
SetPlayerInterior(playerid, 0);
SetPlayerCameraPos(playerid, 1948.655639, -1114.651733, 31.215576);
SetPlayerCameraLookAt(playerid, 1944.464599, -1117.156250, 30.137393);
SetPlayerPos(playerid,1945.0365,-1116.4506,30.757
;
SetPlayerFacingAngle(playerid,295.8885);
ApplyAnimation(playerid, "Dancing", "Dan_Loop_A", 5.0, 1, 0, 0, 0, 0);
}
case 2: {
SetPlayerInterior(playerid, 0);
SetPlayerCameraPos(playerid, 1512.555541, -1638.949829, 19.780670);
SetPlayerCameraLookAt(playerid, 1515.505371, -1642.952270, 19.252750);
SetPlayerPos(playerid,1514.8364,-1642.3707,19.2422);
SetPlayerFacingAngle(playerid,31.5911);
ApplyAnimation(playerid, "Dancing", "Dan_Loop_A", 5.0, 1, 0, 0, 0, 0);
}
case 3: {
SetPlayerInterior(playerid, 0);
SetPlayerCameraPos(playerid, 2631.425781, -1068.947387, 77.147903);
SetPlayerCameraLookAt(playerid, 2626.514404, -1068.871337, 76.214347);
SetPlayerPos(playerid,2626.9626,-1068.8726,75.9696);
SetPlayerFacingAngle(playerid,269.8981);
ApplyAnimation(playerid, "Dancing", "Dan_Loop_A", 5.0, 1, 0, 0, 0, 0);
}
case 4: {
SetPlayerInterior(playerid, 0);
SetPlayerCameraPos(playerid, 1785.895385, -2094.484130, 18.303087);
SetPlayerCameraLookAt(playerid, 1787.589721, -2099.043457, 17.144950);
SetPlayerPos(playerid,1787.6921,-2099.0662,17.4470);
SetPlayerFacingAngle(playerid,31.671
;
ApplyAnimation(playerid, "Dancing", "Dan_Loop_A", 5.0, 1, 0, 0, 0, 0);
}
case 5: {
SetPlayerInterior(playerid, 0);
SetPlayerCameraPos(playerid, 1124.762329, -1191.299682, 33.81042
;
SetPlayerCameraLookAt(playerid, 1122.427734, -1195.331298, 31.995071);
SetPlayerPos(playerid,1122.2896,-1195.3792,32.0313);
SetPlayerFacingAngle(playerid,326.1501);
ApplyAnimation(playerid, "Dancing", "Dan_Loop_A", 5.0, 1, 0, 0, 0, 0);
}
case 6: {
SetPlayerInterior(playerid, 0);
SetPlayerCameraPos(playerid, 869.850463, -973.024658, 41.405673);
SetPlayerCameraLookAt(playerid, 873.374816, -969.478149, 41.434577);
SetPlayerPos(playerid,873.1442,-969.5593,41.0649);
SetPlayerFacingAngle(playerid,141.9807);
ApplyAnimation(playerid, "Dancing", "Dan_Loop_A", 5.0, 1, 0, 0, 0, 0);
}
default: {
SetPlayerInterior(playerid, 0);
SetPlayerCameraPos(playerid, 2466.381591, -1644.103027, 18.203895);
SetPlayerCameraLookAt(playerid, 2470.127685, -1647.413452, 18.117961);
SetPlayerPos(playerid,2469.7090,-1646.9497,18.2023);
SetPlayerFacingAngle(playerid,53.1127);
ApplyAnimation(playerid, "Dancing", "Dan_Loop_A", 5.0, 1, 0, 0, 0, 0);
}
}
g_Player[playerid][playerClass] = classid;
return 1;
}