Tag Name system
#1

I want make a Tag name system for tags like this [SOB] or [TS] i want analize if the nickname contains a tag and if is equal to something, like this

if (Tagname(playerid) == [SOB])
{
//do something
}

Tagname should be return the name tag and if dont have should return 0 i think but how i can analize the nickname of the player,
new name = GetPlayerName(playerid);
analize(name); xD
ideas?
thanks for your support
Reply
#2

pawn Код:
new tag[MAX_PLAYER_NAME];
GetPlayerName(playerid, tag, sizeof(tag));
if(strcmp(sendername, "[TAG]%s", false) == 0)
{
    //Blah.
}
At least, I think that'll work.
Reply
#3

No, it won't.
Reply
#4

Quote:
Originally Posted by MenaceX^
No, it won't.
Whatever, then.
Reply
#5

ammm, i want analize if a nickname contains a tag name =S xD Thanks for yours answers .
ideas?
Reply
#6

pawn Код:
new
    name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
if(strfind(name,"[SOB]", true) != -1 || strfind(name,"[TS]", true) != -1)
{
    // Tag is in the name
}
Reply
#7

OMG thanks man you are pro !! xD
Reply
#8

Quote:
Originally Posted by sizeof(Sky));
pawn Код:
new tag[MAX_PLAYER_NAME];
GetPlayerName(playerid, tag, sizeof(tag));
if(strcmp(sendername, "[TAG]%s", false) == 0)
{
    //Blah.
}
At least, I think that'll work.
That will get only player name which is only [TAG], not anything after it
Reply
#9

Quote:
Originally Posted by Jakku
Quote:
Originally Posted by sizeof(Sky));
pawn Код:
new tag[MAX_PLAYER_NAME];
GetPlayerName(playerid, tag, sizeof(tag));
if(strcmp(sendername, "[TAG]%s", false) == 0)
{
    //Blah.
}
At least, I think that'll work.
That will get only player name which is only [TAG], not anything after it
Yeah, seen that after I posted it.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)