if( PaintType[ killerid ] != 0 && PaintType[ playerid ] != 0 ) { PKills[ killerid ] ++; PDeaths[ playerid ] ++; SCMf( killerid, COLOR_CLIENT, "L-ai omorat pe %s cu un %s de la distanta de %0.2fm.", GetName( playerid ), weapName( reason ), GetDistanceBetweenPlayers( playerid, killerid ) ); SCMf( playerid, COLOR_CLIENT, "Ai fost omorat de %s cu un %s de la distande de %0.2fm.", GetName( killerid ), weapName( reason ), GetDistanceBetweenPlayers( playerid, killerid ) ); if( PaintType[ killerid ] == 3 && PaintType[ playerid ] == 3 ) { if( GetPaintLevel( playerid ) == 8 ) { Line 555 foreach( new x : Player ) { if( PaintType[ x ] == PaintType[ killerid ] ) { for( new i = 0; i < 5; i++ ) SendDeathMessageToPlayer( x, 1001, 1001, 200 ); SendPaintballMessage( PaintType[ x ] - 1, COLOR_YELLOW, "* %s a castigat runda deoarece a omorat pe %s cu un cutit.", GetName( killerid ), GetName( playerid ) ); SpawnPlayer( x ); PKills[ x ] = 0; PDeaths[ x ] = 0; PaintTime[ PaintType[ killerid ] - 1 ] = -2; PaintballWinner[ PaintType[ killerid ] - 1 ] = x; PaintballWinnerScore[ PaintType[ killerid ] - 1 ] = 0; } } } else GiveSkillWeapon( killerid ); if( PaintTime[ PaintType[ killerid ] - 1 ] == -2 ) { if( PaintTimer[ PaintType[ killerid ] - 1 ] != 0 ) KillTimer( PaintTimer[ PaintType[ killerid ] - 1 ] ), PaintTimer[ PaintType[ killerid ] - 1 ] = 0; PaintTime[ PaintType[ killerid ] - 1 ] = -1; PaintText[ PaintType[ killerid ] - 1 ] = 60; PaintVote[ PaintType[ killerid ] - 1 ] = 1; PaintTimer[ PaintType[ killerid ] - 1 ] = SetTimerEx( "CalculateVote", 60000, false, "d", PaintType[ killerid ] - 1 ); SendPaintballMessage( PaintType[ killerid ], COLOR_YELLOW, "Runda va incepe peste un minute. Pentru a vote o mapa, folositi comanda [/votemap]." ); } } foreach( new x : Player ) { if( PaintType[ x ] == PaintType[ playerid ] ) SendDeathMessageToPlayer( x, killerid, playerid, reason ); } if( PKills[ killerid ] - PDeaths[ killerid ] > PaintballWinnerScore[ PaintType[ killerid ] - 1 ] ) PaintballWinner[ PaintType[ killerid ] - 1 ] = killerid, PaintballWinnerScore[ PaintType[ killerid ] - 1 ] = PlayerPaintballScore[ killerid ];
warning 219: local variable "x" shadows a variable at a preceding level (Line 555) error 017: undefined symbol "Player" (Line 555) error 017: undefined symbol "Player" (Line 555) warning 215: expression has no effect (Line 555) error 001: expected token: ";", but found "]" (Line 555) fatal error 107: too many error messages on one line (Line 555)
Code
Код:
if( PaintType[ killerid ] != 0 && PaintType[ playerid ] != 0 ) { PKills[ killerid ] ++; PDeaths[ playerid ] ++; SCMf( killerid, COLOR_CLIENT, "L-ai omorat pe %s cu un %s de la distanta de %0.2fm.", GetName( playerid ), weapName( reason ), GetDistanceBetweenPlayers( playerid, killerid ) ); SCMf( playerid, COLOR_CLIENT, "Ai fost omorat de %s cu un %s de la distande de %0.2fm.", GetName( killerid ), weapName( reason ), GetDistanceBetweenPlayers( playerid, killerid ) ); if( PaintType[ killerid ] == 3 && PaintType[ playerid ] == 3 ) { if( GetPaintLevel( playerid ) == 8 ) { Line 555 foreach( new x : Player ) { if( PaintType[ x ] == PaintType[ killerid ] ) { for( new i = 0; i < 5; i++ ) SendDeathMessageToPlayer( x, 1001, 1001, 200 ); SendPaintballMessage( PaintType[ x ] - 1, COLOR_YELLOW, "* %s a castigat runda deoarece a omorat pe %s cu un cutit.", GetName( killerid ), GetName( playerid ) ); SpawnPlayer( x ); PKills[ x ] = 0; PDeaths[ x ] = 0; PaintTime[ PaintType[ killerid ] - 1 ] = -2; PaintballWinner[ PaintType[ killerid ] - 1 ] = x; PaintballWinnerScore[ PaintType[ killerid ] - 1 ] = 0; } } } else GiveSkillWeapon( killerid ); if( PaintTime[ PaintType[ killerid ] - 1 ] == -2 ) { if( PaintTimer[ PaintType[ killerid ] - 1 ] != 0 ) KillTimer( PaintTimer[ PaintType[ killerid ] - 1 ] ), PaintTimer[ PaintType[ killerid ] - 1 ] = 0; PaintTime[ PaintType[ killerid ] - 1 ] = -1; PaintText[ PaintType[ killerid ] - 1 ] = 60; PaintVote[ PaintType[ killerid ] - 1 ] = 1; PaintTimer[ PaintType[ killerid ] - 1 ] = SetTimerEx( "CalculateVote", 60000, false, "d", PaintType[ killerid ] - 1 ); SendPaintballMessage( PaintType[ killerid ], COLOR_YELLOW, "Runda va incepe peste un minute. Pentru a vote o mapa, folositi comanda [/votemap]." ); } } foreach( new x : Player ) { if( PaintType[ x ] == PaintType[ playerid ] ) SendDeathMessageToPlayer( x, killerid, playerid, reason ); } if( PKills[ killerid ] - PDeaths[ killerid ] > PaintballWinnerScore[ PaintType[ killerid ] - 1 ] ) PaintballWinner[ PaintType[ killerid ] - 1 ] = killerid, PaintballWinnerScore[ PaintType[ killerid ] - 1 ] = PlayerPaintballScore[ killerid ]; Код:
warning 219: local variable "x" shadows a variable at a preceding level (Line 555) error 017: undefined symbol "Player" (Line 555) error 017: undefined symbol "Player" (Line 555) warning 215: expression has no effect (Line 555) error 001: expected token: ";", but found "]" (Line 555) fatal error 107: too many error messages on one line (Line 555) |
foreach( new x : Player )
foreach(Player,x)
if( PaintType[ killerid ] != 0 && PaintType[ playerid ] != 0 ) {
PKills[ killerid ] ++; PDeaths[ playerid ] ++;
SCMf( killerid, COLOR_CLIENT, "L-ai omorat pe %s cu un %s de la distanta de %0.2fm.", GetName( playerid ), weapName( reason ), GetDistanceBetweenPlayers( playerid, killerid ) );
SCMf( playerid, COLOR_CLIENT, "Ai fost omorat de %s cu un %s de la distande de %0.2fm.", GetName( killerid ), weapName( reason ), GetDistanceBetweenPlayers( playerid, killerid ) );
if( PaintType[ killerid ] == 3 && PaintType[ playerid ] == 3 ) {
if( GetPaintLevel( playerid ) == 8 ) {
foreach( Player : j) {
if( PaintType[ j ] == PaintType[ killerid ] ) {
for( new i = 0; i < 5; i++ ) SendDeathMessageToPlayer( j, 1001, 1001, 200 );
SendPaintballMessage( PaintType[ j ] - 1, COLOR_YELLOW, "* %s a castigat runda deoarece a omorat pe %s cu un cutit.", GetName( killerid ), GetName( playerid ) );
SpawnPlayer( j );
PKills[ j ] = 0; PDeaths[ j ] = 0;
PaintTime[ PaintType[ killerid ] - 1 ] = -2; PaintballWinner[ PaintType[ killerid ] - 1 ] = j; PaintballWinnerScore[ PaintType[ killerid ] - 1 ] = 0;
}
}
} else GiveSkillWeapon( killerid );
if( PaintTime[ PaintType[ killerid ] - 1 ] == -2 ) {
if( PaintTimer[ PaintType[ killerid ] - 1 ] != 0 ) KillTimer( PaintTimer[ PaintType[ killerid ] - 1 ] ), PaintTimer[ PaintType[ killerid ] - 1 ] = 0;
PaintTime[ PaintType[ killerid ] - 1 ] = -1; PaintText[ PaintType[ killerid ] - 1 ] = 60; PaintVote[ PaintType[ killerid ] - 1 ] = 1;
PaintTimer[ PaintType[ killerid ] - 1 ] = SetTimerEx( "CalculateVote", 60000, false, "d", PaintType[ killerid ] - 1 );
SendPaintballMessage( PaintType[ killerid ], COLOR_YELLOW, "Runda va incepe peste un minute. Pentru a vote o mapa, folositi comanda [/votemap]." );
}
}
foreach( Player : t ) { if( PaintType[ t ] == PaintType[ playerid ] ) SendDeathMessageToPlayer( t, killerid, playerid, reason ); }
if( PKills[ killerid ] - PDeaths[ killerid ] > PaintballWinnerScore[ PaintType[ killerid ] - 1 ] ) PaintballWinner[ PaintType[ killerid ] - 1 ] = killerid, PaintballWinnerScore[ PaintType[ killerid ] - 1 ] = PlayerPaintballScore[ killerid ];
foreach( new xLoop : Player) {
if( PaintType[ j ] == PaintType[ killerid ] ) {
for( new i = 0; i < 5; i++ ) SendDeathMessageToPlayer( xLoop, 1001, 1001, 200 );
SendPaintballMessage( PaintType[ xLoop ] - 1, COLOR_YELLOW, "* %s a castigat runda deoarece a omorat pe %s cu un cutit.", GetName( killerid ), GetName( playerid ) );
SpawnPlayer( xLoop );
PKills[ xLoop ] = 0; PDeaths[ xLoop ] = 0;
PaintTime[ PaintType[ killerid ] - 1 ] = -2; PaintballWinner[ PaintType[ killerid ] - 1 ] = xLoop; PaintballWinnerScore[ PaintType[ killerid ] - 1 ] = 0;
} else GiveSkillWeapon( killerid );