PDA

View Full Version : mask cmd


GGW
10/08/2013, 09:39 PM
hi all , i'm trying to find a /mask cmd to hide the player name but i want it in strcmd so i hope you help me and thank you all have a nice day :D

GGW
11/08/2013, 01:53 PM
any one know ?

Mattakil
11/08/2013, 04:53 PM
One thing that you can do is to remove the name ontop of the player (Where it shows their name and health) and use a 3dtextlabel to replace it, set it using GetPlayerName, when they use /mask to change the name to a random code, then when they talk it uses their mask code, it would require some other scripting, as the code would want to save, unless you want their name to come up as "Masked Male". If you dont know how to do what I am saying, then you can use SetPlayerName

GGW
12/08/2013, 02:38 AM
Hmm i try this but its not helping tonot make the players see you i need to make nothing on my player head But Thanks for Reply :D

JeaSon
12/08/2013, 02:41 AM
if(strcmp(cmd, "/mask", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pMember] != 8 && PlayerInfo[playerid][pMember] != 7 && PlayerInfo[playerid][pMember] != 2)
{
SendClientMessage(playerid, COLOR_GREY, " Access Denied");
return 1;
}
if(HasBoughtMask[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "You don't have a mask.");
return 1;
}
if(PlayerInfo[playerid][pMask] == 0)
{
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
ShowPlayerNameTagForPlayer(i, playerid, 0);
}
}
PlayerInfo[playerid][pMask] = 1;
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s puts on a mask.", sendername);
ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
}
else if(PlayerInfo[playerid][pMask] == 1)
{
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
ShowPlayerNameTagForPlayer(i, playerid, 1);
}
}
PlayerInfo[playerid][pMask] = 0;
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s Takes off their mask..", sendername);
ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
}
}
return 1;
}

verlaj
12/08/2013, 02:45 AM
you can also add

SetPlayerAttachedObject(playerid, 1, 19036, 2, 0.1, 0.0, 0.0, 90, 90, 0);
SetPlayerAttachedObject(playerid, 2, 19472, 2, 0.0, 0.1, 0.0, 90, 90, 0); // remove this if it looks odd

to attach a mask for the player

GGW
16/08/2013, 04:10 PM
well thanks all for helping :) but not that what i ask for i don't want make on the head i was cmd mask to hide the name :)