permission for tag REP+
#1

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 ??
Reply
#2

Use strfind

https://sampwiki.blast.hk/wiki/Strfind

You can use MySQL or Dini or regular SA-MP file system to check to see if it's saved or not, tutorials all around.
Reply
#3

Didn't compile or test, but you should be good. Credits to Sandra18[NL] for the PlayerNameContains function (see more).

pawn Код:
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;
}
    }
Reply
#4

I need command to give permission for tag
Reply
#5

bump
Reply
#6

No one going to script a command for you literally, just do it yourself. Using any saving systems (MySQL, INI, SQLite)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)