[Solved]Only working for clan members?
#1

Hey, I need something that checks the tag of a player (I'm using gTeam), like this:
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    if(PlayerHasNameTag(playerid, "[NWA]"))// The Function
  {
    gTeam[playerid] = NWA;
  }
  else
  {
    gTeam[playerid] = PLAYER;
  }
    return 1;
}
Reply
#2

You used stock? So the script knows what PlayerHasNameTag means?
Reply
#3

Quote:
Originally Posted by VonLeeuwen
You used stock? So the script knows what PlayerHasNameTag means?
What do you mean?

Hey, I need something that checks the tag of a player (I'm using gTeam)...

If you need my script:
pawn Код:
#include <a_samp>

#define NWA 1
#define PLAYER 2

new gTeam[MAX_PLAYERS];

public OnPlayerRequestClass(playerid, classid)
{
  if(PlayerHasNameTag(playerid, "[NWA]"))// The Function
  {
    gTeam[playerid] = NWA;
  }
  else
  {
    gTeam[playerid] = PLAYER;
  }
  return 1;
}
Reply
#4

Oh my bad, didn't read it well. Sorry, don't know how it works :P
Reply
#5

Quote:
Originally Posted by VonLeeuwen
Oh my bad, didn't read it well. Sorry, don't know how it works :P
Ok
Reply
#6

This was asked and answered many times in the old script request topics, search for it there.
Reply
#7

Quote:
Originally Posted by Don Correlli
This was asked and answered many times in the old script request topics, search for it there.
Thanks, Searched in the old ones (Dusty :P) and found it
pawn Код:
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
if(strfind(pName, "[NWA]", true) == 0)
{
  //What happens if they found the name tag in players name?
}
else
{
  //What happens if the tag isn't in the players name?
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)