24.06.2010, 19:15
Ok...
In top of you script
...and...
i not tested..
In top of you script
pawn Код:
new PlantTimer;
new Second=30;
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
if(GetPlayerTeam(playerid) == TEAM_HOODIES)
{
new string[256], playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
format(string, sizeof(string), "%s is stealing money. It takes to take 10 seconds.", playername);
TextDrawSetString(text3, string);
TextDrawHideForAll(text4);
TextDrawShowForAll(text3);
SetTimer("Destroy3", 2000, false);
man[playerid] = 1;
PlantTimer = SetTimer("Planted", 10000, false);
}
return 1;
}
public OnPlayerLeaveCheckpoint(playerid)
{
if(GetPlayerTeam(playerid) == TEAM_HOODIES)
{
new string[256], playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
format(string, sizeof(string), "%s has quit stealing money.", playername);
KillTimer(PlantTimer);
TextDrawSetString(text4, string);
TextDrawHideForAll(text3);
TextDrawShowForAll(text4);
SetTimer("Destroy4", 2000, false);
man[playerid] = 0;
Second=30;
}
return 1;
}
forward Planted();
public Planted()
{
Second--;
if(Second < 1)
{
KillTimer(PlantTimer);
format(string, sizeof(string), "Money was succesfully delivered.", timedeliver);
TextDrawSetString(text19, string);
TextDrawShowForAll(text19);
SetTimer("AttackWin", 2000, false);
}
else
{
new string[256];
format(string, sizeof(string), "%i seconds until money is delivered.", timedeliver);
TextDrawSetString(text19, string);
TextDrawShowForAll(text19);
}
}