29.05.2010, 16:27
Hey,
I wanna make a script which gives the player who logged in into rcon full armour and full health.
so ia made this:
but if an admin loggs in, then a message gets sent to every player and not only to the admin.
whats wrong?
I wanna make a script which gives the player who logged in into rcon full armour and full health.
so ia made this:
pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{
for (new i=0; i<MAX_PLAYERS; i++)
{
new pip[16];
GetPlayerIp(i, pip, sizeof(pip));
if (!success)
{
if (!strcmp(ip, pip, true))
{
SendClientMessage(i, RED, "SERVER: Falsches Passwort");
Kick(i);
}
}
else
{
SendClientMessage(i, YELLOW, "*** Dir stehen jetzt neue Adminbefehle zur Verfьgung.");
SetPlayerHealth(i, 100);
SetPlayerArmour(i, 100);
}
}
return 1;
}
whats wrong?