SA-MP Forums Archive
Remove player from Radar - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Remove player from Radar (/showthread.php?tid=559016)



Remove player from Radar - EgyptForLife - 20.01.2015

Hello everyone,
I wanna know how to create a system for a class and to remove player from marker, it's used in most of TDM servers that have classes and have "Sniper" class, I wanna know how to do that, thanks

Best Regards,
-EgyptForLife aka. BadBoYzZ



Re: Remove player from Radar - xVIP3Rx - 20.01.2015

SetPlayerMarkerForPlayer

Quote:
pawn Код:
// This Makes the players marker invisible to the player while keeping chat colour the same. Will only work correctly if SetPlayerColor has been used:
SetPlayerMarkerForPlayer( playerid, showplayerid, ( GetPlayerColor( showplayerid ) & 0xFFFFFF00 ) );



Re: Remove player from Radar - Vince - 20.01.2015

Simply set them to a color with 0 alpha (00 at the end).


Re: Remove player from Radar - EgyptForLife - 20.01.2015

I've done it, but they're still visible on the radar :
pawn Код:
case 1: // Class: Sniper
            {
                ResetPlayerWeapons(playerid);
                //Assault / Rifle
                GivePlayerWeapon(playerid,34,300);
                //Pistol
                GivePlayerWeapon(playerid,23,200);
                //Shotgun / Micro machinegun
                GivePlayerWeapon(playerid,29,150);
                //Thrown
                GivePlayerWeapon(playerid,18,3);
                //Melle
                GivePlayerWeapon(playerid,4,1);

                for(new k; k < MAX_PLAYERS; k++)
                {
                    //SetPlayerMarkerForPlayer( k, playerid, 0xFFFFFF00
                    SetPlayerMarkerForPlayer( k, playerid, ( GetPlayerColor( playerid ) & 0xFFFFFF00 ) );
                }
            }



Re: Remove player from Radar - xVIP3Rx - 20.01.2015

pawn Код:
case 1: // Class: Sniper
            {
                ResetPlayerWeapons(playerid);
               
                GivePlayerWeapon(playerid,34,300);//Assault / Rifle
                GivePlayerWeapon(playerid,23,200);//Pistol
                GivePlayerWeapon(playerid,29,150);//Shotgun / Micro machinegun
                GivePlayerWeapon(playerid,18,3);//Thrown
                GivePlayerWeapon(playerid,4,1);//Melle

                SetPlayerColor(playerid, 0xFFFFFF00);
                //OR
                for(new i; i<MAX_PLAYERS; i++) SetPlayerMarkerForPlayer(i, playerid, 0xFFFFFF00);
                SendClientMessage(playerid, -1, "You're now invisibe on radar");
            }
Try it and tell me does it say anything ?


Re: Remove player from Radar - EgyptForLife - 20.01.2015

Quote:
Originally Posted by xVIP3Rx
Посмотреть сообщение
pawn Код:
case 1: // Class: Sniper
            {
                ResetPlayerWeapons(playerid);
               
                GivePlayerWeapon(playerid,34,300);//Assault / Rifle
                GivePlayerWeapon(playerid,23,200);//Pistol
                GivePlayerWeapon(playerid,29,150);//Shotgun / Micro machinegun
                GivePlayerWeapon(playerid,18,3);//Thrown
                GivePlayerWeapon(playerid,4,1);//Melle

                SetPlayerColor(playerid, 0xFFFFFF00);
                //OR
                for(new i; i<MAX_PLAYERS; i++) SetPlayerMarkerForPlayer(i, playerid, 0xFFFFFF00);
                SendClientMessage(playerid, -1, "You're now invisibe on radar");
            }
Try it and tell me does it say anything ?
No errors, but gonna try it in server. Wait pls
btw, can you add me on skype ? farouk.alboushy1
Thanks

//Edit, it's working thnx.