pawn Код:
// ------------- Classes -----------------
AddPlayerClassEx(TEAM_RICHS,295,-2665.7739,937.6157,79.7101,180.0000,27,200,31,250,24,80); // Rich Spawn
AddPlayerClassEx(TEAM_PIMPS,296,-2654.5393,1387.2876,7.1529,270.0000,26,150,29,300,18,5); // Pimps Spawn
AddPlayerClassEx(TEAM_SWATS,285,-1635.9564,664.8169,7.1875,270.0000,25,300,31,250,29,200); // Swat Spawn
AddPlayerClassEx(TEAM_VALETS,189,-1762.6379,963.7999,29.0625,177.6099,26,90,32,250,18,5); // Valet Spawn
public OnPlayerRequestClass(playerid, classid)
{
if(classid == 0) //Richs
{
SetPlayerPos(playerid, -2680.142089, 929.528137, 79.703125);
SetPlayerCameraPos(playerid, -2680.077636, 932.527465, 79.703125);
SetPlayerCameraLookAt(playerid, -2680.142089, 929.528137, 79.703125);
SetPlayerFacingAngle(playerid, 358.770294);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
//-------------------------------------------
GameTextForPlayer(playerid,"~h~~y~Ricos",5000,3);
Team[playerid] = TEAM_RICHS;
}
if(classid == 1) //Pimps
{
SetPlayerPos(playerid, -2650.652099, 1383.026000, 7.187383);
SetPlayerCameraPos(playerid, -2652.437500, 1385.436889, 7.187383);
SetPlayerCameraLookAt(playerid, -2650.652099, 1383.026000, 7.187383);
SetPlayerFacingAngle(playerid, 36.522495);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
//-------------------------------------------
GameTextForPlayer(playerid,"~r~Cafetoes",5000,3);
Team[playerid] = TEAM_PIMPS;
}
if(classid == 2) //Swats
{
SetPlayerPos(playerid, -1628.724853, 664.843383, 7.187500);
SetPlayerCameraPos(playerid, -1631.720336, 665.007385, 7.187500);
SetPlayerCameraLookAt(playerid, -1628.724853, 664.843383, 7.187500);
SetPlayerFacingAngle(playerid, 86.866638);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
//-------------------------------------------
GameTextForPlayer(playerid,"~g~Swats",5000,3);
Team[playerid] = TEAM_SWATS;
}
if(classid == 3) //Valets
{
SetPlayerPos(playerid, -1727.078002, 940.967834, 24.890625);
SetPlayerCameraPos(playerid, -1729.868896, 939.867370, 24.890625);
SetPlayerCameraLookAt(playerid, -1727.078002, 940.967834, 24.890625);
SetPlayerFacingAngle(playerid, 111.519554);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
//-------------------------------------------
GameTextForPlayer(playerid,"~h~~b~Manobristas",5000,3);
Team[playerid] = TEAM_VALETS;
}
return 1;
}
public OnPlayerSpawn(playerid)
{
switch(Team[playerid])
{
case TEAM_RICHS:
{
SetPlayerPos(playerid,-2665.7739,937.6157,79.7101);
GivePlayerWeapon(playerid,16,5);
SetPlayerColor(playerid,COLOR_RICH);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
Team[playerid] = TEAM_RICHS;
}
case TEAM_PIMPS:
{
SetPlayerPos(playerid,-2654.5393,1387.2876,7.1529);
GivePlayerWeapon(playerid,14,1);
SetPlayerColor(playerid,COLOR_PIMP);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
Team[playerid] = TEAM_PIMPS;
}
case TEAM_SWATS:
{
SetPlayerPos(playerid,-1635.9564,664.8169,7.1875);
GivePlayerWeapon(playerid,16,5);
SetPlayerColor(playerid,COLOR_SWAT);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
Team[playerid] = TEAM_SWATS;
}
case TEAM_VALETS:
{
SetPlayerPos(playerid,-1762.6379,963.7999,29.0625);
GivePlayerWeapon(playerid,22,50);
SetPlayerColor(playerid,COLOR_VALET);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
Team[playerid] = TEAM_VALETS;
}
}
return 1;
}