GTAvision.com - Forum - Grand Theft Auto News, Downloads, Community and more...

Position: Grand Theft Auto: San Andreas » Multiplayer » Gangwar startet nicht » Druckansicht
G4M3R, 18.07.2009, 15:26
hi,
ich habe ein problem und zwar wenn ich einen spieler kille, müsste normalerweiße nach 3 kills ein
gangwar starten, und dann nach weiteren 3 kills die zone eingenommen sein.. aber es startet nicht
einmal der gangwar.. habe es schon wirklich viel umgestellt, z.b habe ich die zone sofort definiert
zb zone 4 und gangid 4 aber es will einfach nicht gehen..
wo liegt der fehler?!

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
public OnPlayerDeath(playerid, killerid, reason)
{
...
if(playerGang[killerid] != playerGang[playerid])
   {
    new Float:x, Float:y, Float:z;      GetPlayerPos(playerid,x,y,z);
   for(new zone = 0; zone < MAX_ZONES; zone++)
   {
   if(x >= ZoneInfo[zone][zPosition][0] && x < ZoneInfo[zone][zPosition][2] && y >= ZoneInfo[zone][z
Position][1] && y < ZoneInfo[zone][zPosition][3])
    {
    //  der spieler tötet in seiner zone
    if(ZoneInfo[zone][zTeamid] == playerGang[killerid] )
    {
   if(ZoneInfo[zone][GangWarInProgress] == 1)
   {
   if(playerGang[killerid] == ZoneInfo[zone][ZoneAttackers]) Gangs[playerGang[killerid]][DefendCount
]++;
   if(Gangs[playerGang[killerid]][DefendCount] == GANGAREA_DEFEND )
   {

   GetPlayerName(killerid, playername, sizeof(playername));
   SendClientMessageToAll(COLOR_RED," ");
   format(string, sizeof(string), "*** GangZone Message: %s von %s hat seine Gangzone von %s verteid
igt!", playername,Gangs[playerGang[killerid]][gName], Gangs[playerGang[playerid]][gName] );
    SendClientMessageToAll(GetPlayerColor(killerid), string);
   SendClientMessageToAll(COLOR_RED," ");

   GangZoneStopFlashForAll(zone);
   GangZoneHideForAll(zone);
   GangZoneShowForAll(zone, GetPlayerColor(killerid));

   Gangs[playerGang[killerid]][UnderAttackCount] = 0;
   Gangs[playerGang[playerid]][UnderAttackCount] = 0;
    Gangs[playerGang[killerid]][DefendCount] = 0;
   ZoneInfo[zone][GangWarInProgress] = 0;
   ZoneInfo[zone][ZoneAttackers] = -1;

   ZoneInfo[zone][zColor] = GetPlayerColor(killerid);
   // neuer zone owner
   strmid(ZoneInfo[zone][zGangname], Gangs[playerGang[killerid]][gName], 0, strlen(Gangs[playerGang[
killerid]][gName]), MAX_PLAYER_NAME);
   ZoneInfo[zone][zTeamid] = playerGang[killerid];

   SaveZones();

   KillTimer(GangWarTimer[zone]);
   }
   }
   }
   // der spieler stirbt in seiner zone
   else if(ZoneInfo[zone][zTeamid] == playerGang[playerid])
   {
   Gangs[playerGang[playerid]][UnderAttackCount]++;
   // gangwar startet
   if(Gangs[playerGang[playerid]][UnderAttackCount] == GANGAREA_WARNINGS)
   {
   GetPlayerName(killerid, playername, sizeof(playername));
   SendClientMessageToAll(COLOR_RED," ");
   format(string, sizeof(string), "*** GangZone Message: %s von %s hat einen Gangwar mit %s gestarte
t!", playername,Gangs[playerGang[killerid]][gName], Gangs[playerGang[playerid]][gName] );
    SendClientMessageToAll(GetPlayerColor(killerid), string);
    SendClientMessageToAll(COLOR_RED," ");
    GangZoneFlashForAll(zone, GetPlayerColor(killerid) );
     ZoneInfo[zone][GangWarInProgress] = 1;
     ZoneInfo[zone][ZoneAttackers] = playerGang[killerid];
     // nach keinem angriff wird der gangwar beendet
   GangWarTimer[zone] = SetTimerEx("EndGangWar",GANGWAR_LENGTH,false,"iii",zone, playerGang[killerid
], playerGang[playerid] );
   return 1;
   }

   // gangzone einnehmen
   if((Gangs[playerGang[playerid]][UnderAttackCount] == GANGAREA_TAKE) && (ZoneInfo[zone][ZoneAttack
ers] == playerGang[killerid]) )
   {

   GetPlayerName(killerid, playername, sizeof(playername));
   SendClientMessageToAll(COLOR_RED," ");
   format(string, sizeof(string), "*** GangZone Message: %s von %s hat die Gangzone von %s eingenomm
en", playername,Gangs[playerGang[killerid]][gName], Gangs[playerGang[playerid]][gName]);
   SendClientMessageToAll(GetPlayerColor(killerid), string);
   SendClientMessageToAll(COLOR_RED," ");
   format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~n~ %s hat die gangzone von ~n~ %s eingen
ommen",Gangs[playerGang[killerid]][gName], Gangs[playerGang[playerid]][gName] );
   GameTextForAll(string,3000,3);

   if( GangWarTimer[zone] ) KillTimer( GangWarTimer[zone] );

   GangZoneStopFlashForAll( zone );
   GangZoneHideForAll( zone );
   GangZoneShowForAll( zone, GetPlayerColor(killerid) );

   Gangs[playerGang[killerid]][UnderAttackCount] = 0;
   Gangs[playerGang[playerid]][UnderAttackCount] = 0;

   ZoneInfo[zone][zColor] = GetPlayerColor(killerid);
   // den neuen zoneowner speichern
   strmid(ZoneInfo[zone][zGangname], Gangs[playerGang[killerid]][gName], 0, strlen(Gangs[playerGang[
killerid]][gName]), MAX_PLAYER_NAME);
   ZoneInfo[zone][zTeamid] = playerGang[killerid];

   SaveZones();
   }
   }
   }
   }
   return 1;
   }



wenn ihr mehr informationen braucht, zb die variablen dann sagt es bitte..
hoffentlich kann mir einer helfen.
GTAvision.com :: Forumregeln :: FAQ :: Impressum :: Kontakt :: RDRvision.com :: LANOIREvision.com :: MaxPayneVision.com
NetVisionWork.NET
.: © 2006-2014 by GTAvision.com :.

Rockstar GamesTake-Two Interactive Deutschland

Free Grand Theft Auto Downloads