Siwus221
COD5
Wiek: 28 Na forum: 5090 dni Posty: 51
Nick w MP: HasciQ
Jak zrobic np ze mam Gan zone i na tym calym gang zone mam przejmowanie. aje ja chce zeby bylo w jednym punkcie. jak to zrobic.
Kod: foreach(Player, i)
{
if(IsPlayerInArea(i, -630.6053, 2510.743, -478.7929, 2662.556))
{
if(EnteredArea2[i] == 0) // if he hasn't entered before
{
if(gTeam[i] == TEAM_USA && CapturedBy2 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy2 == 2 || gTeam[i] == TEAM_GERMANY && CapturedBy2 == 3 || gTeam[i] == TEAM_USA && CapturedBy2 == 4)
{
SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
EnteredArea2[i] = 1;
}
else
{
EnteredArea2[i] = 1; // He has entered
SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
T2[i]= SetTimer("TakeOver",30000,0);
SendClientMessageToAll(COLOR_CON_GREEN, "The resturant is being taken over!");
}
}
}
else
{
EnteredArea2[i] = 0; // When he leaves, he's no longer in the area
KillTimer(T2[i]);
}
}
Kod: if(CapturedBy2 != 1)
{
if( IfCapture[2] == 1 ) return 1;
IfCapture[2] = 0;
dini_IntSet("/Variables/Variables.ini", "CapturedBy2", 1);
uscore++;
//SetTimer("ScoreText", 5000, 0);
SetPlayerScore(i, GetPlayerScore(i) + 2);
CapturedBy2 = 1;
if(CapturedBy != 2)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team USA have captured the resturant!");
GangZoneHideForAll(Resturant);
GangZoneShowForAll(ResturantU, COLOR_BLUE);
GangZoneHideForAll(ResturantG);
dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
CheckForLevelUpdate(i);
}
}
else if(IsPlayerInArea(i, -630.6053, 2510.743, -478.7929, 2662.556) && gTeam[i] == TEAM_GERMANY)
{
if(CapturedBy2 != 2)
{
if( IfCapture[2] == 1 ) return 1;
IfCapture[2] = 0;
dini_IntSet("/Variables/Variables.ini", "CapturedBy2", 2);
gscore++;
SetPlayerScore(i, GetPlayerScore(i) + 2);
CapturedBy2 = 2;
if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured resturant!");
GangZoneHideForAll(Resturant);
GangZoneShowForAll(ResturantG, COLOR_RED);
GangZoneHideForAll(ResturantU);
dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
CheckForLevelUpdate(i);
}
}
}