XADRENALINEIX

Al Afghany's Police Spy Mod

May 25th, 2013
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.47 KB | None | 0 0
  1. void player_blips(void){
  2.  
  3. int b;
  4. int intarray[16];
  5. int filled=0;
  6.  
  7. int indexarray[16];
  8.  
  9. Ped chararray[16];
  10.  
  11. Blip player_blip[16];
  12.  
  13. for(b=0; b<16; b++){
  14.   if(IS_NETWORK_PLAYER_ACTIVE(b)){
  15.   intarray[filled]=b;
  16.   filled++;
  17.   }
  18. }
  19.  
  20. for(b=0; b<filled; b++){
  21.   indexarray[b] = CONVERT_INT_TO_PLAYERINDEX(intarray[b]);
  22.   GET_PLAYER_CHAR(indexarray[b], &chararray[b]);
  23. }
  24.  
  25. if(filled > 1){
  26.   for(b=0; b<filled; b++){
  27.   if(!IS_CHAR_IN_ANY_POLICE_VEHICLE(chararray[b]) && !(COMPARE_STRING(GET_PLAYER_NAME(indexarray[b]), GET_PLAYER_NAME(GetPlayerIndex())))){
  28.     if(IS_CHAR_MALE(chararray[b])){
  29.     ADD_BLIP_FOR_CHAR(chararray[b], &player_blip[b]);
  30.     CHANGE_BLIP_SPRITE(player_blip[b], 63);
  31.     CHANGE_BLIP_COLOUR(player_blip[b], 9);
  32.     CHANGE_BLIP_ALPHA(player_blip[b], 255);
  33.     CHANGE_BLIP_NAME_FROM_ASCII(player_blip[b], GET_PLAYER_NAME(indexarray[b]));
  34.     }
  35.  
  36.     else{
  37.     ADD_BLIP_FOR_CHAR(chararray[b], &player_blip[b]);
  38.     CHANGE_BLIP_SPRITE(player_blip[b], 64);
  39.     CHANGE_BLIP_COLOUR(player_blip[b], 9);
  40.     CHANGE_BLIP_ALPHA(player_blip[b], 255);
  41.     CHANGE_BLIP_NAME_FROM_ASCII(player_blip[b], GET_PLAYER_NAME(indexarray[b]));
  42.     }
  43.   }
  44.  
  45.   else if(IS_CHAR_IN_ANY_POLICE_VEHICLE(chararray[b]) && !(COMPARE_STRING(GET_PLAYER_NAME(indexarray[b]), GET_PLAYER_NAME(GetPlayerIndex())))){
  46.     if(DOES_BLIP_EXIST(player_blip[b])){
  47.     REMOVE_BLIP(player_blip[b]);
  48.     }
  49.   }
  50.  
  51.   }
  52. }
  53.  
  54. else{
  55.   print_short("There are no players to spy out!");
  56. }
  57. }
Advertisement
Add Comment
Please, Sign In to add comment