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;
}
format(string, 128, "Stranger [ID: %i]", var);
Update3DTextLabel(strangerlabel, red, string);
|
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 Код:
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. |
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"