21.06.2012, 13:42
Guys i Finally Did This. But i am not getting It. It is showing too many times that > " wait in zone 30 sec. wait in zone 30 sec. wait in zone 30 sec." And after 30 sec. It is too many time giving Scores. What the problem.
And when i left the pickup the checkpoint was not disappearing...
And when i left the pickup the checkpoint was not disappearing...
pawn Код:
new breifcase6;
new gangzone5;
public OnGameModeInit()
{
gangzone5 = GangZoneCreate(-392.1586, 1499.8591, -263.7490, 1630.3291);
breifcase6 = CreatePickup(1210, 23, -316.7369, 1594.6285, 75.6609, -1);
return;1
}
public OnPlayerSpawn(playerid)
{
SetPlayerMapIcon(playerid,0,-316.7369,1594.6285,75.6609,53,19,2);
return;1
}
public OnPlayerEnterCheckpoint(playerid)
{
if(Checkpoint[playerid] == 1)
{
timer[playerid] = SetTimerEx("SetZone",30000,false,"i",playerid);
SendClientMessage(playerid,RED,"Wait For 30 Sec. Don't leave Marker or Capturing will be Failed");
}
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 ");
DisablePlayerCheckpoint(playerid);
SetGangZone(playerid);
return 1;
}
forward SetGangZone(playerid);
public SetGangZone(playerid)
{
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 Germany",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;
}
public OnPlayerLeaveCheckpoint(playerid)
{
KillTimer(timer[playerid]);
SendClientMessage(playerid,RED,"Capturing Zone Failed You have Left the Marker. ");
DisablePlayerCheckpoint(playerid);
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == breifcase5)
{
ShowPlayerDialog(playerid, 2345, DIALOG_STYLE_LIST, "UDC Base Breifcase Menu", "Health {$2000}\nArmour {$2500}\nDesert Eagle {$3000}\nShotgun {$5000}\nSawn-Off Shotgun {$9000}\nCombat Shotgun {$10000}\nMicro SMG {$3000}\nMP5 {$4000}\nM4 {$6000}\nCountry Rifle {$6500}\nSniper Rifle {$7000}", "Purchase", "Cancel");
return 1;
}
if(pickupid == breifcase6)
{
Checkpoint[playerid] = 1;
SetPlayerCheckpoint(playerid, -316.7369,1594.6285,75.6609,13.9541);
return 1;
}
}