10.11.2015, 19:31
How to add when player enter server with [TVC]tag in name, if is his tag accepted he can enter game if is not he can't ??
stock PlayerNameContains(playerid, const name[])
{
if(IsPlayerConnected(playerid))
{
new PName[MAX_PLAYER_NAME];
GetPlayerName(playerid, PName, sizeof(PName));
for(new i=0; i<sizeof(PName); i++)
{
if(strfind(PName[i], name, true) != -1)
{
return 1;
}
}
}
else
{
return 0;
}
return 0;
}
OnPlayerConnect:
if(PlayerNameContains(playerid, "[TVC]")
{
if(/*player is allowed to use the tag*/)
{
//whatever u want to do
}
else Kick(playerid);
return 1;
}
}