[Include] GetPlayerClan
#1

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:
pawn Код:
#include <getplayerclan>
somewhere in your gamemode (for example OnPlayerSpawn)
pawn Код:
GetPlayerClan(playerid);
Download:

PasteBin (crappy indention)
SolidFiles

Example

Reply
#2

https://sampforum.blast.hk/showthread.php?tid=38965
Reply
#3

Nice!

8char =
Reply
#4

This is a "useful" function, this isn't worthy of being an include alone.
Reply
#5

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.
Reply
#6

nice job sinner
Reply
#7

Quote:
Originally Posted by dark_clown
Посмотреть сообщение
nice job sinner
Thanks mate
Reply
#8

Quote:
Originally Posted by Sinner
Посмотреть сообщение
Thanks mate
why arent you on xfire?
and i hope you comment my ingame label creator
(on my sig)
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)