12.03.2010, 09:28
This is impossible with the regular RCON admin system and the reason has been told by Boelie
But it is possible if you save if they are an admin in a file (Like a .ini file) And then checks if they are admin
Like you could make it easy and just make a file for your admins then it is just this code
This way works if you are using RCON admin system. If you want someone to be an admin you give him the code and make a .ini file in hes username. You don't have to add anything in the file, just the name matters here.
Then it will show a message if the username file do not exist and if it does it shows nothing.
But if you use a downloaded adminscript or made your own you will have to use another way
Quote:
Originally Posted by boelie
most admins log in 'after' they are connected.
|
Like you could make it easy and just make a file for your admins then it is just this code
pawn Код:
public OnPlayerConnect(playerid)
{
new name[MAX_PLAYER_NAME],file[23],string[];
GetPlayerName(playerid,name,sizeof(name));
format(file,sizeof(file),"%s.ini",name);
if(!fexist(file))
{
format(string,sizeof(string),"Player %s has joined the server",name);
SendClientMessageToAll(0xFFFFFF,string);
return 1;
}
else return 1;
}
This way works if you are using RCON admin system. If you want someone to be an admin you give him the code and make a .ini file in hes username. You don't have to add anything in the file, just the name matters here.
Then it will show a message if the username file do not exist and if it does it shows nothing.
But if you use a downloaded adminscript or made your own you will have to use another way