SA-MP Forums Archive
I Need help please - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: I Need help please (/showthread.php?tid=462651)



I Need help please - xXMidOXx - 08.09.2013

Guys i need help in thing

A Tag just for admins like [AU]and the name here

The tag just for admins , and if any player not admin joined with it he get kicked, and next time with it he get ban, Thanks.


Re: I Need help please - zrelly - 08.09.2013

check out this clan tag filterscript click here


Re : I Need help please - Matnix - 08.09.2013

For me the best way is by using OnPlayerText(playerid);.

Example code ;
pawn Код:
public OnPlayerText(playerid, text[])
{
    new string[154];
    new pname[MAX_PLAYER_NAME+1];
    GetPlayerName(playerid, pname, sizeof(pname)); // GetTheName.
    if(IsPlayerAdmin(playerid)) // if he is admins
    {
        format(string, sizeof(string), "[AU] %s : %s", name, text); // like : [AU] Matnix : Hello world!
        SendClientMessageToAll(string); // send the message with your tag.
    }
    else // if he isn't an admins.
    {
        format(string, sizeof(string), "%s : %s", name, text);
        SendClientMessageToAll(string); // send the message without tag.
    }
    return 1;
}
and, if you don't want him to use your tag :
pawn Код:
public OnPlayerConnect(playerid)
{
    new name[24];
    GetPlayerName(playerid,name,sizeof(name));
    if(strfind(name,"[AU]",true) != -1)
    {
        if(IsPlayerAdmin(playerid))
        {
            // set the admins name to the new one with a tags.
        }
        else
        {
            // kick him with a message to inform him he can't use this tags.
        }
    }
    return 1;
}



Re: I Need help please - XcorelloX - 08.09.2013

Matnix, how is your code going to work if you're detecting if they're an RCON admin upon connecting? They don't have any time at all to actually log into RCON if that's used upon OnPlayerConnect.


Re : I Need help please - Matnix - 08.09.2013

Corello, I don't know how is admins system works. So, If he understand what I want to mean, he will use HIS admins system.


Re: I Need help please - xXMidOXx - 08.09.2013

i wont use rcon password

if i /makeadmin any one

He relog and he see his tag name [AU]


Re: I Need help please - xXMidOXx - 08.09.2013

I'm using zadmin 4.0