Tag Name system - 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: Tag Name system (
/showthread.php?tid=101425)
Tag Name system -
[SOB]Chris - 10.10.2009
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
Re: Tag Name system -
(.Aztec); - 10.10.2009
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.
Re: Tag Name system -
MenaceX^ - 10.10.2009
No, it won't.
Re: Tag Name system -
(.Aztec); - 10.10.2009
Quote:
Originally Posted by MenaceX^
No, it won't.
|
Whatever, then.
Re: Tag Name system -
[SOB]Chris - 10.10.2009
ammm, i want analize if a nickname contains a tag name =S xD Thanks for yours answers
.
ideas?
Re: Tag Name system -
Chaprnks - 10.10.2009
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
}
Re: Tag Name system -
[SOB]Chris - 10.10.2009
OMG thanks man you are pro !! xD
Re: Tag Name system -
Jakku - 10.10.2009
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
Re: Tag Name system -
(.Aztec); - 10.10.2009
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.