Another problem...
#1

Ok,I have this.

Код:
  if (strcmp("/nameoff", cmdtext, true, 5) == 0)
	{
    if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)
		{
    if (NameOff[playerid] == 0)
    {
    for(new i = 0; i < MAX_PLAYERS; i++)
    ShowPlayerNameTagForPlayer(i,playerid, false);
    NameOff[playerid] = 1;
		 return 1;
		}
		else
		{
     NameOff[playerid] = 0;
     SetPlayerName(playerid, plName[playerid]);
     ShowPlayerNameTagForPlayer(i,playerid, true);
     return 1;
    }
    }
	}
The nametag of the player who typed /nameoff only dissapears for 1 second.
This is really weird O_O
Reply
#2

Bump !
Reply
#3

You're using your for loop wrongly in the second part of your script (i.e there isn't one there and you're still using i)
Reply
#4

TIP: Use brackets when looping, than the problem which WeirdoSport just said, won't occur.
Reply
#5

Now I have this

Quote:

if (strcmp("/nameoff", cmdtext, true, 5) == 0)
{
if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] ==
{
if (NameOff[playerid] == 0)
{
for(new i = 0; i < MAX_PLAYERS; i++)
ShowPlayerNameTagForPlayer(i,playerid, false);
SendClientMessage(playerid,COLOR_GREY,"Nobody knows your real identity now!");
NameOff[playerid] = 1;
return 1;
}
else
{
for(new i = 0; i < MAX_PLAYERS; i++)
ShowPlayerNameTagForPlayer(i,playerid, true);
NameOff[playerid] = 0;
SetPlayerName(playerid, plName[playerid]);
SendClientMessage(playerid,COLOR_GREY,"You now have your real identity!");
return 1;
}
}
}

Same thing,the name is still seen.
Reply
#6

pawn Код:
if (strcmp("/nameoff", cmdtext, true, 5) == 0)
  {
   if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == Cool
   {
    if (NameOff[playerid] == 0)
    {
     for(new i = 0; i < MAX_PLAYERS; i++){
     ShowPlayerNameTagForPlayer(i,playerid, false);]
     SendClientMessage(playerid,COLOR_GREY,"Nobody knows your real identity now!");
     NameOff[playerid] = 1;
   
    return 1;
   }
   else
   {
     for(new i = 0; i < MAX_PLAYERS; i++){
     ShowPlayerNameTagForPlayer(i,playerid, true);}
     NameOff[playerid] = 0;
     SetPlayerName(playerid, plName[playerid]);
     SendClientMessage(playerid,COLOR_GREY,"You now have your real identity!");
     return 1;
    }
    }
  }
guess it'd work.
Reply
#7

what did you change ignas?

http://pastebin.com/d5f92b55a Try.
Reply
#8

The name dissapears just for one second.
Then it comes back !
Reply
#9

Bump !
Reply
#10

your not allowed to bump


(neither am I lol)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)