07.07.2011, 17:25
pawn Код:
forward Deliver(playerid);
public Deliver(playerid)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
if(gTeam[playerid] == TEAM_DEFENDERS)
{
GameTextForPlayer(playerid, "~g~ Mission Completed", 6000, 4);
GivePlayerMoney(playerid, 3000);
SetPlayerScore(playerid,GetPlayerScore(playerid)+3);
SetTimer("Finshed", 6000, 0);
SetPlayerCameraPos(playerid, 2576.2761,2265.6660,13.8203);
SetPlayerCameraLookAt(playerid, 2581.9424,2271.2832,11.9809);
}
else if(gTeam[playerid] == TEAM_ATTACKERS)
{
GameTextForPlayer(playerid, "~r~ Mission Failed", 6000, 4);
SetPlayerCameraPos(playerid, 2576.2761,2265.6660,13.8203);
SetPlayerCameraLookAt(playerid, 2581.9424,2271.2832,11.9809);
SetTimer("Finsh",6000,false);
}
SetTimer("Finsh",6000,false);
}
}
return 1;
}