[Release] [SA:MP] [Script] /aheal /aarmour command
Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
new string[128];
new giveplayerid;
new cmd[32];
new tmp[32],tmp2[32];
cmd = strtok(cmdtext, idx);
if(strcmp(cmd, "/aheal", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(strlen(tmp) == 0)
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /aheal <ID>");
return 1;
}
if(IsPlayerAdmin(playerid))
{
giveplayerid = strval(tmp);
SetPlayerHealth(giveplayerid,100);
format(string,sizeof string,"-OperServ- %s has been healed by admin %s",PlayerName[giveplayerid],PlayerName[playerid]);
SendClientMessageToAll(COLOR_RED,string);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You are not allowed to use this command");
return 1;
}
}
if(strcmp(cmd, "/aarmour", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(strlen(tmp) == 0 || !strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /aarmour <ID>");
return 1;
}
if(IsPlayerAdmin(playerid))
{
giveplayerid = strval(tmp);
SetPlayerArmour(giveplayerid,100);
format(string,sizeof string,"-OperServ- %s has been armoured by admin %s",PlayerName[giveplayerid],PlayerName[playerid]);
SendClientMessageToAll(COLOR_RED,string);
return 1;
}
}
This commands are only for RCON admins :P
Re: /aheal /aarmour command
Yeah you're right it is what do you want me to do about it?
I'll give you some advice...
SA-MP Forums is better for help.
SA-MP Wiki is even better for help.