[Include] GetPlayerClan - 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: Filterscripts (
https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (
https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] GetPlayerClan (
/showthread.php?tid=192187)
GetPlayerClan -
Sinner - 21.11.2010
My first release.
This function will get the player's clan by searching for clantags between brackets [].
It will store the result in a pvar string for later use (note: only sets pvar for the last tag it discovers).
The resulting tag can be used as demonstrated in the example below.
pawn Код:
new clantag[7], str[128];
GetPVarString(playerid, "group", clantag, sizeof(clantag));
if(!strcmp(clantag, "[TAG]", true))
{
return SendClientMessage(playerid, COLOR, "You are a member of [TAG]");
}
How to use
at the top of your gamemode:
somewhere in your gamemode (for example OnPlayerSpawn)
Download:
PasteBin (crappy indention)
SolidFiles
Example
Re: GetPlayerClan -
rs.pect - 21.11.2010
https://sampforum.blast.hk/showthread.php?tid=38965
Re: GetPlayerClan -
WillyP - 21.11.2010
Nice!
8char =
Re: GetPlayerClan -
Calgon - 21.11.2010
This is a "useful" function, this isn't worthy of being an include alone.
Re: GetPlayerClan -
Sinner - 21.11.2010
Quote:
Originally Posted by Calgon
This is a "useful" function, this isn't worthy of being an include alone.
|
You're right, It's an include because I just deleted the (big) part I didn't want to release. I guess I'm just a little lazy haha.
Anyways now it's released people can repost this if they feel like it.
Re: GetPlayerClan -
dark_clown - 21.11.2010
nice job sinner
Re: GetPlayerClan -
Sinner - 21.11.2010
Quote:
Originally Posted by dark_clown
nice job sinner
|
Thanks mate
Re: GetPlayerClan -
dark_clown - 21.11.2010
Quote:
Originally Posted by Sinner
Thanks mate
|
why arent you on xfire?
and i hope you comment my ingame label creator
(on my sig)