[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


Messages In This Thread
GetPlayerClan - by Sinner - 21.11.2010, 18:32
Re: GetPlayerClan - by rs.pect - 21.11.2010, 18:34
Re: GetPlayerClan - by WillyP - 21.11.2010, 18:34
Re: GetPlayerClan - by Calgon - 21.11.2010, 18:35
Re: GetPlayerClan - by Sinner - 21.11.2010, 18:37
Re: GetPlayerClan - by dark_clown - 21.11.2010, 18:39
Re: GetPlayerClan - by Sinner - 21.11.2010, 18:42
Re: GetPlayerClan - by dark_clown - 21.11.2010, 18:43

Forum Jump:


Users browsing this thread: 2 Guest(s)