Mask system, Need a little help
#1

I've tried to understand why it's not working properly,
The issue is that when you put /mask on, Your friend's name dissappear instead of your name, Can anyone help me
to fix both of the commands?, Thanks.

Код:
CMD:mask(playerid, params[])
{
   if(masked[playerid] == 0)
   masked[playerid] = 1;
   SendClientMessage(playerid, -1,"You put on your head your mask,use /hidemask, to hide it((Now noone know who are you))");
   for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, false);
   return 1;
}
CMD:hidemask(playerid, params[])
{
   masked[playerid] = 0;
   SendClientMessage(playerid, -1,"You hided your mask((Now people know you are you))");
   for(new a = 0; a < MAX_PLAYERS; a++) ShowPlayerNameTagForPlayer(playerid, a, true);
   return 1;
}
Reply
#2

Change ShowPlayerNameTagForPlayer(playerid, i, false); to ShowPlayerNameTagForPlayer(i, playerid, 1);.

Make sure you've got:
PHP код:
public OnPlayerStreamIn(playeridforplayerid)
{
    if(
Masked[playerid] == 1)
    {
        
ShowPlayerNameTagForPlayer(forplayeridplayerid0);
    }
    return 
1;

Reply
#3

https://sampwiki.blast.hk/wiki/ShowPlayerNameTagForPlayer
Read the parameters explanation.

Edit: Slow
Reply
#4

Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)