Question - 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: Question (
/showthread.php?tid=495591)
Question -
DarkLored - 17.02.2014
Guys i have made a sniper class but i cant figure out how to make if a player picks it he is invisable on map only like in COD5 and WaW
Can you please help me
here is the code that i am using right now
pawn Код:
if(listitem == 1)
{
if(GetPlayerScore(playerid) < 150) return ShowPlayerDialog(playerid,DIALOG_SKILL,DIALOG_STYLE_LIST,"Select your skill","Assault - Free\nSniper - 150 score\nEngineer - 300 score\nPilot - 550 score\nGunner - 700 score","Ok","");
else if(GetPlayerScore(playerid) >= 150)
{
GivePlayerWeapon(playerid,4,0);
GivePlayerWeapon(playerid,24,500);
GivePlayerWeapon(playerid,27,300);
GivePlayerWeapon(playerid,34,500);
Sniper[playerid] =1;
SendClientMessage(playerid,COLOR_ORANGE,"You have successfully chosen Sniper kit!");
SendClientMessage(playerid,COLOR_ORANGE,"Features: For now this skill only has a sniper. More features for this kit will come out soon!");
}
}
Re: Question -
Lajko1 - 17.02.2014
Use SetPlayerMarkerForPlayer ?
Re: Question -
DarkLored - 17.02.2014
But how do i set it to a color that is invisiable
Re: Question -
Lajko1 - 17.02.2014
https://sampwiki.blast.hk/wiki/SetPlayerMarkerForPlayer
Read this, I'm not really sure about SetPlayerMarkerForPlayer but wiki will help you
This will make marker invisible... that "00" at end of color
pawn Код:
// Make the players marker an invisible white (chat will be white but marker will be gone).
SetPlayerMarkerForPlayer( 42, 1, 0xFFFFFF00 );
Re: Question -
DarkLored - 17.02.2014
But it only sets me invisable to the player 42 not all of the players
Re: Question -
Don_Cage - 17.02.2014
Use a loop
pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
SetPlayerMarkerForPlayer(i, playerid, 0xFFFFFF00);
}
Re: Question -
DarkLored - 18.02.2014
thanks both reped+