Sniper is Not Invisible on map...
#1

I add this for sniper class so he can invisible in map'. But he is still visible in map.. ??

pawn Код:
if(listitem == 1)
                    {
                    if(GetPlayerScore(playerid) >= 300)
                        {
                        SendClientMessage(playerid, COLOR_WHITE, "Server News: You Chose the Sniper as your class.");
                        ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Sniper Class:", "{F81414}Abilities:\n{FFFFFF}A Locater class, Always invisible on map.\n\n{F81414}Weapons:\n\n{FFFFFF}Sniper Rifle\n{FFFFFF}Mp5\n{FFFFFF}Knife\n{FFFFFF}Shotgun", "OK","");
                        gPlayerClass[playerid] = SNIPER;
                        PickedClass[playerid] = 1;
                        RemovePlayerMapIcon(playerid, 0);
                        SetPlayerVirtualWorld(playerid, 0);
                        TogglePlayerControllable(playerid, 1);
                        ResetPlayerWeapons(playerid);
                        GivePlayerWeapon(playerid, 4, 1);
                        GivePlayerWeapon(playerid, 34, 250);
                        GivePlayerWeapon(playerid, 29, 200);
                        GivePlayerWeapon(playerid, 25, 250);
                        }
                    else
            {
                SendClientMessage(playerid,COLOR_RED,"You need to be on Rank 3 to get this Class.");

                ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{6EF83C}Choose A Class:", "Assault Class  (Need No Rank)  \nSniper Class  (Need Rank 3)  \nEngineer Class  (Need Rank 5)  \nJet-Trooper Class  (Need Rank 7)  \nPilot Class  (Need Rank 8)  \nSpy Class  (Need Rank 9)", "Choose","");
                TogglePlayerControllable(playerid, 0);
                }
            }
I really need help. Please..
Reply
#2

OnGameModeInit:

ShowPlayerMarkers(0);
ShowNameTags(0);
Reply
#3

Quote:
Originally Posted by Kudoz
Посмотреть сообщение
OnGameModeInit:

ShowPlayerMarkers(0);
ShowNameTags(0);
But this will Hide All players MARKERS.....
Reply
#4

EDIT: Ma bad i was high.
Reply
#5

try this
pawn Код:
SetPlayerColor(playerid, (GetPlayerColor(playerid) | 0x000000FF ));
Reply
#6

Why do you use RemovePlayerMapIcon? Use ShowPlayerMarkerForPlayer.
Reply
#7

How?? Its not working all.. I tried all of your codes
Reply
#8

Replace it with this


Код:
if(listitem == 1)
                    {
                    if(GetPlayerScore(playerid) >= 300)
                        {
                        SendClientMessage(playerid, COLOR_WHITE, "Server News: You Chose the Sniper as your class.");
                        ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Sniper Class:", "{F81414}Abilities:\n{FFFFFF}A Locater class, Always invisible on map.\n\n{F81414}Weapons:\n\n{FFFFFF}Sniper Rifle\n{FFFFFF}Mp5\n{FFFFFF}Knife\n{FFFFFF}Shotgun", "OK","");
                        gPlayerClass[playerid] = SNIPER;
                        PickedClass[playerid] = 1;
                        SetPlayerColor(playerid,0xFF000000);
                        SetPlayerVirtualWorld(playerid, 0);
                        TogglePlayerControllable(playerid, 1);
                        ResetPlayerWeapons(playerid);
                        GivePlayerWeapon(playerid, 4, 1);
                        GivePlayerWeapon(playerid, 34, 250);
                        GivePlayerWeapon(playerid, 29, 200);
                        GivePlayerWeapon(playerid, 25, 250);
                        }
                    else
            {
                SendClientMessage(playerid,COLOR_RED,"You need to be on Rank 3 to get this Class.");

                ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{6EF83C}Choose A Class:", "Assault Class  (Need No Rank)  \nSniper Class  (Need Rank 3)  \nEngineer Class  (Need Rank 5)  \nJet-Trooper Class  (Need Rank 7)  \nPilot Class  (Need Rank 8)  \nSpy Class  (Need Rank 9)", "Choose","");
                TogglePlayerControllable(playerid, 0);
                }
            }
Your welcome
Reply
#9

But this will set player colour?? It set my color red...
Reply
#10

use ShowPlayerMarkerForPlayer and loop it
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)