27.05.2010, 18:13
Hi, its me again....
now i wanted to create a command to set the health of the id which the admin typed in to 100...
But i get some errors while compiling my script.
here my script:
please help...
now i wanted to create a command to set the health of the id which the admin typed in to 100...
But i get some errors while compiling my script.
here my script:
pawn Код:
CMD:fullhealth(playerid, params[])
{
if (IsPlayerAdmin(playerid) == 1)
{
new command[56];
if (sscanf(params, "d", command)) return SendClientMessage(playerid, RED, "USAGE: /fullhealth [ID]");
else if (!strcmp(command, "d", true))
{
new playername[256];
new adminname[256];
new string[256];
SetPlayerHealth(command, 100);
GetPlayerName(command, playername, sizeof(playername));
format(string, sizeof(string), "*** Du hast die HP von %s auf 100 gesetzt.", playername);
SendClientMessage(playerid, ORANGE, string);
GetPlayerName(playerid, adminname, sizeof(adminname));
format(string, sizeof(string), "*** Deine HP wurden von %s auf 100 gesetzt.", adminname);
SendClientMessage(command, ORANGE, string);
}
}
else
{
SendClientMessage(playerid, RED, "SERVER: Du bist nicht als Admin eingeloggt");
}
return 1;
}