Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. public OnPlayerStreamIn(playerid, forplayerid)
  2. {
  3. if(IsACop(playerid) == 1 && PlayerData[forplayerid][pWantedLevel] != 0 && PlayerData[playerid][pOnDuty])
  4. {
  5. SetPlayerMarkerForPlayer( playerid, forplayerid, 0xe3336dFF );
  6. }
  7. new iswar = 0, attackers, defenders;
  8. for(new i = 1 ; i < sizeof(Turfs) && iswar == 0; ++i)
  9. {
  10. attackers = WarInfo[i][wAttacker];
  11. defenders = WarInfo[i][wFaction];
  12. if(WarInfo[i][wTime] > 1 && attackers != 0 && defenders != 0)
  13. {
  14. if( (PlayerData[playerid][pFaction] == attackers || PlayerData[playerid][pFaction] == defenders) && (PlayerData[forplayerid][pFaction] == attackers || PlayerData[forplayerid][pFaction] == defenders) ) iswar = 1;
  15. }
  16. }
  17. if(iswar == 1)
  18. {
  19. SetPlayerMarkerForPlayer( playerid, forplayerid, ( GetPlayerColor( forplayerid ) & 0xFFFFFF00 ) );
  20. SetPlayerMarkerForPlayer( forplayerid, playerid, ( GetPlayerColor( playerid ) & 0xFFFFFF00 ) );
  21. }
  22. else
  23. {
  24. if(PlayerPaintballing[playerid] && PlayerPaintballing[forplayerid])
  25. {
  26. SetPlayerMarkerForPlayer(playerid, forplayerid, GetPlayerColor( forplayerid ) );
  27. SetPlayerMarkerForPlayer( forplayerid, playerid, GetPlayerColor( playerid ) );
  28. }
  29. else
  30. {
  31. SetPlayerMarkerForPlayer( playerid, forplayerid, ( GetPlayerColor( forplayerid ) & 0xFFFFFF00 ) );
  32. SetPlayerMarkerForPlayer( forplayerid, playerid, ( GetPlayerColor( playerid ) & 0xFFFFFF00 ) );
  33. }
  34. }
  35. return 1;
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement