leia PM denovo, lhe mandei o cуdigo e postarei-o aqui
pawn Код:
public OnPlayerSpawn(playerid)
{
if(PlayerTeam[playerid] == 0)
{
HumanTeam(playerid);
SetPlayerTeam(playerid,0);
}
else if(PlayerTeam[playerid] == 1)
{
ZombieTeam(playerid);
SetPlayerTeam(playerid,1);
}
switch(Arena[ID])
{
case 0:
{
if(PlayerTeam[playerid] == 0)
{
SetPlayerPos(playerid,252.0799,-2108.2781,5.7310);
SetPlayerFacingAngle(playerid,174.1782);
SetPlayerInterior(playerid,0);
}
if(PlayerTeam[playerid] == 1)
{
SetPlayerPos(playerid,252.0799,-2108.2781,5.7310);
SetPlayerFacingAngle(playerid,174.1782);
SetPlayerInterior(playerid,0);
}
}
case 1:
{
if(PlayerTeam[playerid] == 0)
{
SetPlayerPos(playerid,-2119.3274,1019.3015,96.9453);
SetPlayerFacingAngle(playerid,176.1283);
SetPlayerInterior(playerid,0);
}
if(PlayerTeam[playerid] == 1)
{
SetPlayerPos(playerid,-2119.3274,1019.3015,96.9453);
SetPlayerFacingAngle(playerid,176.1283);
SetPlayerInterior(playerid,0);
}
}
case 2:
{
if(PlayerTeam[playerid] == 0)
{
SetPlayerPos(playerid,1728.3430,-1328.7496,13.5859);
SetPlayerFacingAngle(playerid,231.1306);
SetPlayerInterior(playerid,0);
}
if(PlayerTeam[playerid] == 1)
{
SetPlayerPos(playerid,1728.3430,-1328.7496,13.5859);
SetPlayerFacingAngle(playerid,231.1306);
SetPlayerInterior(playerid,0);
}
}
case 3:
{
if(PlayerTeam[playerid] == 0)
{
SetPlayerPos(playerid,1801.1047,-2991.1992,6.1988);
SetPlayerFacingAngle(playerid,183.9618);
SetPlayerInterior(playerid,0);
}
if(PlayerTeam[playerid] == 1)
{
SetPlayerPos(playerid,1801.1047,-2991.1992,6.1988);
SetPlayerFacingAngle(playerid,183.9618);
SetPlayerInterior(playerid,0);
}
}
}
return 1;
}
public OnPlayerDeath(playerid)
{
if(PlayerTeam[playerid] == 0)
{
Arena[ZombiesKills] ++;
}
else if(PlayerTeam[playerid] == 1)
{
Arena[HumansKills] ++;
}
switch(Arena[ZombiesKills])
{
case 5: SendClientMessageToAll(COLOR_GREEN,"ZOMBIES TEAM'S SCORE: 5");
case 10: SendClientMessageToAll(COLOR_GREEN,"ZOMBIES TEAM'S SCORE: 10");
case 15: SendClientMessageToAll(COLOR_GREEN,"ZOMBIES TEAM'S SCORE: 15");
case 20: SendClientMessageToAll(COLOR_GREEN,"ZOMBIES TEAM'S SCORE: 20");
case 25: SendClientMessageToAll(COLOR_GREEN,"ZOMBIES TEAM'S SCORE: 25");
case 30: SendClientMessageToAll(COLOR_GREEN,"ZOMBIES TEAM'S SCORE: 30");
case 35: SendClientMessageToAll(COLOR_GREEN,"ZOMBIES TEAM'S SCORE: 35");
case 40: SendClientMessageToAll(COLOR_GREEN,"ZOMBIES TEAM'S SCORE: 40");
case 45: SendClientMessageToAll(COLOR_GREEN,"ZOMBIES TEAM'S SCORE: 45");
case 50:
{
SendClientMessageToAll(COLOR_GREEN,"ZOMBIES TEAM'S SCORE: 50");
AnnounceWinner();
}
}
switch(Arena[HumansKills])
{
case 5: SendClientMessageToAll(COLOR_GREEN,"HUMANS TEAM'S SCORE: 5");
case 10: SendClientMessageToAll(COLOR_GREEN,"HUMANS TEAM'S SCORE: 10");
case 15: SendClientMessageToAll(COLOR_GREEN,"HUMANS TEAM'S SCORE: 15");
case 20: SendClientMessageToAll(COLOR_GREEN,"HUMANS TEAM'S SCORE: 20");
case 25: SendClientMessageToAll(COLOR_GREEN,"HUMANS TEAM'S SCORE: 25");
case 30: SendClientMessageToAll(COLOR_GREEN,"HUMANS TEAM'S SCORE: 30");
case 35: SendClientMessageToAll(COLOR_GREEN,"HUMANS TEAM'S SCORE: 35");
case 40: SendClientMessageToAll(COLOR_GREEN,"HUMANS TEAM'S SCORE: 40");
case 45: SendClientMessageToAll(COLOR_GREEN,"HUMANS TEAM'S SCORE: 45");
case 50:
{
SendClientMessageToAll(COLOR_GREEN,"HUMANS TEAM'S SCORE: 50");
AnnounceWinner();
}
}
return 1;
}
public OnPlayerRequestClass(playerid,classid)
{
SetPlayerPos(playerid,299.9177,2741.7598,42.9127);
SetPlayerFacingAngle(playerid,198.9686);
SetPlayerCameraPos(playerid,306.3498,2727.6697,37.0493);
SetPlayerCameraLookAt(playerid,299.9177,2741.7598,42.9127);
if(classid == 0)
{
PlayerTeam[playerid] = 0;
SetPlayerTeam(playerid,0);
}
else if(classid == 1)
{
PlayerTeam[playerid] = 1;
SetPlayerTeam(playerid,1);
}
return 1;
}
pawn Код:
stock HumanTeam(playerid)
{
SendClientMessage(playerid,COLOR_HUMAN,"Save the society!");
GivePlayerWeapon(playerid,WEAPON1_HUMAN,9999);
GivePlayerWeapon(playerid,WEAPON2_HUMAN,9999);
GivePlayerWeapon(playerid,WEAPON3_HUMAN,9999);
SetPlayerColor(playerid,COLOR_HUMAN);
SetPlayerTeam(playerid,0);
SetPlayerArmour(playerid,100);
SetPlayerSkin(playerid,285);
}
stock ZombieTeam(playerid)
{
ResetPlayerWeapons(playerid);
SetPlayerArmour(playerid,0);
SetPlayerSkin(playerid,162);
SendClientMessage(playerid,COLOR_ZOMBIE,"Eat some brains!");
GivePlayerWeapon(playerid,WEAPON1_ZOMBIE,9999);
GivePlayerWeapon(playerid,WEAPON2_ZOMBIE,9999);
GivePlayerWeapon(playerid,WEAPON3_ZOMBIE,9999);
SetPlayerColor(playerid,COLOR_ZOMBIE);
SetPlayerTeam(playerid,1);
SetPlayerHealth(playerid,150);
TogglePlayerControllable(playerid,1);
}
pawn Код:
enum aInfo
{
HumansCount,
ZombiesCount,
HumansKills,
ZombiesKills,
ID
};
enum pInfo
{
TotalCount,
Team
};
new Arena[aInfo];
new PlayerCount;
new PlayerTeam[MAX_PLAYERS];
new Text[256];
new Float:OldHP[MAX_PLAYERS];