Mask system, Need a little help - 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: Mask system, Need a little help (
/showthread.php?tid=634546)
Mask system, Need a little help -
darkhunter332 - 21.05.2017
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;
}
Re: Mask system, Need a little help -
Kane - 21.05.2017
Change
ShowPlayerNameTagForPlayer(playerid, i, false); to
ShowPlayerNameTagForPlayer(i, playerid, 1);.
Make sure you've got:
PHP код:
public OnPlayerStreamIn(playerid, forplayerid)
{
if(Masked[playerid] == 1)
{
ShowPlayerNameTagForPlayer(forplayerid, playerid, 0);
}
return 1;
}
Re: Mask system, Need a little help -
Banditul18 - 21.05.2017
https://sampwiki.blast.hk/wiki/ShowPlayerNameTagForPlayer
Read the parameters explanation.
Edit: Slow
Re: Mask system, Need a little help -
darkhunter332 - 21.05.2017
Thanks.