SA-MP Forums Archive
SetPlayerMarkerForPlayer HELP! +Rep - 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: SetPlayerMarkerForPlayer HELP! +Rep (/showthread.php?tid=575593)



SetPlayerMarkerForPlayer HELP! +Rep - Charalambos26 - 28.05.2015

Hello,
I wanted to make it so that the Sniper class on my GM should be invisible on map but if he writes he should be viewable,

I found this script,
SetPlayerMarkerForPlayer( 42, 1, ( GetPlayerColor( 1 ) & 0xFFFFFF00 ) );


But is this right?
If yes how to make it so, that if player sniper class he should be like this.

Thanks
i will +rep if someone helps me


Re: SetPlayerMarkerForPlayer HELP! +Rep - Gammix - 28.05.2015

pawn Код:
for(new i; i < MAX_PLAYERS; i++)
{
    SetPlayerMarkerForPlayer(playerid, i, (GetPlayerColor(playerid) & 0xFFFFFF00));
}
Invisible on map for all players. You must refer to SAMP wiki: https://sampwiki.blast.hk/wiki/SetPlayerMarkerForPlayer


Re: SetPlayerMarkerForPlayer HELP! +Rep - Charalambos26 - 28.05.2015

Quote:
Originally Posted by Gammix
Посмотреть сообщение
pawn Код:
for(new i; i < MAX_PLAYERS; i++)
{
    SetPlayerMarkerForPlayer(playerid, i, (GetPlayerColor(playerid) & 0xFFFFFF00));
}
Invisible on map for all players. You must refer to SAMP wiki: https://sampwiki.blast.hk/wiki/SetPlayerMarkerForPlayer
ok but how do I put it in this script?

Код HTML:
case SNIPER:
        {
            TogglePlayerControllable(playerid, 1);
	        ResetPlayerWeapons(playerid);
	        GivePlayerWeapon(playerid, 23, 200);//silent pistol
	        GivePlayerWeapon(playerid, 34, 250);//sniper
	        GivePlayerWeapon(playerid, 29, 250);//mp5
	        GivePlayerWeapon(playerid, 4, 1);//knife
	        RemovePlayerMapIcon(playerid, 0);
        }



Re: SetPlayerMarkerForPlayer HELP! +Rep - Gammix - 28.05.2015

Just put that code in that specific case label.

pawn Код:
case SNIPER:
{
for(new i; i < MAX_PLAYERS; i++)
{
    SetPlayerMarkerForPlayer(playerid, i, (GetPlayerColor(playerid) & 0xFFFFFF00));
}
//.....
}



Re: SetPlayerMarkerForPlayer HELP! +Rep - Beckett - 28.05.2015

pawn Код:
#define COLOR_TRANSPARENT_MAP 0xFFFFFF00


         case SNIPER:
        {
            TogglePlayerControllable(playerid, 1);
            ResetPlayerWeapons(playerid);
            GivePlayerWeapon(playerid, 23, 200);//silent pistol
            GivePlayerWeapon(playerid, 34, 250);//sniper
            GivePlayerWeapon(playerid, 29, 250);//mp5
            GivePlayerWeapon(playerid, 4, 1);//knife
            RemovePlayerMapIcon(playerid, 0);
                SetPlayerColor(playerid,COLOR_TRANSPARENT_MAP);
        }
or
pawn Код:
#define COLOR_TRANSPARENT_MAP 0xFFFFFF00
case SNIPER:
        {
            TogglePlayerControllable(playerid, 1);
            ResetPlayerWeapons(playerid);
            GivePlayerWeapon(playerid, 23, 200);//silent pistol
            GivePlayerWeapon(playerid, 34, 250);//sniper
            GivePlayerWeapon(playerid, 29, 250);//mp5
            GivePlayerWeapon(playerid, 4, 1);//knife
            RemovePlayerMapIcon(playerid, 0);
for(new i = 0; i < MAX_PLAYERS; i++) // use foreach if u want.
{
if(IsPlayerConnected(i))
{
SetPlayerMarkerForPlayer(i, playerid,COLOR_TRANSPARENT_MAP);
}
}
        }



Re: SetPlayerMarkerForPlayer HELP! +Rep - Charalambos26 - 28.05.2015

Quote:
Originally Posted by DaniceMcHarley
Посмотреть сообщение
pawn Код:
#define COLOR_TRANSPARENT_MAP 0xFFFFFF00


         case SNIPER:
        {
            TogglePlayerControllable(playerid, 1);
            ResetPlayerWeapons(playerid);
            GivePlayerWeapon(playerid, 23, 200);//silent pistol
            GivePlayerWeapon(playerid, 34, 250);//sniper
            GivePlayerWeapon(playerid, 29, 250);//mp5
            GivePlayerWeapon(playerid, 4, 1);//knife
            RemovePlayerMapIcon(playerid, 0);
                SetPlayerColor(playerid,COLOR_TRANSPARENT_MAP);
        }
or
pawn Код:
#define COLOR_TRANSPARENT_MAP 0xFFFFFF00
case SNIPER:
        {
            TogglePlayerControllable(playerid, 1);
            ResetPlayerWeapons(playerid);
            GivePlayerWeapon(playerid, 23, 200);//silent pistol
            GivePlayerWeapon(playerid, 34, 250);//sniper
            GivePlayerWeapon(playerid, 29, 250);//mp5
            GivePlayerWeapon(playerid, 4, 1);//knife
            RemovePlayerMapIcon(playerid, 0);
for(new i = 0; i < MAX_PLAYERS; i++) // use foreach if u want.
{
if(IsPlayerConnected(i))
{
SetPlayerMarkerForPlayer(i, playerid,COLOR_TRANSPARENT_MAP);
}
}
        }
Thanks bro I +1rep you.
Can you also say me how I can make this

Код HTML:
case MEDIC:
        {
            TogglePlayerControllable(playerid, 1);
	        ResetPlayerWeapons(playerid);
			GivePlayerWeapon(playerid, 33, 200);
	  		GivePlayerWeapon(playerid, 22, 200);
	    	GivePlayerWeapon(playerid, 25, 200);
	     	GivePlayerWeapon(playerid, 11, 2);
        }
Only joinable on 500 Score? its not a team, just a Class like spy and so on.


Re: SetPlayerMarkerForPlayer HELP! +Rep - FplayerGR - 28.05.2015

case MEDIC is if player press spawn in select class?


Re: SetPlayerMarkerForPlayer HELP! +Rep - ]Rafaellos[ - 28.05.2015

If the player pick Medic skin and then press the spawn button.


Re: SetPlayerMarkerForPlayer HELP! +Rep - Charalambos26 - 28.05.2015

Quote:
Originally Posted by ]Rafaellos[
Посмотреть сообщение
If the player pick Medic skin and then press the spawn button.
No Medic is,

Player chooses Team ( USA,Russia,Greece or Rebells )
then he spawns and he can choose class ( Medic, Sniper, Assault )
but I want that Medic is only joinable on score 500,


Re: SetPlayerMarkerForPlayer HELP! +Rep - FplayerGR - 28.05.2015

Medic is rank? and 'case MEDIC' is in one dialog?