pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
PlayerPlaySound(playerid, 1183, 0.0, 0.0, 0.0);
SetPlayerCameraPos(playerid,1811.8379,-1602.5963,13.5313);
SetPlayerCameraLookAt(playerid,1808.8795,-1599.4998,13.5469);
SetPlayerPos(playerid, 1809.1266,-1599.5068,13.5469);
SetPlayerFacingAngle(playerid, 222.6137);
ApplyAnimation(playerid,"PARK","Tai_Chi_Loop", 3.1,1,1,1,1,1);
ApplyAnimation(playerid,"PARK","Tai_Chi_Loop", 3.1,1,1,1,1,1);
ApplyAnimation(playerid,"PARK","Tai_Chi_Loop", 3.1,1,1,1,1,1);
ApplyAnimation(playerid,"PARK","Tai_Chi_Loop", 3.1,1,1,1,1,1);
switch(classid)
{
case 0..8:{ GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~b~ Police", 3000, 3); PlayerInfo[playerid][c]=0; }
case 9,10:{ GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~b~ CIA", 3000, 3); PlayerInfo[playerid][c]=1; }
case 11:{ GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~b~~h~~h~ S.W.A.T~n~~w~ Invite Required", 3000, 3); PlayerInfo[playerid][c]=2; }
case 12:{ GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~p~ National Guard~n~~w~ Invite Required", 3000, 3); PlayerInfo[playerid][c]=3; }
case 13..16:{ GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~g~ Emergency Responders", 3000, 3); PlayerInfo[playerid][c]=4; }
case 17..104:{ GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~w~ Civilian", 3000, 3); PlayerInfo[playerid][c]=5; }
}
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
if(!IsPlayerNPC(playerid))
{
if(!PlayerInfo[playerid][Logged]) { SendClientMessage(playerid, COLOR_ERROR, "ERROR: You must login/register before spawning!"); return 0; }
else if(PlayerInfo[playerid][c]==3 && PlayerInfo[playerid][NationalGuard]==0) { SendClientMessage(playerid, COLOR_ERROR, "ERROR: You need to be invited into National Guard before spawning into it."); return 0; }
else if(PlayerInfo[playerid][c]==2 && PlayerInfo[playerid][Swat]==0) { SendClientMessage(playerid, COLOR_ERROR, "ERROR: You need to be invited into S.W.A.T before spawning into it."); return 0; }
else
{
PlayerInfo[playerid][Team] = PlayerInfo[playerid][c];
switch(PlayerInfo[playerid][Team])
{
case 0,1: //police + cia
{
SetPlayerColor(playerid, COLOR_BLUE);
if(PlayerInfo[playerid][Team] == 1) SetPlayerColor(playerid, COLOR_WHITE);
SetPlayerTeam(playerid, TEAM_POLICE);
//SetSpawnInfo(playerid, GetPlayerSkin(playerid), TEAM_POLICE, 1526.1906,-1677.9984,5.8906,267.8484, 24, 200, 29, 150, 25, 20);
SetPlayerPos(playerid, 1526.1906,-1677.9984,5.8906);
GivePlayerWeapon(playerid, 24, 200); GivePlayerWeapon(playerid, 29, 150); GivePlayerWeapon(playerid, 25, 200);
}
case 2: //swat
{
SetPlayerColor(playerid, COLOR_LIGHTBLUE);
SetPlayerTeam(playerid, TEAM_POLICE);
//SetSpawnInfo(playerid, GetPlayerSkin(playerid), TEAM_POLICE, 759.4473,-1363.1069,13.5181,265.0181, 24, 200, 31, 250, 27, 50);
SetPlayerPos(playerid, 759.4473,-1363.1069,13.5181);
GivePlayerWeapon(playerid, 24, 200); GivePlayerWeapon(playerid, 31, 250); GivePlayerWeapon(playerid, 27, 50);
}
case 3: //national guard
{
SetPlayerColor(playerid, COLOR_PURPLE);
SetPlayerTeam(playerid, TEAM_POLICE);
//SetSpawnInfo(playerid, GetPlayerSkin(playerid), TEAM_POLICE, 2749.4026,-2447.4622,13.6484,357.4269, 29, 200, 31, 250, 27, 80);
SetPlayerPos(playerid, 2749.4026,-2447.4622,13.6484);
GivePlayerWeapon(playerid, 29, 200); GivePlayerWeapon(playerid, 31, 250); GivePlayerWeapon(playerid, 27, 80);
}
case 4: //ems / fd
{
SetPlayerColor(playerid, COLOR_DARKGREEN);
SetPlayerTeam(playerid, TEAM_POLICE);
//SetSpawnInfo(playerid, GetPlayerSkin(playerid), TEAM_POLICE, 1185.4379,-1323.6609,13.5721,262.1728, 23, 200, 0, 0, 0, 0);
SetPlayerPos(playerid, 1185.4379,-1323.6609,13.5721);
GivePlayerWeapon(playerid, 23, 200);
}
case 5: //civ
{
SetPlayerColor(playerid, COLOR_WHITE);
SetPlayerTeam(playerid, playerid+10);
}
}
}
}
return 1;
}