Question
#1

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!");
             }
          }
Reply
#2

Use SetPlayerMarkerForPlayer ?
Reply
#3

But how do i set it to a color that is invisiable
Reply
#4

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 );
Reply
#5

But it only sets me invisable to the player 42 not all of the players
Reply
#6

Use a loop
pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
    SetPlayerMarkerForPlayer(i, playerid, 0xFFFFFF00);
}
Reply
#7

thanks both reped+
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)