Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerStreamIn(playerid, forplayerid)
- {
- if(IsACop(playerid) == 1 && PlayerData[forplayerid][pWantedLevel] != 0 && PlayerData[playerid][pOnDuty])
- {
- SetPlayerMarkerForPlayer( playerid, forplayerid, 0xe3336dFF );
- }
- new iswar = 0, attackers, defenders;
- for(new i = 1 ; i < sizeof(Turfs) && iswar == 0; ++i)
- {
- attackers = WarInfo[i][wAttacker];
- defenders = WarInfo[i][wFaction];
- if(WarInfo[i][wTime] > 1 && attackers != 0 && defenders != 0)
- {
- if( (PlayerData[playerid][pFaction] == attackers || PlayerData[playerid][pFaction] == defenders) && (PlayerData[forplayerid][pFaction] == attackers || PlayerData[forplayerid][pFaction] == defenders) ) iswar = 1;
- }
- }
- if(iswar == 1)
- {
- SetPlayerMarkerForPlayer( playerid, forplayerid, ( GetPlayerColor( forplayerid ) & 0xFFFFFF00 ) );
- SetPlayerMarkerForPlayer( forplayerid, playerid, ( GetPlayerColor( playerid ) & 0xFFFFFF00 ) );
- }
- else
- {
- if(PlayerPaintballing[playerid] && PlayerPaintballing[forplayerid])
- {
- SetPlayerMarkerForPlayer(playerid, forplayerid, GetPlayerColor( forplayerid ) );
- SetPlayerMarkerForPlayer( forplayerid, playerid, GetPlayerColor( playerid ) );
- }
- else
- {
- SetPlayerMarkerForPlayer( playerid, forplayerid, ( GetPlayerColor( forplayerid ) & 0xFFFFFF00 ) );
- SetPlayerMarkerForPlayer( forplayerid, playerid, ( GetPlayerColor( playerid ) & 0xFFFFFF00 ) );
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement