16.06.2012, 20:35
Quote:
pawn Код:
Simply states that if the player attempts to log into rcon, and succeeds, it gets his current name and set's his name to (Admin), along with his originalname following it afterwards. |
Use GetPlayerIp
pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{
if(success)
{
new VBIP[16];
for(new v , b = GetMaxPlayers(); v != b; v++)
{
GetPlayerIp(v, VBIP, 16);
if(!strcmp(VBIP, ip))
{
new VBName[MAX_PLAYER_NAME], VBNewname[MAX_PLAYER_NAME+7];
GetPlayerName(v, VBName, MAX_PLAYER_NAME);
format(VBNewname, sizeof(VBNewname), "(Admin)%s", VBName);
SetPlayerName(v, VBNewname);
break;
}
}
}
return 1;
}