Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2012-08-24, 02:29


Siwus221

COD5






Wiek: 28
Na forum: 5090 dni
Posty: 51
Nick w MP: HasciQ



Respekt: 50

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);
}
}
}


Podpis


http://epicfreeprizes.com/?ref=764351
Akliknij a zobaczysz co mozesz zyskac
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-08-25, 01:37


LogitechSC







Wiek: 31
Na forum: 6539 dni
Posty: 13

Piwa: 371

Respekt: 51

Ostrzeżeń: 20%
Zamie? funkcj? IsPlayerInArea na PlayerToPoint, zdefiniuj miejsce i zasi?g.

Podpis
Postaw piwo autorowi tego posta
 

 
Tagi: przejmowanie :: punkcie
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » PAWN » [INNE] przejmowanie w punkcie Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku