10.04.2013, 14:06
Okay, here they are:
not sure if this is all you need.
pawn Код:
#define TEAM_SOVIET 2
#define TEAM_USA 3
#define TEAM_NONE 5
pawn Код:
new UnderAttack[30] = 0;
new Captured[MAX_PLAYERS][30];
new IsPlayerCapturing[MAX_PLAYERS][30];
pawn Код:
if(Captured[playerid][SNAKE] == 0 && IsPlayerCapturing[playerid][SNAKE] == 1)
{
LeavingSnakeFarm(playerid);
}
if(Captured[playerid][BAY] == 0 && IsPlayerCapturing[playerid][BAY] == 1)
{
LeavingBay(playerid);
}
if(Captured[playerid][BIG] == 0 && IsPlayerCapturing[playerid][BIG] == 1)
{
LeavingEar(playerid);
}
if(Captured[playerid][ARMY] == 0 && IsPlayerCapturing[playerid][ARMY] == 1)
{
LeavingArmy(playerid);
}
if(Captured[playerid][PETROL] == 0 && IsPlayerCapturing[playerid][PETROL] == 1)
{
LeavingPetrol(playerid);
}
if(Captured[playerid][OIL] == 0 && IsPlayerCapturing[playerid][OIL] == 1)
{
LeavingOil(playerid);
}
if(Captured[playerid][DESERT] == 0 && IsPlayerCapturing[playerid][DESERT] == 1)
{
LeavingDesert(playerid);
}
if(Captured[playerid][QUARRY] == 0 && IsPlayerCapturing[playerid][QUARRY] == 1)
{
LeavingQuarry(playerid);
}
if(Captured[playerid][GUEST] == 0 && IsPlayerCapturing[playerid][GUEST] == 1)
{
LeavingGuest(playerid);
}
if(Captured[playerid][EAR] == 0 && IsPlayerCapturing[playerid][EAR] == 1)
{
LeavingEar(playerid);
}
pawn Код:
stock SnakeFarmCaptured(playerid)
{
Captured[playerid][SNAKE] = 1; //(SNAKE is just one of the bases this is captues, above here you can see all the names like EAR and QUARRY)
UnderAttack[SNAKE] = 0;
KillTimer(timer[playerid][SNAKE]);
TextDrawHideForPlayer(playerid, CountText[playerid]);
CountVar[playerid][SNAKE] = 25;
GivePlayerScore(playerid, 3);
GivePlayerMoney(playerid, 5000);
SendClientMessage(playerid, green,"Congratulations! You have captured \"Snake Farm\" you received +3 scores and +$5000 cash!");
PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/Captured%20success.MP3");