14.02.2013, 15:46
Hey Im using the VERY-SUPER Edited version of https://sampforum.blast.hk/showthread.php?tid=45318
Im trying to find a way to save The Gang zones. For example heres the gang zone script [You cant steal it. If you do. you will have mighty errors. I've hidden some errors in it for people cant steal it
My question is. Can anyone help me by making this save the gang zones. ? My players are getting pissed about this.
Im trying to find a way to save The Gang zones. For example heres the gang zone script [You cant steal it. If you do. you will have mighty errors. I've hidden some errors in it for people cant steal it
My question is. Can anyone help me by making this save the gang zones. ? My players are getting pissed about this.
pawn Код:
SetPlayerWantedLevel( killerid, GetPlayerWantedLevel( killerid )+1 );
TeamInfo[ gTeam[killerid] ][ RivalsKilled ]++;
TeamInfo[ gTeam[playerid] ][ HomiesDied ]++;
TeamInfo[ gTeam[killerid] ][ TeamScore ]++;
TeamInfo[ gTeam[playerid] ][ TeamScore ]--;
//----------------------------- player was killed in a turf? -------------------
GetPlayerPos(playerid, x, y, z);
GetPlayerPos(killerid, x, y, z);
for (new i = 0; i < MAX_TURFS; i++)
{
if (IsPlayerInTurf(playerid, turfs[i][zMinX], turfs[i][zMinY], turfs[i][zMaxX], turfs[i][zMaxY]) &&
IsPlayerInTurf(killerid, turfs[i][zMinX], turfs[i][zMinY], turfs[i][zMaxX], turfs[i][zMaxY]) )
{
if (turfs[ i ][ TurfWarStarted ] != 1 && !IsPlayerInAnyVehicle(killerid))
{
TurfInfo[ i ][ gTeam[killerid] ][ TurfKills ]++;
if (TurfInfo[ i ][ gTeam[killerid] ][ TurfKills ] == ATTACK_KILLS)
{
if (turfs[ i ][ TurfOwner ] == gTeam[killerid]) {
for (new a=0; a<MAX_TEAMS; a++) { TurfInfo[ i ][ a ][ TurfKills ] =0; }
return 1;
}
turfs[ i ][ TurfAttacker ] = gTeam[killerid];
for (new b=0; b<SLOTS; b++)
{
if (gTeam[ b ] == turfs[ i ][ TurfAttacker ]) {
new msg1[ 256 ];
format(msg1,sizeof(msg1), "~w~We have provoked a turfwar ~w~in ~y~%s ~w~against the ~r~%s",
turfs[ i ][ turfName ], TeamInfo[ turfs[ i ][ TurfOwner ] ][ TeamName ]);
new Text:txt1 = TextDrawCreate( 200.0, 385.0, msg1 );
TextDrawFont( txt1, 0 );
TextDrawSetShadow( txt1, 0 );
TextDrawSetOutline( txt1, 1 );
TextDrawColor( txt1, 0xDFDFDFFF );
TimeTextForPlayer( b, txt1, 6000 );
GangZoneFlashForPlayer( b, turfs[ i ][turfID], COLOR_FLASH );
}
else if (gTeam[b] == turfs[ i ][ TurfOwner ]) {
new msg2[ 256 ];
format(msg2,sizeof(msg2), "~r~The ~y~%s ~r~have attacked our turf in ~y~%s!",
TeamInfo[ turfs[ i ][ TurfAttacker ] ][ TeamName ], turfs[ i ][ turfName ]);
new Text:txt2 = TextDrawCreate( 200.0, 370.0, msg2 );
TextDrawFont( txt2, 0 );
TextDrawSetShadow( txt2, 0 );
TextDrawSetOutline( txt2, 1 );
TextDrawColor( txt2, COLOR_RED );
TimeTextForPlayer( b, txt2, 6000 );
GangZoneFlashForPlayer( b, turfs[ i ][turfID], COLOR_FLASH );
}
else { GangZoneFlashForPlayer( b, turfs[ i ][turfID], COLOR_FLASH2 ); }
}
SetTimerEx("EndWar", ATTACK_TIME, false ,"iii", i, turfs[ i ][ TurfAttacker ], turfs[ i ][ TurfOwner ] );
turfs[ i ][ TurfWarStarted ] =1;
for(new c=0; c<MAX_TEAMS; c++) { TurfInfo[ i ][ c ][ TurfKills ] =0; TurfInfo[ i ][ c ][ TurfAttackKills ] =0; }
return 1;
}
}
else if (turfs[ i ][ TurfWarStarted ] == 1 && !IsPlayerInAnyVehicle(killerid) &&
(turfs[ i ][ TurfAttacker ] == gTeam[killerid]) || turfs[ i ][ TurfOwner ] == gTeam[killerid])
{
TurfInfo[ i ][ gTeam[killerid] ][ TurfAttackKills ]++;
return 1;
}
}
}