В самый верх мода, ко всем new
Code
new startturf[MAX_PLAYERS];
new gangzone1;
В public OnGameModeInit
Code
gangzone1 = GangZoneCreate(2337.898, -2724.066, 2874.097, -2309.553);
В public OnPlayerConnect
Code
GangZoneShowForPlayer(playerid, gangzone1, 0xFF450096);
В public OnPlayerDisconnect
Code
GangZoneHideForPlayer(playerid, gangzone1);
В public OnPlayerDeath
Code
if(gTeam[killerid] != gTeam[playerid] && INVALID_PLAYER_ID != killerid && gTeam[killerid] == TEAM1)
{
startturf[killerid]++;
startturf[playerid] = 0;
if(startturf[killerid] == 4)
{
new pname[MAX_PLAYER_NAME],str[256];
GetPlayerName(killerid,pname,sizeof(pname));
format(str,sizeof(str),"%s(%d) атакует территорию",pname,killerid);
SendClientMessageToAll(0xFF0000AA,str);
GangZoneFlashForAll(gangzone1,GetPlayerColor(killerid));
}
if(startturf[killerid] == 8)
{
new pname[MAX_PLAYER_NAME],str[256];
GetPlayerName(killerid,pname,sizeof(pname));
format(str,sizeof(str),"%s(%d) успешно захватил территорию",pname,killerid);
SendClientMessageToAll(0xFF0000AA,str);
GangZoneStopFlashForAll(gangzone1);
GangZoneShowForAll(gangzone1,GetPlayerColor(killerid));
startturf[killerid] = 0;
}
}
Обязательно замените TEAM1 на вашу команду.
Автор: [S]ilverbac[k]