SA-MP Forums Archive
Pulled out of the nick in the text [] (square brackets) - 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)
+--- Thread: Pulled out of the nick in the text [] (square brackets) (/showthread.php?tid=296962)



Pulled out of the nick in the text [] (square brackets) - CraftMan - 13.11.2011

Pulled out of the nick in the text [] (square brackets)
For example the player is nick [Test]Player and as I pull the Test


Re: Pulled out of the nick in the text [] (square brackets) - Vince - 13.11.2011

pawn Код:
new
    start,
    end,
    tag[24];

if((start = strfind(name, "[")) != -1 && (end = strfind(name, "]")) != -1)
{
    strmid(tag, name, start, end);
}



Re: Pulled out of the nick in the text [] (square brackets) - CraftMan - 13.11.2011

Thanx


Re: Pulled out of the nick in the text [] (square brackets) - Norn - 13.11.2011

Quote:
Originally Posted by Vince
Посмотреть сообщение
pawn Код:
new
    start,
    end,
    tag[24];

if((start = strfind(name, "[")) != -1 && (end = strfind(name, "]")) != -1)
{
    strmid(tag, name, start, end);
}
And if they have multiple brackets?


Re: Pulled out of the nick in the text [] (square brackets) - CraftMan - 13.11.2011

Quote:
Originally Posted by Norn
Посмотреть сообщение
And if they have multiple brackets?
[[test]]admin

[test