message on rcon login - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: message on rcon login (
/showthread.php?tid=150873)
message on rcon login -
Jonni8 - 28.05.2010
Hey,
It's me again.
Now i want to make a command for the rcon login.
so if the player loggs in with /rcon login <password> and the password is right, he should get full armour and a message should be sent to all the other players.
but anyway it wont work.
Here my code:
pawn Код:
CMD:rcon(playerid, params[])
{
if (!strcmp(params[0], "login", true))
{
if (!strcmp(params[1], "login", true))
{
if (IsPlayerAdmin(playerid) == 0)
{
new string[256],pname[56];
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "*** %s hat sich als Admin angemeldet.", pname);
SendClientMessageToAll(ORANGE, string);
}
else
{
SendClientMessage(playerid, RED, "SERVER: Du bist bereits als Admin eingeloggt");
}
}
else
{
SendClientMessage(playerid, RED, "SERVER: Falsches Passwort");
}
}
else
{
}
return 1;
}
maybe you can help me
Re: message on rcon login -
MadeMan - 28.05.2010
You need to use this callback:
https://sampwiki.blast.hk/wiki/OnRconLoginAttempt
Re: message on rcon login -
Jonni8 - 28.05.2010
okay thanks