SA-MP Forums Archive
Need help with ShowPlayerNameTagForPlayer - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Need help with ShowPlayerNameTagForPlayer (/showthread.php?tid=120513)



Need help with ShowPlayerNameTagForPlayer - *ToM* - 11.01.2010

Sup y'all, I was playing around with pawno and decided to create a mask system, when I finished i wanted to compile it but.. my pawno crashed. It doesn't crash when I take out these 2 commands...

pawn Код:
if(strcmp("/usemask", cmdtext, true) == 0)
  {
        if(PlayerInfo[playerid][pMask] == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a Mask ! You can get one from 24/7 shop nearby Police HQ.");
        {
      for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, false);
      SendClientMessage(playerid, COLOR_LIGHTBLUE, "You've put your mask on, /leavemask to take it off");
        }
    }
    return 1;
}
pawn Код:
if(strcmp("/leavemask", cmdtext, true) == 0)
  {
        if(PlayerInfo[playerid][pMask] == 1) return SendClientMessage(playerid, COLOR_GREY, "You don't have a Mask ! You can get one from 24/7 shop nearby Police HQ");
        {
      for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, true);
      SendClientMessage(playerid, COLOR_LIGHTBLUE, "You've put your mask on, /leavemask to take it off");
        }
    }
    return 1;
}
What's wrong with these commands ? I don't get it
P.S : sorry for bad indetation


Re: Need help with ShowPlayerNameTagForPlayer - MaykoX - 11.01.2010

i think this gets to much warrnings. (Spaces and things)


Re: Need help with ShowPlayerNameTagForPlayer - *ToM* - 11.01.2010

Quote:
Originally Posted by MaykoX
i think this gets to much warrnings. (Spaces and things)
there's not much spaces actually, it's just "[ pawn ]" function, which ruins my indetation...


Re: Need help with ShowPlayerNameTagForPlayer - GTAguillaume - 11.01.2010

pawn Код:
if(strcmp("/usemask", cmdtext, true) == 0)
  {
      if(PlayerInfo[playerid][pMask] == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a Mask ! You can get one from 24/7 shop nearby Police HQ.");
      // why a { here?
      for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, false);
      SendClientMessage(playerid, COLOR_LIGHTBLUE, "You've put your mask on, /leavemask to take it off");
      // why a } here?
  }
    return 1;
}
pawn Код:
if(strcmp("/leavemask", cmdtext, true) == 0)
  {
      if(PlayerInfo[playerid][pMask] == 1) return SendClientMessage(playerid, COLOR_GREY, "You don't have a Mask ! You can get one from 24/7 shop nearby Police HQ");
      // why a { here?
      for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, true);
      SendClientMessage(playerid, COLOR_LIGHTBLUE, "You've put your mask on, /leavemask to take it off");
      // why a } here?
  }
    return 1;
}



Re: Need help with ShowPlayerNameTagForPlayer - *ToM* - 11.01.2010

EDIT: OK I already fixed that.