Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Tag System Problem

$
0
0
Code:

public OnPlayerConnect(playerid)
{
    new str[256];
    if(strfind(pName(playerid),"[AG]", true) != -1)
    {
        if(PlayerInfo[playerid][Level] == 0)
        {
            format(str, sizeof(str), "%s {%d} has been kicked for having [AG] clan-tag in their name.", pName(playerid), playerid);
            SendClientMessageToAll(-1, str);
            KickPlayer(playerid);
            return 1;
        }
    }
    return 1;
}
stock pName(playerid)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    return name;
}
stock KickPlayer(playerid) return SetTimerEx("KickPlayerEx", 100, false, "i", playerid);
function KickPlayerEx(playerid) return Kick(playerid);

So when i set the level to 0
Quote:

if(PlayerInfo[playerid][Level] == 0)
the admins also gets kicked! so i need help the only admins can use the tag.

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>