21.06.2012, 07:04
Guys I Did This:
But it is only showing one checkpoint of gangzone5. it is now showing GasStation2 CheckPoint. please FiX it. i shall be very thanks full to you
pawn Код:
#include <a_samp>
#define TEAM_PAKISTAN 0
#define TEAM_GERMANY 1
#define TEAM_USA 2
#define TEAM_RUSSIA 3
#define TEAM_INDIA 4
#define YELLOWA 0xFFFF00AA
#define GREENA 0x008000AA
#define BLUEA 0x0080FFAA
#define REDA 0xFF0000AA
#define ORANGEA 0xFF8000AA
#define RED 0xFF0000FF
#define GREEN 0x008000FF
new gTeam[MAX_PLAYERS];
new timer[MAX_PLAYERS];
#pragma tabsize 0
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Capture Zones By Zohan ");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#endif
new Checkpoint[MAX_PLAYERS];
new gangzone5;
new GasStation2;
public OnGameModeInit()
{
gangzone5 = GangZoneCreate(-392.1586, 1499.8591, -263.7490, 1630.3291);
GasStation2 = GangZoneCreate(521.7093, 1616.373, 677.9031, 1798.172);
return 1;
}
public OnPlayerSpawn(playerid)
{
Checkpoint[playerid] = 2;
SetPlayerCheckpoint(playerid, 611.5208, 1689.866, 15, 5);
Checkpoint[playerid] = 1;
SetPlayerCheckpoint(playerid, -316.7369,1594.6285,75.6609,13.9541);
SetPlayerMapIcon(playerid,0,-316.7369,1594.6285,75.6609,53,19,2);
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
if(Checkpoint[playerid] == 2)
{
SendClientMessage(playerid,RED,"Wait For 30 Sec. Don't leave Marker or Capturing will be Failed");
timer[playerid] = SetTimerEx("SetZone",30000,false,"i",playerid);
}
if(Checkpoint[playerid] == 1)
{
SendClientMessage(playerid,RED,"Wait For 30 Sec. Don't leave Marker or Capturing will be Failed");
timer[playerid] = SetTimerEx("SetZone",30000,false,"i",playerid);
}
return 1;
}
forward SetZone(playerid);
public SetZone(playerid)
{
SetPlayerScore(playerid, GetPlayerScore(playerid) + 3);
GivePlayerMoney(playerid,3000);
SendClientMessage(playerid,GREEN,"Congratulation! You have Gained 3 Scores & 3000$ Money ");
SetGangZone(playerid);
return 1;
}
forward SetGangZone(playerid);
public SetGangZone(playerid)
{
if(gTeam[playerid] == TEAM_PAKISTAN)
{
GangZoneShowForAll(GasStation2,GREENA);
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"Server News: %s has captured GasStation For Pakistan",pName);
SendClientMessageToAll(0x008000AA,string);
}
if(gTeam[playerid] == TEAM_GERMANY)
{
GangZoneShowForAll(GasStation2,ORANGEA);
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"Server News: %s has captured GasStation For Pakistan",pName);
SendClientMessageToAll(0x008000AA,string);
}
if(gTeam[playerid] == TEAM_USA)
{
GangZoneShowForAll(GasStation2,BLUEA);
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"Server News: %s has captured GasStation For USA",pName);
SendClientMessageToAll(0x008000AA,string);
}
if(gTeam[playerid] == TEAM_RUSSIA)
{
GangZoneShowForAll(GasStation2,REDA);
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"Server News: %s has captured GasStation For RUSSIA",pName);
SendClientMessageToAll(0x008000AA,string);
}
if(gTeam[playerid] == TEAM_INDIA)
{
GangZoneShowForAll(GasStation2,YELLOWA);
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"Server News: %s has captured GasStation For INDIA",pName);
SendClientMessageToAll(0x008000AA,string);
}
if(gTeam[playerid] == TEAM_PAKISTAN)
{
GangZoneShowForAll(gangzone5,GREENA);
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"Server News: %s has captured Satellite For Pakistan",pName);
SendClientMessageToAll(0x008000AA,string);
}
if(gTeam[playerid] == TEAM_GERMANY)
{
GangZoneShowForAll(gangzone5,ORANGEA);
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"Server News: %s has captured Satellite For Pakistan",pName);
SendClientMessageToAll(0x008000AA,string);
}
if(gTeam[playerid] == TEAM_USA)
{
GangZoneShowForAll(gangzone5,BLUEA);
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"Server News: %s has captured Satellite For USA",pName);
SendClientMessageToAll(0x008000AA,string);
}
if(gTeam[playerid] == TEAM_RUSSIA)
{
GangZoneShowForAll(gangzone5,REDA);
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"Server News: %s has captured Satellite For RUSSIA",pName);
SendClientMessageToAll(0x008000AA,string);
}
if(gTeam[playerid] == TEAM_INDIA)
{
GangZoneShowForAll(gangzone5,YELLOWA);
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"Server News: %s has captured Satellite For INDIA",pName);
SendClientMessageToAll(0x008000AA,string);
}
return 1;
}
![Smiley](images/smilies/smile.png)