mask help...
#1

Hey can u do on player use /mask to do that up on the players head writes : Stranger [ID: His ID] in color red , And when the player get it off then nothing...


Код:
CMD:mask(playerid, params[])// Fixed by Clemente
{
	new name[MAX_PLAYER_NAME];
	new string[42];
	if(HasBoughtMask[playerid] == 1)
	{
		SendClientMessage(playerid, COLOR_GREY, "You don't have a mask.");
		return 1;
	}
	if(PlayerInfo[playerid][pMask] == 0)
	{
		for(new i = 0; i < MAX_PLAYERS; i++)
		{
			if(IsPlayerConnected(i))
			{
			ShowPlayerNameTagForPlayer(i, playerid, 0);
			}
		}
		PlayerInfo[playerid][pMask] = 1;
		GetPlayerName(playerid, name, sizeof(name));
		format(string, sizeof(string), "* %s has put a mask on.", name);
		ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
	}
	else if(PlayerInfo[playerid][pMask] == 1)
	{
		for(new i = 0; i < MAX_PLAYERS; i++)
		{
			if(IsPlayerConnected(i))
			{
				ShowPlayerNameTagForPlayer(i, playerid, 1);
			}
		}
		PlayerInfo[playerid][pMask] = 0;
		GetPlayerName(playerid, name, sizeof(name));
		format(string, sizeof(string), "* %s has put their mask away.", name);
		ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
	}
			else if(GetPVarInt(playerid, "EventToken"))
		{
			SendClientMessageEx(playerid, COLOR_GRAD1, "You can't use this while in an event.");
		}

	else if(PlayerInfo[playerid][pMember] != 8 || PlayerInfo[playerid][pMember] != 8 )
	{
	SendClientMessageEx(playerid, COLOR_GREY, "   You are not a member of the Hitman Agency !");
	return 1;
	}
	return 1;
}
Reply
#2

I don't think that's possible,you can place a 3dText label over his head maybe.
Reply
#3

you can create a var which counts how many stranger there is.
Then when a player (current one) type that command. Create another var then store the current stranger count to that var. Then update the label something like this

pawn Код:
format(string, 128, "Stranger [ID: %i]", var);
Update3DTextLabel(strangerlabel, red, string);
for the label you can create a label which is empty to do that. Just do " ".
Then if you want to remove the label message update the label with " ".

I can't give a code. Because i want you to learn how to script that.
Reply
#4

Quote:
Originally Posted by _Jake_
Посмотреть сообщение
you can create a var which counts how many stranger there is.
Then when a player (current one) type that command. Create another var then store the current stranger count to that var. Then update the label something like this

pawn Код:
format(string, 128, "Stranger [ID: %i]", var);
Update3DTextLabel(strangerlabel, red, string);
for the label you can create a label which is empty to do that. Just do " ".
Then if you want to remove the label message update the label with " ".

I can't give a code. Because i want you to learn how to script that.
Two errors :
Код:
d:\Users\User\Desktop\Scriptv1 perfect\SSS\Script[ONLY TO YOU]\AMRP\gamemodes\NQRP.pwn(46986) : error 017: undefined symbol "var"
d:\Users\User\Desktop\Scriptv1 perfect\SSS\Script[ONLY TO YOU]\AMRP\gamemodes\NQRP.pwn(46987) : error 017: undefined symbol "Update3DTextLabel"
Reply
#5

Also me got that problem...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)