Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void player_blips(void){
- int b;
- int intarray[16];
- int filled=0;
- int indexarray[16];
- Ped chararray[16];
- Blip player_blip[16];
- for(b=0; b<16; b++){
- if(IS_NETWORK_PLAYER_ACTIVE(b)){
- intarray[filled]=b;
- filled++;
- }
- }
- for(b=0; b<filled; b++){
- indexarray[b] = CONVERT_INT_TO_PLAYERINDEX(intarray[b]);
- GET_PLAYER_CHAR(indexarray[b], &chararray[b]);
- }
- if(filled > 1){
- for(b=0; b<filled; b++){
- if(!IS_CHAR_IN_ANY_POLICE_VEHICLE(chararray[b]) && !(COMPARE_STRING(GET_PLAYER_NAME(indexarray[b]), GET_PLAYER_NAME(GetPlayerIndex())))){
- if(IS_CHAR_MALE(chararray[b])){
- ADD_BLIP_FOR_CHAR(chararray[b], &player_blip[b]);
- CHANGE_BLIP_SPRITE(player_blip[b], 63);
- CHANGE_BLIP_COLOUR(player_blip[b], 9);
- CHANGE_BLIP_ALPHA(player_blip[b], 255);
- CHANGE_BLIP_NAME_FROM_ASCII(player_blip[b], GET_PLAYER_NAME(indexarray[b]));
- }
- else{
- ADD_BLIP_FOR_CHAR(chararray[b], &player_blip[b]);
- CHANGE_BLIP_SPRITE(player_blip[b], 64);
- CHANGE_BLIP_COLOUR(player_blip[b], 9);
- CHANGE_BLIP_ALPHA(player_blip[b], 255);
- CHANGE_BLIP_NAME_FROM_ASCII(player_blip[b], GET_PLAYER_NAME(indexarray[b]));
- }
- }
- else if(IS_CHAR_IN_ANY_POLICE_VEHICLE(chararray[b]) && !(COMPARE_STRING(GET_PLAYER_NAME(indexarray[b]), GET_PLAYER_NAME(GetPlayerIndex())))){
- if(DOES_BLIP_EXIST(player_blip[b])){
- REMOVE_BLIP(player_blip[b]);
- }
- }
- }
- }
- else{
- print_short("There are no players to spy out!");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment