Can't solve this - 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: Can't solve this (
/showthread.php?tid=468478)
Can't solve this -
Lajko1 - 08.10.2013
Hey I'm trying to make mask system but I don't know how to hide player's name, is possible to hide only name from 1 player if he wears mask? I was thinking about ShowNameTags(0)... (or what ever is that function) and then to set 3Dtext Labels over Player's head with theirs names when they spawn... but I need to create for example 50 text labels and attach them to players when they connect or what..? I'm really new to those labels and so on so can you help me with mask system a bit? some advices and tips are really welcome ^^ thank you in advance
Re: Can't solve this -
iFiras - 08.10.2013
Use this from SA-MP Wiki
https://sampwiki.blast.hk/wiki/ShowPlayerNameTagForPlayer
Re: Can't solve this -
Lajko1 - 08.10.2013
pawn Код:
CMD:mask(playerid)
{
if(Masked[playerid] == 0)
{
Masked[playerid] = 1;
for(new i = 0; i < MAX_PLAYERS; i++)
{
ShowPlayerNameTagForPlayer(i, playerid, 0);
ApplyAnimation(playerid, "SHOP", "ROB_Shifty", 4.0, 0, 0, 0, 0, 0);
SetPlayerAttachedObject(playerid, 1, 19037, 2, 10, 4.7, 0.0, 90, 90, 0);
}
SendClientMessage(playerid, COLOR_LIGHTGREEN, "You put your Mask on!");
return 1;
}
else if(Masked[playerid] == 1)
{
Masked[playerid] = 0;
for(new i = 0; i < MAX_PLAYERS; i++)
{
ShowPlayerNameTagForPlayer(i, playerid, 1);
}
SendClientMessage(playerid, COLOR_LIGHTGREEN, "You took your Mask off!");
return 1;
}
return 1;
}
For now I made this, will this work? even if new players connect will player's name be hiden?
Re: Can't solve this -
iFiras - 08.10.2013
Your code looks correct, I think it will work. But you may test it with someone also to check
Re: Can't solve this -
Lajko1 - 08.10.2013
Well I tested with myself for now but it sends me only messages, it doesn't apply animation and attach object :/
Re: Can't solve this -
Lajko1 - 09.10.2013
Anyone please? :/
Re: Can't solve this -
Shoulen - 09.10.2013
Removed
Re: Can't solve this -
Lajko1 - 09.10.2013
Okay I fixed animation, but how can I apply object on player's face? Anyone have the right coordinates?
Re: Can't solve this -
Lajko1 - 09.10.2013
Fixed