[Solved]Only working for clan members? - 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: [Solved]Only working for clan members? (
/showthread.php?tid=127208)
[Solved]Only working for clan members? -
bajskorv123 - 12.02.2010
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;
}
Re: Only working for clan members? -
VonLeeuwen - 12.02.2010
You used stock? So the script knows what PlayerHasNameTag means?
Re: Only working for clan members? -
bajskorv123 - 12.02.2010
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;
}
Re: Only working for clan members? -
VonLeeuwen - 12.02.2010
Oh my bad, didn't read it well. Sorry, don't know how it works :P
Re: Only working for clan members? -
bajskorv123 - 12.02.2010
Quote:
Originally Posted by VonLeeuwen
Oh my bad, didn't read it well. Sorry, don't know how it works :P
|
Ok
Re: Only working for clan members? -
Correlli - 12.02.2010
This was asked and answered many times in the old script request topics, search for it there.
Re: Only working for clan members? -
bajskorv123 - 12.02.2010
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?
}