28.05.2010, 13:57
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:
maybe you can help me
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;
}