Quote:
|
Originally Posted by wafffllesss
Quote:
|
Originally Posted by Uniqueee
I'm having a problem with this code:
pawn Код:
if(strcmp(cmd, "/maskon", true) == 0) // by Ellis { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pMask] == 0) { SendClientMessage(playerid, COLOR_GRAD1, " You don't have a mask"); return 1; } if(PlayerInfo[playerid][pLevel] < 2) { SendClientMessage(playerid, COLOR_GRAD1, " You can't use it."); return 1; } for(new i = 0; i < MAX_PLAYERS; i++) { ShowPlayerNameTagForPlayer(playerid,i, 0); } PlayerInfo[playerid][pMaskuse] = 1; SendClientMessage(playerid, COLOR_WHITE, " You have put your mask on [/maskoff to put it away]."); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* %s puts a mask on.", sendername); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); } return 1; }
You told me in the last post to add this:
pawn Код:
public OnPlayerStreamIn(playerid, forplayerid) { if(PlayerInfo[playerid][pMaskuse] == 1) ShowPlayerNameTagForPlayer(forplayerid, playerid, 1); else ShowPlayerNameTagForPlayer(forplayerid, playerid, 0); }
It didn't work,i can still see their name.
|
Try changing the Player you're checking the mask. And try not making more than one topic for the same subject.
pawn Код:
public OnPlayerStreamIn(playerid, forplayerid) { if(PlayerInfo[forplayerid][pMaskuse] == 1) ShowPlayerNameTagForPlayer(forplayerid, playerid, 1); else ShowPlayerNameTagForPlayer(forplayerid, playerid, 0); }
|
You didn't change anything. You mean ShowPlayerNameTagForPlayer(playerid,forplayerid, 0); ?
I am making new posts because when there are more than 3 comments people think i got the answers.
Edit: i tried,it didn't work.