rendered paste body#include <a_samp>
#pragma tabsize 0
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
new worker;
new danang;
new airportman;
new richman;
new cops;
new chicken;
new medic;
new valet;
new army;
new traid;
new golf;
new pimp;
forward StopFlash();
new StopFlashCheck;
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Territory war");
print("--------------------------------------\n");
return 1;
}
#endif
public OnGameModeInit()
{
StopFlashCheck=0;
worker = GangZoneCreate(-2375.369, -194.9311, -1795.967, 365.2538);
danang = GangZoneCreate(-1868.46, 969.2637, -899.1964, 1681.614);
airportman = GangZoneCreate(-1915.71, -897.1348, -953.9012, -104.1969);
richman = GangZoneCreate(-2904.557, 736.0805, -2317.429, 1154.247);
chicken = GangZoneCreate(-2035.453, 337.6391, -1703.262, 976.7233);
cops = GangZoneCreate(-1757.34, 436.2632, -1131.585, 1024.063);
medic = GangZoneCreate(-2935.458, -210.711, -2379.232, 751.8604);
valet = GangZoneCreate(-2290.39, 826.8147, -1726.438, 1114.797);
army = GangZoneCreate(-1799.829, -127.8667, -1035.018, 424.4283);
traid = GangZoneCreate(-2352.193, 353.4189, -2004.552, 854.4294);
golf = GangZoneCreate(-2981.811, -830.0704, -1919.572, -187.0412);
pimp = GangZoneCreate(-2892.969, 1114.797, -1680.086, 1564.523);
return 1;
}
//================================GameMode Exit=================================
public OnGameModeExit()
{
GangZoneDestroy(worker);
GangZoneDestroy(danang);
GangZoneDestroy(airportman);
GangZoneDestroy(richman);
GangZoneDestroy(chicken);
GangZoneDestroy(cops);
GangZoneDestroy(medic);
GangZoneDestroy(valet);
GangZoneDestroy(army);
GangZoneDestroy(traid);
GangZoneDestroy(golf);
GangZoneDestroy(pimp);
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
return 1;
}
public OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
GangZoneShowForPlayer(playerid, worker, 0x00800096);
GangZoneShowForPlayer(playerid, danang, 0x7D000096);
GangZoneShowForPlayer(playerid, airportman, 0x28282896);
GangZoneShowForPlayer(playerid, richman, 0xFFFFC496);
GangZoneShowForPlayer(playerid, chicken, 0x00FDFD96);
GangZoneShowForPlayer(playerid, cops, 0xFF804096);
GangZoneShowForPlayer(playerid, medic, 0x5500AA96);
GangZoneShowForPlayer(playerid, valet, 0x33CCFFAA);
GangZoneShowForPlayer(playerid, army, 0x009F0096);
GangZoneShowForPlayer(playerid, traid, 0xFF00FF96);
GangZoneShowForPlayer(playerid, golf, 0xFFFF0096);
GangZoneShowForPlayer(playerid, pimp, 0x80000096);
return 1;
}
//==========================GangzoneDeath=======================================
public OnPlayerDeath(playerid, killerid, reason)
{
SetPlayerScore(killerid, GetPlayerScore(killerid) + 3);// need to change if player dies 3 times dont know how
SendDeathMessage(killerid, playerid, reason);
GangZoneFlashForAll(worker, 0xFF000080);
GangZoneFlashForAll(danang, 0xFF000080);
GangZoneFlashForAll(airportman, 0xFF000080);
GangZoneFlashForAll(richman, 0xFF000080);
GangZoneFlashForAll(chicken, 0xFF000080);
GangZoneFlashForAll(cops, 0xFF000080);
GangZoneFlashForAll(medic, 0xFF000080);
GangZoneFlashForAll(valet, 0xFF000080);
GangZoneFlashForAll(army, 0xFF000080);
GangZoneFlashForAll(traid, 0xFF000080);
GangZoneFlashForAll(golf, 0xFF000080);
GangZoneFlashForAll(pimp, 0xFF000080);
if(StopFlashCheck==0)
{
SetTimer("StopFlash",300000,0);
StopFlashCheck=1;
}
return 1;
}
public StopFlash()
{
StopFlashCheck=0;
GangZoneStopFlashForAll(worker);
GangZoneStopFlashForAll(danang);
GangZoneStopFlashForAll(airportman);
GangZoneStopFlashForAll(richman);
GangZoneStopFlashForAll(chicken);
GangZoneStopFlashForAll(cops);
GangZoneStopFlashForAll(medic);
GangZoneStopFlashForAll(valet);
GangZoneStopFlashForAll(army);
GangZoneStopFlashForAll(traid);
GangZoneStopFlashForAll(golf);
GangZoneStopFlashForAll(pimp);
return 1;
}