21.11.2010, 18:32
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.
How to use
at the top of your gamemode:
somewhere in your gamemode (for example OnPlayerSpawn)
Download:
PasteBin (crappy indention)
SolidFiles
Example
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]");
}
at the top of your gamemode:
pawn Код:
#include <getplayerclan>
pawn Код:
GetPlayerClan(playerid);
PasteBin (crappy indention)
SolidFiles
Example